aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/servo
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #18962 - upsuper:tree-pseudos, r=emiliobors-servo2017-10-201-7/+6
|\ | | | | | | | | | | | | | | | | | | | | 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 -->
| * Add slots in PerPseudoElementMap for tree pseudos.Xidorn Quan2017-10-201-7/+6
| |
* | style: Record DocumentState dependencies.Cameron McCormack2017-10-201-1/+6
| |
* | style: Remove unused SelectorImpl::pseudo_class_state_flag.Cameron McCormack2017-10-201-6/+0
|/
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-192-61/+51
| | | | | | 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-192-51/+61
| | | | | 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-184-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* Fix commonmark Markdown warnings in docs, part 1Matt Brubeck2017-10-172-4/+4
| | | | | | | | Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments.
* style: Remove the ElementExt trait.Emilio Cobos Álvarez2017-10-161-10/+1
| | | | It is likely it's the most useless trait ever existing.
* Update to cssparser 0.22 (source location in error types)Simon Sapin2017-10-102-26/+28
|
* Auto merge of #18714 - jdm:sizes, r=jdmbors-servo2017-10-031-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parse sizes attribute values Squashed version of #17808. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix (partially) #11416 - [x] There are tests for these changes <!-- 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/18714) <!-- Reviewable:end -->
| * Parse sizes attribute values.Rakhi Sharma2017-10-021-1/+1
| |
* | style: Avoid being so Arc-happy in the custom properties code.Emilio Cobos Álvarez2017-10-011-1/+1
| |
* | style: Cleanup some media-query-related code.Emilio Cobos Álvarez2017-09-261-1/+1
| |
* | stylo: Add keyword info to computed value of font-sizeManish Goregaokar2017-09-231-1/+1
|/
* style: Kill -servo-under-display-none.Emilio Cobos Álvarez2017-09-171-1/+0
| | | | Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* style: Implement the body text color quirk in a more straight-forward way.Emilio Cobos Álvarez2017-09-161-0/+7
| | | | | | | | | This avoids grabbing the document when values that inherit from the body, whatever that means, aren't under the body. In that case we'll get a semi-random value, but that's also mishandled by Gecko anyways (and probably Blink, though haven't tested), and doesn't really make much sense.
* Backed out changeset 67769dac78c4 for busting builds CLOSED TREEGecko Backout2017-09-151-7/+0
| | | | Backs out https://github.com/servo/servo/pull/18519
* style: Implement the body text color quirk in a more straight-forward way.Emilio Cobos Álvarez2017-09-151-0/+7
| | | | | | | | | This avoids grabbing the document when values that inherit from the body, whatever that means, aren't under the body. In that case we'll get a semi-random value, but that's also mishandled by Gecko anyways (and probably Blink, though haven't tested), and doesn't really make much sense.
* style: Record the property we are computing on computed::Context, if it's a ↵Cameron McCormack2017-09-141-0/+1
| | | | non-inherited one.
* style: Add a TLS-based style struct caching mechanism.Emilio Cobos Álvarez2017-09-141-0/+4
|
* Introduce CSSPixelLength and update NonNegativeLength.Boris Chiou2017-09-131-4/+4
| | | | | | | | | | | First, we define computed::CSSPixelLength which contains a CSSFloat, a pixel value, and then we replace computed::Length with CSSPixelLength. Therefore, the |ComputedValue| of NoCalcLength, AbsoluteLength, FontRelativeLength, ViewportPercentageLength, CharacterWidth, and PhysicalLength is CSSPixelLength. Besides, we drop NonNegativeAu, and replace computed::NonNegativeLength with NonNegative<computed::Length>. (i.e. NonNegative<CSSPixelLength>)
* style: Stop the cascade when only reset structs change.Emilio Cobos Álvarez2017-09-061-1/+8
| | | | | | | Bug: 1395227 Reviewed-by: heycam MozReview-Commit-ID: JCZJl2fmtJ9 Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Replace some more uses of `write!` in components/styleSimon Sapin2017-09-041-7/+6
|
* style: Don't look for viewport units in stylesheets.Emilio Cobos Álvarez2017-08-281-11/+21
| | | | | | | | | | Use whether we've computed any viewport unit instead. This is more accurate (we avoid restyling unnecessarily if we've found anything ever on the stylesheet, but that hasn't matched). This has the benefit of also matching Gecko, and simplify some code and fishyness around, and also hopefully speeding up stylesheet parsing.
* order derivable traits listsClément DAVID2017-08-233-6/+6
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* stylo: Remove a lot of the restyle damage related complexity.Emilio Cobos Álvarez2017-08-202-17/+18
| | | | | | | | | | The only reason why we had the `existing_style_for_style_damage` bit is to apply some optimizations that we don't have anymore. I still want to reintroduce a few of them, at least for the non-eager pseudo-element case... But I think I won't need this at all. This allows us to remove a fair amount of Gecko code too.
* stylo: Remove some unused FFI functions.Emilio Cobos Álvarez2017-08-151-5/+0
| | | | | | Bug: 1390650 Reviewed-by: bholley MozReview-Commit-ID: K9fXGRmgkr4
* Introduce ComputedUrlFausto Núñez Alberro2017-08-091-0/+33
| | | | | | | | Add web platform tests for computed URL styles Mark url with no original or resolved unreachable Update the WPT manifest for new url tests
* style: Use an enumerated array for per-pseudo maps.Emilio Cobos Álvarez2017-08-081-22/+15
| | | | | | | This avoids random HashMaps. MozReview-Commit-ID: LQeZrLsoOnl Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Auto merge of #17783 - BorisChiou:stylo/animation/restrictions, r=noxbors-servo2017-08-071-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stylo: Bug 1374233 - Clamp interpolated values for properties which need to be restricted Some properties only accept non-negative values, or values greater than or equal to one. It is possible to produce an negative interpolated values while using negative timing functions, so we have to apply a restriction to these values to avoid getting invalid values. For example, line-height must be non-negative, but the output progress of some timing functions (e,g. cubic-bezier(0.25, -2, 0.75, 1)) may be a negative value, so the interpolated result of line-height is also negative. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix Bug 1374233. - [X] These changes do not require tests because we have tests in Gecko side already. <!-- 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/17783) <!-- Reviewable:end -->
| * Bug 1374233 - Part 3: Use NonNegativeAu as computed values for font-size ↵Boris Chiou2017-08-041-1/+2
| | | | | | | | | | | | | | | | related properties. For font-size and font-size-adjust. MozReview-Commit-ID: 5rrfVSzB7WF
* | style: Don't perform parent display-based style fixups on most pseudos.Cameron McCormack2017-08-051-0/+7
|/
* style: Move nsStyleContext::mParent to GeckoStyleContext.Emilio Cobos Álvarez2017-08-031-0/+5
| | | | | | | | | | | | | | | | Unfortunately this means that we lose the NS_STYLE_INHERIT_BIT optimization to avoid posting changes if we had not requested the struct. In practice, I'm not sure this optimization matters much, though, and we already compare all the structs anyway. We _could_ keep a weak parent pointer from the text style if needed, given we're going to keep alive the text style at least until the parent style context goes away, so should be safe, but I don't think the extra churn is worth it, to be honest. Happy to do so as part of bug 1368290 if you think it's worth it. Bug: 1385896 Reviewed-by: heycam MozReview-Commit-ID: ka6tNwf4Ke
* Make sure we don't recreate boxes just because we have a ::first-line.Boris Zbarsky2017-07-281-0/+8
| | | | Servo part of part 5 of the fix for Gecko bug 1324619. r=emilio
* Don't reconstruct the layout object when going from no pseudo to pseudo with ↵Boris Zbarsky2017-07-281-0/+17
| | | | | | no content for ::before and ::after. Fixes Gecko bug 1376073. r=emilio
* style: Ensure we generate a ReconstructFrame hint when -moz-binding changes ↵Cameron McCormack2017-07-251-0/+11
| | | | on a display:none root.
* Auto merge of #17839 - heycam:opacity-smil, r=hirobors-servo2017-07-241-0/+1
|\ | | | | | | | | | | | | | | | | | | | | style: allow out-of-range opacity values for SMIL animations From https://bugzilla.mozilla.org/show_bug.cgi?id=1371150. <!-- 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/17839) <!-- Reviewable:end -->
| * style: Record on a computed::Context whether we are computing a SMIL ↵Cameron McCormack2017-07-241-0/+1
| | | | | | | | animated value.
* | Update cssparser to 0.18Simon Sapin2017-07-242-8/+7
|/ | | | https://github.com/servo/rust-cssparser/pull/171
* Filter out non-applying properties when cascading style for ↵Boris Zbarsky2017-07-211-0/+13
| | | | | | ::first-letter/::first-line/::placeholder. r=emilio Part 3 of the fix for Gecko bug 1382786 <https://bugzilla.mozilla.org/show_bug.cgi?id=1382786>.
* Auto merge of #17802 - emilio:reland-stuff, r=heycambors-servo2017-07-201-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert "Backed out changeset b10e6ba9cbdb because gecko part had to b… …e backed out." This reverts commit b96d96d448c8ff93f212f225013461999540a5d0. The fix on the Gecko side is trivial, and I can land it after this lands. <!-- 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/17802) <!-- Reviewable:end -->
| * Revert "Backed out changeset b10e6ba9cbdb because gecko part had to be ↵Emilio Cobos Álvarez2017-07-201-1/+2
| | | | | | | | | | | | | | | | backed out." This reverts commit b96d96d448c8ff93f212f225013461999540a5d0. The fix on the Gecko side is trivial, and I can land it after this lands.
* | Fixed scaling artefacts in paint worklets caused by zoom and hidpi.Alan Jeffrey2017-07-201-3/+12
|/
* Backed out changeset b10e6ba9cbdb because gecko part had to be backed out. ↵Gecko Backout2017-07-201-2/+1
| | | | | | r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/17796
* Auto merge of #17796 - heycam:calc-difference, r=emiliobors-servo2017-07-201-1/+2
|\ | | | | | | | | | | | | | | | | | | | | style: pass old ComputedValues from Element data into Gecko_CalcStyleDifference This is the Servo-side part of https://bugzilla.mozilla.org/show_bug.cgi?id=1380133. <!-- 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/17796) <!-- Reviewable:end -->
| * style: Pass old ComputedValues and old cached struct bits to ↵Cameron McCormack2017-07-201-1/+2
| | | | | | | | Gecko_CalcStyleDifference.
* | style: Cleanup the cascade a good bit.Emilio Cobos Álvarez2017-07-201-3/+1
|/
* 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).
* style: More ComputedValuesInner cleanup.Emilio Cobos Álvarez2017-07-181-1/+1
| | | | MozReview-Commit-ID: 8rkAP3pMEpD