aboutsummaryrefslogtreecommitdiffstats
path: root/components
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | style: Part 3: Add CSSScrollTimelineRule for CSSOMBoris Chiou2023-05-302-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement CSSScrollTimelineRule CSSOM API. https://drafts.csswg.org/scroll-animations-1/#the-css-scroll-timeline-rule-interface We rely on the CSSOM API for testing. However, the wpt doesn't match the current spec and it has some errors. We update the wpt and enable the preference for testing in the next patch. Differential Revision: https://phabricator.services.mozilla.com/D125766
| * | | Further changes required by ServoOriol Brufau2023-05-302-0/+2
| | | |
| * | | style: Part 2: Hook @scroll-timeline rule into style systemBoris Chiou2023-05-306-11/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We add scroll-timeline rule into the stylesheet rule type, and add a new perference to protect it: layout.css.scroll-linked-animations.enabled. We will use this perference for animation-timeline property as well. Differential Revision: https://phabricator.services.mozilla.com/D125765
| * | | style: Part 1: Implement @scroll-timeline in style systemBoris Chiou2023-05-303-17/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Define the data structure for @scroll-timeline rule, the parsing code, and the serialization. Differential Revision: https://phabricator.services.mozilla.com/D125764
| * | | style: Fix anonymous name handling in presence of stylesheet sharingEmilio Cobos Álvarez2023-05-304-60/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to compute the anonymous name on the fly while building the CascadeData, otherwise we may see the same layer rule in two places due to stylehseet sharing and make them incorrectly share a name. Differential Revision: https://phabricator.services.mozilla.com/D125175
| * | | style: Add some parsing and serialization tests for @layerEmilio Cobos Álvarez2023-05-301-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This uncovers some serialization bugs, and some missing null-checks given the statement layer doesn't have a rule list. Differential Revision: https://phabricator.services.mozilla.com/D125176
| * | | Further changes required by ServoOriol Brufau2023-05-301-2/+9
| | | |
| * | | style: Add experimental support for "e", "pi", and various trigonometric ↵Emilio Cobos Álvarez2023-05-302-8/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions in calc() I'll add some tests before enabling. Also, WebKit folks (who have implemented cos() / tan() / sin()) said they will upstream their tests to WPT, so I'll extend those with the inverse functions before landing as well. Differential Revision: https://phabricator.services.mozilla.com/D124990
| * | | Further changes required by ServoOriol Brufau2023-05-301-0/+1
| | | |
| * | | style: Don't consider system-ui valid for user font prioritizationEmilio Cobos Álvarez2023-05-302-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the user can't configure it, at least from the UI (we could add UI for it but it's unclear it'd be worth it). Differential Revision: https://phabricator.services.mozilla.com/D125182
| * | | style: Add a simple CSSLayerRule implementationEmilio Cobos Álvarez2023-05-302-24/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The specifics of how this is going to work are still getting spec'd / discussed in https://github.com/w3c/csswg-drafts/issues/6576, but this allows DevTools to work fine and the feature to be complete enough for Nightly experimentation (with the other in-flight patches). Otherwise devtools crashes when trying to inspect pages that use them. Differential Revision: https://phabricator.services.mozilla.com/D124656
| * | | style: Fix layer statement with nested layer namesEmilio Cobos Álvarez2023-05-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we had: @layer A.B; We were registering "A" and "B", not "A" and "A.B", which was the intention. Fix is trivial. Depends on D124620 Differential Revision: https://phabricator.services.mozilla.com/D124621
| * | | style: Fix out of order child layer registration, and enable the testsEmilio Cobos Álvarez2023-05-302-18/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes layer order use a fixed set of bits per nesting level, to "reserve" bits for children before they are registered. See the comment in LayerOrder for the implementation limits it imposes, and potential alternatives if these limits are not enough (but I think they should be). Enable the tests, as they mostly pass now (commit incoming to fix the remaining ones). Differential Revision: https://phabricator.services.mozilla.com/D124620
| * | | Further changes required by ServoOriol Brufau2023-05-301-1/+1
| | | |
| * | | style: Fix the serialization order for the text-decoration shorthand to ↵Jonathan Kew2023-05-301-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | match the canonical order in the spec Differential Revision: https://phabricator.services.mozilla.com/D124536
| * | | Further changes required by ServoOriol Brufau2023-05-302-3/+10
| | | |
| * | | style: Implement @import layer|layer(<name>)Emilio Cobos Álvarez2023-05-304-25/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This works modulo the existing nested layer order bug. Will be covered by WPT /css/css-cascade/layer-import.html once the feature is enabled (I can probably enable it right away for those tests, but I'd rather fix the obvious bugs first). Differential Revision: https://phabricator.services.mozilla.com/D124538
| * | | style: Plumb layer order through ApplicableDeclarationBlock, and make it ↵Emilio Cobos Álvarez2023-05-303-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | have an effect Same, I want to land this separately to see if it affects micro-benchmarks. If so, we might want to pack the layer order _somewhere_ (though in this case I'm not sure where, tbh). With this, layer rules should have an effect on the page. There are a few things missing before being able to enable them: * Fix nested layer order in some cases (when parent layers are declared out of order, see the previous commit mentioning this). * Some kind of OM representation, perhaps. * Tests of course, which are coming in bug 1728722 and bug 1727276. But this should be enough to allow playing with them. Depends on D124337 Differential Revision: https://phabricator.services.mozilla.com/D124338
| * | | style: Add layer_order to rulesEmilio Cobos Álvarez2023-05-271-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I want to land this separately because we might want to get smarter with the size of the Rule struct (maybe restricting layer order to a u8 per scope and packing it with the source order, since 255 layers seem plenty), but I'd rather do the obvious thing for now. Depends on D124336 Differential Revision: https://phabricator.services.mozilla.com/D124337
| * | | style: Tweak recursion in add_rule to only cause a function call per ↵Emilio Cobos Álvarez2023-05-271-229/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | recursion level This code is really hot, and we've had perf regressions in the past for introducing function calls in the hot path. After the previous patch, add_rule is recursive and thus it can't be inlined, causing a function call for each CSS rule. This reduces the overhead by making the function take a rule list instead, causing a function call per rule _list_, which should be unnoticeable in practice. Depends on D124335 Differential Revision: https://phabricator.services.mozilla.com/D124336
| * | | style: Compute layer order during CascadeData rebuildEmilio Cobos Álvarez2023-05-275-90/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For that, deal with children in add_rule recursively, to keep the current layer name up-to-date in block layer rules. This is not the final version of this code, as right now something like this: @layer A { ... } @layer B { ... } @layer A.A { ... } Would give A.A more priority over B, which is not correct. There are tests for this incoming in wpt sync and such, but that can be tweaked later. Differential Revision: https://phabricator.services.mozilla.com/D124335
| * | | style: Factor out adding a rule in CascadeData::add_ruleEmilio Cobos Álvarez2023-05-271-157/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This shouldn't have any behavior change, but is necessary because for cascade layers we are going to need to handle the child rules / sheets ourselves, in order to handle nested layers properly. Differential Revision: https://phabricator.services.mozilla.com/D124334
| * | | Further changes required by ServoOriol Brufau2023-05-274-5/+18
| | | |
| * | | style: Add attributes to the rule hashEmilio Cobos Álvarez2023-05-265-31/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the discussion here: https://twitter.com/Rich_Harris/status/1433153204678799365 This should make attribute selectors roughly as fast as class selectors. I think it's worth trying and see if perf bots complain on micro-benchmarks and stylebench and such. I made attributes more specific than local names, but less specific than classes, which I think makes sense. When doing something like foo[data-bar], filtering by data-bar seems likely to yield less elements than filtering by foo. While at it, remove the bloom filter pref since we shipped it in bug 1704551 for 87 and we haven't heard complaints. Differential Revision: https://phabricator.services.mozilla.com/D124383
| * | | style: Remove cascade layers prefEmilio Cobos Álvarez2023-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | These have been enabled by default for quite a while. Differential Revision: https://phabricator.services.mozilla.com/D175513
| * | | style: Hook up basic @layer rule parsingEmilio Cobos Álvarez2023-05-263-49/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disabled, and of course doing nothing for now still, but this is another piece that is useful to get reviewed separately. Don't allow layers to be interleaved with @import / @namespace rules as per https://github.com/w3c/csswg-drafts/issues/6522. Differential Revision: https://phabricator.services.mozilla.com/D124229
| * | | style: Tweak at-rule parsing APIs to support cascade layersEmilio Cobos Álvarez2023-05-262-29/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This needs https://github.com/servo/rust-cssparser/pull/287 and a cssparser update. Differential Revision: https://phabricator.services.mozilla.com/D124216
| * | | Further changes required by ServoOriol Brufau2023-05-261-0/+1
| | | |
| * | | style: Restore an #[allow] that will otherwise cause warnings.Emilio Cobos Álvarez2023-05-261-0/+1
| | | |
| * | | style: Add some scaffolding for @layer rulesEmilio Cobos Álvarez2023-05-266-5/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not hooked anywhere yet, so this doesn't change behavior, but adds the basic data model etc. Adding parsing support requires some changes to cssparser to allow the same at rule to be block and statement-like at the same time, so better done separately. Differential Revision: https://phabricator.services.mozilla.com/D124079
| * | | Further changes required by ServoOriol Brufau2023-05-261-0/+1
| | | |
| * | | style: Implement image-rendering: smooth and image-rendering: pixelatedEmilio Cobos Álvarez2023-05-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, more directly go from StyleImageRendering to wr::ImageRendering. * image-rendering: smooth the non-deprecated version of OptimizeQuality, which maps to SamplingFilter::LINEAR / wr::ImageRendering::Auto (which uses gl::LINEAR). * image-rendering: pixelated maps to wr::ImageRendering::Pixelated / SamplingFilter::POINT which is the same crisp-edges does. Note that this uncovers that we were mapping image-rendering: crisp-edges to wr::ImageRendering::Pixelated. I'm going to preserve behavior on this patch but we should consider switching that to map to wr::ImageRendering::CrispEdges on a follow-up (filed bug 1728831 for this). Differential Revision: https://phabricator.services.mozilla.com/D124378
| * | | Further changes required by ServoOriol Brufau2023-05-261-0/+2
| | | |
| * | | style: Move image-rendering out of makoEmilio Cobos Álvarez2023-05-266-10/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's easier to touch in the future that way, even though the derive list is massive. Differential Revision: https://phabricator.services.mozilla.com/D124377
| * | | style: Fix selecteditem color on macOSEmilio Cobos Álvarez2023-05-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an oversight. I made selecteditem be -moz-html-cellhighlight, but that's for inactive cells. Use the inactive cell color everywhere (though android doesn't differentiate). This matches other browsers and what was reviewed on this bug. MANUAL PUSH: The semi-transparent text-selection-disabled color caused one test failure CLOSED TREE.
| * | | style: Implement SelectedItem and SelectedItemText system colorsEmilio Cobos Álvarez2023-05-261-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Highlight / HighlightText are now equivalent to the text selection ones, remove those too. Differential Revision: https://phabricator.services.mozilla.com/D123964
* | | | layout_2020: Check blocks for whether they will establish a formatting contextPu Xingyu2023-05-311-2/+4
| | | |
* | | | layout_2020: Add 'establishes_block_formatting_context' method to ↵Pu Xingyu2023-05-311-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 'ComputedValuesExt' This method checks whether the style of a normal block would establish a block formatting context.
* | | | style: Enable 'column-span' for layout 2020Pu Xingyu2023-05-311-1/+2
| |/ / |/| |
* | | Layout-2020: Fix debug mode crash for servo.orgMukilan Thiyagarajan2023-05-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | servo with layout-2020 segfaults when loading servo.org in debug build, but works fine in release build. It seems like the style pool threads seem to run overrun allocated stack space more quickly than in release mode. Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1376883 it seems the stack size was chosen base on several experiments. It is possible the results of those experiments are no longer valid. This is a temporary workaround to avoid layout 2020 builds from crashing when servo.org is loaded, until we can confirm the theory and implement a more robust solution. Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
* | | Layout-2020: Serialize access to stylo thread pool.Mukilan Thiyagarajan2023-05-263-19/+17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When rendering a page containing an iframe, layout 2020 creates parallel 'Layout' threads which share workers in the stylo thread pool. Because of the way the 'StyleSharingCache' is designed using TLS for storage of the LRU cache, this leads to a double borrow of the cache when both layout threads run concurrently. More details about the issue can be found here: https://gist.github.com/mukilan/ed57eb61b83237a05fbf6360ec5e33b0 This PR is a workaround until we find a more elegant/optimal design that also can work for gecko. The fix for now is simply to not allow multiple layouts in parallel. Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
* | Auto merge of #29798 - jdm:per-interface-codegen, r=jdmbors-servo2023-05-262-30/+74
|\ \ | |/ |/| | | | | | | | | | | | | | | | | Extract bodies of generated binding helpers into common code This is part of fixing #29770, by extracting common behaviour that [will be called](https://searchfox.org/mozilla-central/rev/2d678a843ceab81e43f7ffb83212197dc10e944a/dom/bindings/BindingUtils.cpp#3744) from new code in interface.rs. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] There are tests for these changes
| * Formatting.Josh Matthews2023-05-261-8/+2
| |
| * Use an enum to pass the index value for interfaces/protos.Josh Matthews2023-05-262-9/+27
| |
| * Extract bodies of DefineDOMInterface and GetProtoObject/GetConstructorObject ↵Josh Matthews2023-05-262-30/+62
| | | | | | | | out of generated bindings.
* | Auto merge of #29772 - Loirooriol:sync, r=mrobinsonbors-servo2023-05-2588-1111/+2481
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport several style changes from Gecko (2) <!-- Please describe your changes on the following line: --> This continues #29748. --- <!-- 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: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * | style: Remove layout.css.is-and-where-better-error-recovery.enabledEmilio Cobos Álvarez2023-05-242-23/+5
| | | | | | | | | | | | | | | | | | We shipped this in 84 Differential Revision: https://phabricator.services.mozilla.com/D123623
| * | style: Implement transform: perspective(none)Emilio Cobos Álvarez2023-05-244-19/+72
| | | | | | | | | | | | Differential Revision: https://phabricator.services.mozilla.com/D123350
| * | style: Update euclid in styloNicolas Silva2023-05-241-9/+8
| | | | | | | | | | | | Differential Revision: https://phabricator.services.mozilla.com/D85762
| * | style: Workaround GCC-calling-into-LLVM ABI issue by making ↵Emilio Cobos Álvarez2023-05-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | GenericFontFamily larger This enum being a bit larger doesn't cause many common data structures to grow, so this should be fine. Differential Revision: https://phabricator.services.mozilla.com/D123146