aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/cssstyledeclaration.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Return true in set_property only when declaration block is changedXidorn Quan2017-03-061-4/+2
|
* Remove unnecessary `ref` in some patternsSimon Sapin2017-02-261-5/+5
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* script: Don't avoid all the mutation notification methods when the style ↵Emilio Cobos Álvarez2017-01-301-15/+26
| | | | | | | | | | attribute changes. Styling was correct because of the explicit dirtiness, but still not fun. Some things, like dynamic updates to with things like [style~="color"] ~ foo selectors, were pretty broken, because we didn't take snapshots of those attributes.
* script: Also do so for element owners.Emilio Cobos Álvarez2017-01-281-1/+1
|
* script: Fix base url for style-rule-owned declarations.Emilio Cobos Álvarez2017-01-281-7/+18
|
* script: Refactor CSSStyleDeclaration and fix some bugs in the way.Emilio Cobos Álvarez2017-01-281-133/+126
|
* Reduce allocator churn when parsing property declaration blocks (fixes #15060)Manish Goregaokar2017-01-181-3/+6
|
* Implement CSSKeyframeRule.styleKeith Yeung2017-01-071-8/+8
|
* Implement CSSStyleRule.styleKeith Yeung2016-12-171-110/+139
|
* Use PropertyId in per-property CSSStyleDeclaration accessors.Simon Sapin2016-12-091-69/+75
|
* Match on PropertyId (not strings) to parse a declaration.Simon Sapin2016-12-091-3/+2
|
* Use PropertyId instead of Atom for CSSStyleDeclaration::get_computed_styleSimon Sapin2016-12-091-11/+8
|
* Introduce enums for identifying CSS properties.Simon Sapin2016-12-091-17/+42
| | | | | | | | | | | * `LonghandId` and `ShorthandId` are C-like enums * `Atom` is used for the name of custom properties. * `PropertyDeclarationId` is the identifier for `PropertyDeclaration`, after parsing and shorthand expansion. (Longhand or custom property.) * `PropertyId` represents any CSS property, e.g. in CSSOM. (Longhand, shorthand, or custom.) Using these instead of strings avoids some memory allocations and copies.
* Rename selector_impl.rs to selector_parser.rsSimon Sapin2016-11-201-1/+1
| | | | This makes it consistent with an upcoming update of the selectors crate.
* Prefer Servo-specific ToCss for all typesRavi Shankar2016-11-071-1/+1
|
* Update to string-cache 0.3Simon Sapin2016-11-031-1/+1
|
* Move CSSStyleDeclaration.SetPropertyPriority logic to styleSimon Sapin2016-10-101-10/+12
|
* Move (some) CSSStyleDeclaration.SetProperty logic to styleSimon Sapin2016-10-101-43/+75
|
* Move CSSStyleDeclaration.RemoveProperty logic to styleSimon Sapin2016-10-101-25/+29
|
* Move CSSStyleDeclaration.GetPropertyPriority logic to styleSimon Sapin2016-10-101-25/+11
|
* Move CSSStyleDeclaration.GetPropertyValue logic to styleSimon Sapin2016-10-101-43/+12
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-2/+1
|
* Use parking_lot::RwLock instead of DOMRefCell for PropertyDeclarationBlockSimon Sapin2016-10-041-6/+6
|
* Use PropertyDeclarationBlock in a DOMRefCell everywhere.Simon Sapin2016-10-041-33/+37
|
* Auto merge of #13134 - servo:archery, r=emiliobors-servo2016-08-311-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add lots of Arc’s in style, and prepare for using DOMRefCell <!-- Please describe your changes on the following line: --> `DOMRefCell` usage is not there year because of thread-safety questions, but I have this much already that I’d like to land before it bitrots. r? @emilio --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require new tests because refactor <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13134) <!-- Reviewable:end -->
| * Use Arc<PropertyDeclarationBlock> everwhere it’s appropriate.Simon Sapin2016-08-311-1/+2
| |
| * Make DOMRefCell use style’s copy of RefCellSimon Sapin2016-08-311-1/+1
| |
* | Use Option<T> to return from gettersAnthony Ramine2016-08-301-16/+14
|/ | | | | This removes the cumbersome &mut bool argument and offers overall a more readable code.
* Merge normal and important declarations in style rules.Simon Sapin2016-08-211-19/+17
| | | | Have a single Vec instead of two. Fix #3426
* Add an Importance enum replacing booleans to indicate `!important`.Simon Sapin2016-08-211-7/+8
|
* Revert "Simplify CSSStyleDeclaration::GetPropertyValue"Simon Sapin2016-08-211-5/+16
| | | | | | | | | This reverts commit 1637b0ba8a66839e3329a3cf552ab2d4fb3c67c6. * As far as I know, `fn` pointers don’t necessarily inline well * Upcoming commits are gonna change this mapping to be less trivial, so this would at least need a new `fn` declaration, making this less of a simplification.
* Simplify CSSStyleDeclaration::GetPropertyValueAnthony Ramine2016-08-141-16/+5
| | | | While Fn(_) -> _ isn't Clone, fn(_) -> _ is.
* Auto merge of #11428 - g-k:csstext, r=SimonSapinbors-servo2016-06-011-2/+39
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | csstext - [x] These changes fix #4431. - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy --faster` reports one error for the `css_properties_accessors!` macro not having a spec link ``` $ git log -1 --format=oneline 91fb9bf1d388c3ede304a5d649dd21fe975787b0 fixup! implement cssText $ ./mach build -d Compiling style v0.0.1 (file:///Users/greg/servo/components/style) Compiling gfx v0.0.1 (file:///Users/greg/servo/components/gfx) Compiling script v0.0.1 (file:///Users/greg/servo/components/script) Compiling layout_traits v0.0.1 (file:///Users/greg/servo/components/layout_traits) Compiling compositing v0.0.1 (file:///Users/greg/servo/components/compositing) Compiling glutin_app v0.0.1 (file:///Users/greg/servo/ports/glutin) Compiling constellation v0.0.1 (file:///Users/greg/servo/components/constellation) Compiling layout v0.0.1 (file:///Users/greg/servo/components/layout) Compiling servo v0.0.1 (file:///Users/greg/servo/components/servo) Build completed in 0:05:11.475584 $ ./mach test-tidy --faster Checking files for tidiness... ./components/script/dom/cssstyledeclaration.rs:386: method declared in webidl is missing a comment with a specification link Progress: 100% (12/12) ``` - [x] There are tests for these changes. More CSSOM tests pass, but others fail that probably shouldn't: * `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/index-002.htm` and a bunch of the other tests in `/css-tests/cssom-1_dev/html/ crash when run individually * `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/cssom-cssText-serialize.htm` fails to strip a trailing semicolon (`left: 10px` vs `left: 10px;`) * `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/index-001.htm` shared shorthand values aren't coalesced (`margin: 20px` vs. `margin: 20px 20px 20px 20px`) * `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/cssstyledeclaration-csstext.htm` also crashes and fails for `color: red;` vs. `color: RED;`, preserving declaration insertion order, whitespace in the value, and setting an unknown style property. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11428) <!-- Reviewable:end -->
| * implement cssTextGlenn Watson2016-05-311-2/+39
| |
* | Remove empty lines following braces.Josh Matthews2016-05-271-1/+0
|/
* Restoring node dirty calls after properties are set to trigger mutationsDavid Raifaizen2016-05-251-4/+11
|
* Changing update_inline_style to process multiple declarations at once to ↵David Raifaizen2016-05-251-5/+5
| | | | handle shorthand serialization better
* Less cloning and dynamic dispatch.Simon Sapin2016-05-251-3/+13
|