aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/cssstyledeclaration.rs
Commit message (Collapse)AuthorAgeFilesLines
* Add invalidate_stylesheets to StyleSheetsListOwner traitFernando Jiménez Moreno2019-04-261-11/+3
|
* Invalidate and flush shadow tree stylesheets where neededFernando Jiménez Moreno2019-04-261-5/+11
|
* Add is_connected flag to node and use it to replace most uses of is_in_docFernando Jiménez Moreno2019-04-261-1/+1
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-5/+11
|
* Format remaining filesPyfisch2018-11-061-1/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-11/+11
|
* Format script componentchansuke2018-09-191-62/+74
|
* script: Fix build and tidy.Emilio Cobos Álvarez2018-07-241-8/+18
|
* style: Fix build and unit tests.Emilio Cobos Álvarez2018-07-161-2/+2
|
* layout: script: Fix build.Emilio Cobos Álvarez2018-06-231-2/+15
|
* style: Fix servo build.Emilio Cobos Álvarez2018-06-121-2/+2
|
* dom: Remove CSSStyleDeclaration.setPropertyValue/setPropertyPriority.Emilio Cobos Álvarez2018-06-021-35/+6
|
* dom: don't parse internal properties in CSSStyleDeclaration.Emilio Cobos Álvarez2018-06-021-21/+13
|
* Update to smallbitvec 2.1Matt Brubeck2018-04-171-9/+8
|
* style: Make Servo deal with CSS property prefs more correctly.Emilio Cobos Álvarez2018-02-271-0/+12
| | | | Right now you could still set preffed-off properties from CSSStyleDeclaration.
* Avoid the generic writer parameter for PropertyDeclaration serialization.Bobby Holley2018-01-221-4/+8
| | | | MozReview-Commit-ID: JR3IcL1NRHO
* style: Move property allowance tests to PropertyId::parse_into.Emilio Cobos Álvarez2017-11-211-5/+5
| | | | | | | | | | | It's not only more consistent (since we have a proper ParserContext there), but also fixes a bunch of bugs where Gecko accidentally exposes and allows setting internal state because of conversions from nsCSSPropertyID to PropertyId. This adds the extra complexity of caring about aliases for longer, but that's probably not a big deal in practice, since we also have PropertyDeclarationId. MozReview-Commit-ID: C2Js8PfloxQ
* Upgrade to rustc 1.23.0-nightly (02004ef78 2017-11-08)Simon Sapin2017-11-091-1/+0
|
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-2/+2
|
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-2/+2
| | | | | | failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/18809
* Update bitflags to 1.0 in every servo crateBastien Orivel2017-10-191-2/+2
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Remove use of unstable box syntax.Simon Sapin2017-10-161-5/+5
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* style: Be clearer about whether a declaration comes from parsing or not.Emilio Cobos Álvarez2017-10-141-2/+6
| | | | | | | | | | This introduces DeclarationSource, to see if a declaration has been parsed or set from CSSOM in a declaration block. The Servo_DeclarationBlock_SetFoo and similar callers are changed to DeclarationSource::CssOm because their semantics are more CSSOM-y, but it shouldn't matter since they should all be checked before hand with Servo_DeclarationBlock_PropertyIsSet.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-4/+4
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Use SmallBitVec for important flags in PDBMatt Brubeck2017-09-111-3/+3
|
* order derivable traits listsClément DAVID2017-08-231-1/+1
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Add a pref checking mechanism for alias propertiesNazım Can Altınova2017-08-161-5/+5
|
* Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10)Simon Sapin2017-08-151-4/+4
|
* Replace all uses of the style::stylearc alias with servo_arc.Michael Partheil2017-07-191-1/+1
| | | | | | The alias is left there temporarilly and will be removed completely in a later commit where also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still use the old alias).
* Suppress CSS parser errors for vendor-prefixed properties.Josh Matthews2017-07-171-5/+5
|
* Implement CSSStyleRule.selectorText.Jonathan Chan2017-07-121-0/+2
| | | | | | | | | | | | | | | | | | We parse when assigning using the namespaces of the stylesheet. It isn't clear if the spec says to do that (Firefox doesn't support the setter at all, Chrome does, Safari doesn't); the spec issue is here: https://github.com/w3c/csswg-drafts/issues/1511 Also fix ToCss implementation of AttrSelectorOperator to not pad with spaces, to conform with CSSOM. This means we have to update some unit tests that expect operators with spaces around them in attribute selectors to roundtrip. See the "attribute selector" section of "Serializing Selectors" here: https://drafts.csswg.org/cssom/#serializing-selectors CSSStyleRule.selectorText is specified here: https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext
* stylo: Fix StyleSheetInner/Stylesheet mappingEmilio Cobos Álvarez2017-07-021-1/+1
| | | | | | The key of this patch is the split between Stylesheet and StylesheetContents. Gecko will use StylesheetContents, which maps to a ServoStyleSheetInner.
* Move ParsingMode into style_traits.Hiroyuki Ikezoe2017-06-141-2/+1
|
* Bug 1331291 part 1 - Set stylesheet url_data correctly for import rule.Xidorn Quan2017-06-131-1/+1
|
* Avoid returning / passing around a huge ParsedDeclaration typeSimon Sapin2017-05-191-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enum type used to contain the result of parsing one CSS source declaration (`name: value;`) and expanding shorthands. Enum types are as big as the biggest of their variant (plus discriminant), which was quite big because some shorthands expand to many longhand properties. This type was returned through many functions and methods, wrapped and rewrapped in `Result` with different error types. This presumably caused significant `memmove` traffic. Instead, we now allocate an `ArrayVec` on the stack and pass `&mut` references to it for various functions to push into it. This type is also very big, but we never move it. We still use an intermediate data structure because we sometimes decide after shorthand expansion that a declaration is invalid after all and that we’re gonna drop it. Only later do we push to a `PropertyDeclarationBlock`, with an entire `ArrayVec` or nothing. In future work we can try to avoid a large stack-allocated array, and instead writing directly to the heap allocation of the `Vec` inside `PropertyDeclarationBlock`. However this is tricky: we need to preserve this "all or nothing" aspect of parsing one source declaration, and at the same time we want to make it as little error-prone as possible for the various call sites. `PropertyDeclarationBlock` curently does property deduplication incrementally: as each `PropertyDeclaration` is pushed, we check if an existing declaration of the same property exists and if so overwrite it. To get rid of the stack allocated array we’d need to somehow deduplicate separately after pushing multiple `PropertyDeclaration`.
* Make ParsingMode bitflags.Hiroyuki Ikezoe2017-05-141-2/+2
| | | | | assert_parsing_mode_match() is mostly the same as assert_restyle_hints_match().
* Rename LengthParsingMode to ParsingMode and LengthParsingMode::SVG to ↵Hiroyuki Ikezoe2017-05-141-2/+2
| | | | | | | PasingMode::AllowUnitlessLength. We need another flag that represents allow-negative-number for SMIL, so this enum will also comprise the another parsing mode that allows negative number.
* Fix up script and layout.Bobby Holley2017-05-021-1/+1
|
* Propagate quirks mode all the way to ParserContextAnthony Ramine2017-04-271-2/+7
| | | | The quirks mode is still not properly propagated in geckolib.
* Expose CSS length mode in Stylo glueJ. Ryan Stinnett2017-04-141-1/+2
| | | | | | | Add length mode args to Stylo glue functions so that Gecko can enable the special SVG mode as needed. MozReview-Commit-ID: 1luM13MFEXX
* Use a UrlExtraData type alias to unify url handling logic.Xidorn Quan2017-04-031-6/+3
|
* Replace ParsedDeclaration::expand with non-generic methodSimon Sapin2017-03-291-4/+1
| | | | | | ... to reduce its code size impact. https://bugzilla.mozilla.org/show_bug.cgi?id=1351737
* Move all PropertyDeclarationBlock from RwLock<_> to Locked<_>Simon Sapin2017-03-191-10/+22
|
* Make PropertyDeclarationBlock fields privateSimon Sapin2017-03-071-3/+3
|
* Make PropertyDeclarationBlock::important_count private.Simon Sapin2017-03-071-8/+2
|
* Make PropertyDeclaration::parse return an enum rather than push to a Vec.Simon Sapin2017-03-071-6/+6
|