aboutsummaryrefslogtreecommitdiffstats
path: root/ports/geckolib/glue.rs
Commit message (Collapse)AuthorAgeFilesLines
* style: Move property allowance tests to PropertyId::parse_into.Emilio Cobos Álvarez2017-11-211-2/+3
| | | | | | | | | | | 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
* style: Get rid of unstyled children only traversals.Emilio Cobos Álvarez2017-11-201-15/+12
| | | | | | | | | They're useless now, provided we remove the hack to not traverse XBL-bound elements on initial styling. Bug: 1418456 Reviewed-by: heycam MozReview-Commit-ID: AvBVdyF1wb6
* style: Move font-variant-ligatures outside of makoCYBAI2017-11-171-0/+1
|
* Auto merge of #19220 - CYBAI:font-variant-east-asian-out-of-mako, r=emiliobors-servo2017-11-151-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | style: Move font-variant-east-asian outside of mako This is a sub-PR of #19015 r? emilio --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #19216 - [x] These changes do not require tests <!-- 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/19220) <!-- Reviewable:end -->
| * style: Move font-variant-east-asian outside of makoCYBAI2017-11-151-0/+1
| |
* | Auto merge of #19211 - KiChjang:text-decoration-line, r=emiliobors-servo2017-11-141-3/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | | | Move text-decoration-line out of mako Part of #19015. <!-- 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/19211) <!-- Reviewable:end -->
| * Move text-decoration-line out of makoKeith Yeung2017-11-141-3/+3
| |
* | style: Remove mozmm CSS unit.Emilio Cobos Álvarez2017-11-141-2/+1
| | | | | | | | | | | | Bug: 1416564 Reviewed-by: heycam MozReview-Commit-ID: AU4CUq09tw4
* | stylo: Integrate Servo SourceSizeList in ResponsiveImageSelector.Emilio Cobos Álvarez2017-11-131-1/+51
|/ | | | | | | | | | | | This needs to dumb down the parsing in order to match what we do in Gecko and pass more tests. The remaining tests are just because of calc() in media queries and "or" media expressions. Bug: 1408308 Reviewed-by: Manishearth MozReview-Commit-ID: CXGdYVbojBL
* Add general impl in gecko_properties for Transform value and add ↵Xidorn Quan2017-11-121-3/+3
| | | | -moz-window-transform.
* style: Make MozScriptLevel::Absolute serialize as -moz-absolute(foo).Emilio Cobos Álvarez2017-11-121-1/+1
|
* style: Implement css(dimension) and derive ToCss for a bunch of stuff.Emilio Cobos Álvarez2017-11-121-1/+1
| | | | For css(dimension), it'd be nice to derive(Parse) too, I think...
* Backed out changeset d77275db6419 (bug 1374178) for failure ↵Gecko Backout2017-11-071-3/+3
| | | | | | reftests/transform-3d/translatez-1a.html r=backout a=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/19106
* Add general impl in gecko_properties for Transform value and add ↵Xidorn Quan2017-11-061-3/+3
| | | | -moz-window-transform.
* style: Allow disabling invalidation-based querySelector from C++Emilio Cobos Álvarez2017-11-041-2/+21
| | | | | | | Rust compile times are hard. MozReview-Commit-ID: 9Xhtf7f3Vzv Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Backed out changeset dbd300f4d75b for build bustage. r=backout on a CLOSED TREEGecko Backout2017-11-031-21/+2
| | | | Backs out https://github.com/servo/servo/pull/19108
* style: Allow disabling invalidation-based querySelector from C++Emilio Cobos Álvarez2017-11-031-2/+21
| | | | | | Rust compile times are hard. MozReview-Commit-ID: 9Xhtf7f3Vzv
* Replace old transform code with new generic codeManish Goregaokar2017-11-021-8/+7
|
* stylo: Remove useless assertions.Emilio Cobos Álvarez2017-11-011-3/+0
| | | | ElementStyles::primary expect()s.
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-35/+33
|
* Add Servo_ComposeAnimationSegment which composes an animation segment.Boris Chiou2017-10-271-112/+170
|
* Add Servo_AnimationValue_Transform which creates an AnimationValue of transform.Boris Chiou2017-10-271-3/+13
|
* Add Servo_AnimationValue_Opacity which creates an AnimationValue of opacity.Boris Chiou2017-10-271-3/+10
|
* style: Introduce TDocument::is_html_element and TDocument::quirks_mode.Emilio Cobos Álvarez2017-10-261-6/+8
| | | | | This allows some code to read a bit nicer, and stop passing down quirks mode to querySelector / querySelectorAll.
* Auto merge of #19016 - emilio:animation-avoid-flush-not-quite, r=hirobors-servo2017-10-251-0/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | style: Fix detection of animations to avoid style flushing in getComputedStyle. This fixes multiple things: * EffectCompositor was using the light tree instead of the flat tree. * When we insert an element inside the document, we may not style it right away (we mark it for lazy frame construction with the NODE_NEEDS_FRAME). Since we trigger animations and transitions from the traversal, we can't skip flushing if we call getComputedStyle on any of those. Bug: 1406750 Reviewed-by: hiro MozReview-Commit-ID: DpAhmLH3uJ2 <!-- 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/19016) <!-- Reviewable:end -->
| * style: Fix detection of animations to avoid style flushing in getComputedStyle.Emilio Cobos Álvarez2017-10-251-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes multiple things: * EffectCompositor was using the light tree instead of the flat tree. * When we insert an element inside the document, we may not style it right away (we mark it for lazy frame construction with the NODE_NEEDS_FRAME). Since we trigger animations and transitions from the traversal, we can't skip flushing if we call getComputedStyle on any of those. Bug: 1406750 Reviewed-by: hiro MozReview-Commit-ID: DpAhmLH3uJ2
* | stylo: Honor CallerType for media query parsing.Emilio Cobos Álvarez2017-10-251-9/+34
|/ | | | | | | | So that matchMedia can parse internal stuff in Chrome code. Bug: 1410074 Reviewed-by: xidorn MozReview-Commit-ID: 6M4HHqVJ1dp
* stylo: Integrate QuerySelectorAll in Gecko.Emilio Cobos Álvarez2017-10-231-0/+32
| | | | | | Bug: 1410624 Reviewed-by: heycam MozReview-Commit-ID: 2Jf3Z6ikjXB
* style: Refactor querySelector to be generic over the query type, and ↵Emilio Cobos Álvarez2017-10-231-6/+4
| | | | | | implement a tree-walking variant of it. Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* style: Hook QuerySelector into stylo.Emilio Cobos Álvarez2017-10-231-2/+25
| | | | | | Bug: 1410624 MozReview-Commit-ID: 4uKWN9uqi3r Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Auto merge of #18963 - heycam:rm-property-id, r=upsuperbors-servo2017-10-201-7/+12
|\ | | | | | | | | | | | | | | | | | | | | geckolib: Make Servo_DeclarationBlock_RemovePropertyById return whether it did remove a property. From https://bugzilla.mozilla.org/show_bug.cgi?id=1408311, reviewed there by Xidorn. <!-- 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/18963) <!-- Reviewable:end -->
| * geckolib: Make Servo_DeclarationBlock_RemovePropertyById return whether it ↵Cameron McCormack2017-10-201-7/+12
| | | | | | | | did remove a property.
* | Auto merge of #18962 - upsuper:tree-pseudos, r=emiliobors-servo2017-10-201-1/+66
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support matching for ::-moz-tree-* pseudo-elements This is the Servo side change of [bug 1397644](https://bugzilla.mozilla.org/show_bug.cgi?id=1397644). <!-- 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/18962) <!-- Reviewable:end -->
| * | Implement XUL tree pseudo style resolution for stylo.Xidorn Quan2017-10-201-1/+66
| |/
* | geckolib: Add FFI function for checking document state dependencies.Cameron McCormack2017-10-201-1/+12
| |
* | style: Remove Stylist::might_have_state_dependency.Cameron McCormack2017-10-201-2/+2
|/ | | | | We always know for sure whether we have a dependency on particular event state bits, so just use has_state_dependency.
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-33/+35
| | | | | | 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-35/+33
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* Add Servo_StyleSet_GetComputedValuesByAddingAnimation FFI.Boris Chiou2017-10-191-27/+85
| | | | | | Add an FFI to create a temporary ServoStyleContext with the animation value. We need this because we calculate the Cumulative change hints to check if we can ignore this animation segment.
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* Auto merge of #18904 - emilio:invalidator-less-dependencies, r=heycam,jdm,noxbors-servo2017-10-171-1/+1
|\ | | | | | | | | | | | | | | style: Stop threading the ElementData around the invalidator. <!-- 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/18904) <!-- Reviewable:end -->
| * style: Refactor children handling.Emilio Cobos Álvarez2017-10-171-1/+1
| | | | | | | | | | Moving traversal_children away from TNode I can make TNode trivial enough, in order to share a QuerySelector implementation between Servo and Gecko.
* | style: Add FFI function for parsing IntersectionObserver rootMargin values.Cameron McCormack2017-10-171-1/+39
|/
* geckolib: Add FFI functions for color parsing.Cameron McCormack2017-10-161-1/+65
|
* Auto merge of #18877 - emilio:closest-why, r=noxbors-servo2017-10-141-20/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | stylo: Dumb down the return value of SelectorList_Closest. So it builds with rust 1.21. See: https://bugzilla.mozilla.org/show_bug.cgi?id=1408622 <!-- 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/18877) <!-- Reviewable:end -->
| * stylo: Dumb down the return value of SelectorList_Closest.Emilio Cobos Álvarez2017-10-141-4/+4
| |
| * stylo: Reformat a few function signatures.Emilio Cobos Álvarez2017-10-141-16/+17
| |
* | Auto merge of #18867 - emilio:parse-hack, r=heycambors-servo2017-10-141-17/+29
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | style: Dishonor display: -moz-box if -webkit-box was specified before This is a compatibility hack that Gecko supports that is apparently important for android. I want to remove it, but let's see... See https://bugzilla.mozilla.org/show_bug.cgi?id=1407701 for reference. <!-- 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/18867) <!-- Reviewable:end -->
| * style: Be clearer about whether a declaration comes from parsing or not.Emilio Cobos Álvarez2017-10-141-17/+29
| | | | | | | | | | | | | | | | | | | | 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.
* | Auto merge of #18864 - emilio:reformat, r=jdmbors-servo2017-10-131-175/+222
|\ \ | | | | | | | | | | | | | | | | | | | | | style: Reformat a few signatures to follow a consistent style. <!-- 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/18864) <!-- Reviewable:end -->