aboutsummaryrefslogtreecommitdiffstats
path: root/components
Commit message (Collapse)AuthorAgeFilesLines
...
* Re-use the TextMetrics data structure in the Layout 2020 fragment tree (#30823)Martin Robinson2023-12-063-44/+20
| | | | | | | This data structure has all of the metrics needed to render a font and is in `Au`. We'll need more of these metrics for implementing `vertical-align` and its use doesn't increase the size of the Fragment tree (as the BoxFragment is still larger). In addition, this will be helpful when switching layout to `Au`.
* Add initial support for table box tree construction (#30799)Martin Robinson2023-12-0511-18/+918
| | | | | | | | | | | | This is the first part of constructing the box tree for table layout. No layout is actually done and the construction of tables is now hidden behind a flag (in order to not regress WPT). Notably, this does not handle anonymous table part construction, when the DOM does not reflect a fully-formed table. That's part two. Progress toward #27459. Co-authored-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Manish Goregaokar <manishsmail@gmail.com>
* Fix typing issues in flex layout (#30784)Joshua Holmes2023-12-041-212/+207
| | | | | | | | | | | | | | | | | | | * Use `Option` instead of `Result` when passing optional values into vector Also renames vector and adds comment for clarity, just in case that's helpful Signed-off-by: Joshua Holmes <joshua.phillip.holmes@gmail.com> * Replace use of Option with new enum, , when seperating flex content Signed-off-by: Joshua Holmes <joshua.phillip.holmes@gmail.com> * Move global function body into the method Signed-off-by: Joshua Holmes <joshua.phillip.holmes@gmail.com> --------- Signed-off-by: Joshua Holmes <joshua.phillip.holmes@gmail.com>
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-01203-1313/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove script_plugins * Use crown instead of script_plugins * crown_is_not_used * Use crown in command base * bootstrap crown * tidy happy * disable sccache * Bring crown in tree * Install crown from tree * fix windows ci * fix warning * fix mac libscript_plugins.dylib is not available anymore * Update components/script/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> * Update for nightly-2023-03-18 Mostly just based off https://github.com/servo/servo/pull/30630 * Always install crown it's slow only when there is new version * Run crown test with `mach test-unit` * Small fixups; better trace_in_no_trace tests * Better doc * crown in config.toml * Fix tidy for real * no sccache on rustc_wrapper * document rustc overrides * fixup of compiletest * Make a few minor comment adjustments * Fix a typo in python/servo/platform/base.py Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> * Proper test types * Ignore tidy on crown/tests --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Remove a comment that is no longer valid (#30806)Martin Robinson2023-12-011-2/+0
| | | The update of `max_block_size` here no longer happens.
* Extend character-based soft wrap prevention to before atomics (#30800)Martin Robinson2023-12-011-14/+41
| | | | | | The changes in #30740, fixed an issue where certain characters should prevent line break opportunity after atomics. This change extends that to also apply to before atomics, which is what the specification says should happen.
* Stop sending " " to linebreaker for replaced content (#30740)Martin Robinson2023-11-302-5/+41
| | | | | | | | | | | We previously sent a " " to the linebreaker in order to ensure that the next text had a soft wrap opportunity at the start. Calling `next(" ")` without waiting until the returned index was 1, violated some invariants of linebreaker ultimately causing a panic. Instead of using the linebreaker for this, simply keep a flag in the IFC layout state, which avoids the problem entirely. Fixes #30703.
* Add initial support for sticky positioning for non-legacy layout (#30686)Martin Robinson2023-11-296-61/+231
| | | | | | | | | | * Add initial support for sticky positioning for non-legacy layout Many tests still fail for a variety of reasons. One of the primary ones is that CSSOM currently does not return correct values for elements positioned by sticky nodes. This requires changes to WebRender to work properly. * Fix an assertion failure in the legacy layout sticky code
* Further changes required by ServoOriol Brufau2023-11-241-3/+3
|
* style: Add a query-selector fast path for attribute selectors in the ↵Emilio Cobos Álvarez2023-11-241-2/+44
| | | | | | rightmost compound Differential Revision: https://phabricator.services.mozilla.com/D180553
* style: Speed up / specialize attribute selector-matchingEmilio Cobos Álvarez2023-11-243-174/+164
| | | | | | | Inline the attribute lookup code, and only branch on the attribute selector type if we have found an attribute. Differential Revision: https://phabricator.services.mozilla.com/D180531
* Further changes required by ServoOriol Brufau2023-11-242-6/+1
|
* style: Remove unused TElement::has_attrEmilio Cobos Álvarez2023-11-242-9/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D180530
* Further changes required by ServoOriol Brufau2023-11-241-6/+11
|
* style: Remove the never_matches field from attr selectorsEmilio Cobos Álvarez2023-11-245-57/+28
| | | | | | | It's an extra branch which in practice we almost never take, plus extra checks during parsing. Differential Revision: https://phabricator.services.mozilla.com/D180529
* style: Add a way to optimize the "attribute in no namespace exists" checkEmilio Cobos Álvarez2023-11-242-5/+12
| | | | | | Go through the slow path by default. No behavior change. Differential Revision: https://phabricator.services.mozilla.com/D180528
* style: Don't recompute quirks mode -> case sensitivity over and overEmilio Cobos Álvarez2023-11-241-22/+24
| | | | | | | The only reason we pass the quirks mode around is to compute the case sensitivity, but we can just pass the later. Differential Revision: https://phabricator.services.mozilla.com/D180527
* style: Fix style invalidation on layer rule insertionEmilio Cobos Álvarez2023-11-241-1/+5
| | | | | | | | | | Layer insertion may change the order of styles, so we may need to fully invalidate. Without this change, bug 1838045 makes layer-statement-before-import.html fail. Differential Revision: https://phabricator.services.mozilla.com/D180929
* style: Container units should prevent us from sharing style by rule nodeEmilio Cobos Álvarez2023-11-243-2/+21
| | | | | | | | | | | | At least when the containers are different. For now check that by doing a somewhat simplified test (checking sibling-ness). The new flag can be useful to optimize container query restyles on resizes too, in the future. Differential Revision: https://phabricator.services.mozilla.com/D179268
* style: Remove obsolete comment to add use counter for developing CSS propertiesTing-Yu Lin2023-11-241-10/+0
| | | | | | | | The CSS properties in the list are all shipped. Since we still don't support use counter for developing CSS properties since this bug opens, I assume this feature is not critical. Hence the removal of the comment. Differential Revision: https://phabricator.services.mozilla.com/D180771
* Further changes required by ServoOriol Brufau2023-11-241-5/+0
|
* style: Move `ANCHORS_RELATIVE_SELECTOR` out of nsINode flagsDavid Shin2023-11-247-43/+59
| | | | | | Move the flag to ComputedValueFlags, like `CONSIDERED_RELATIVE_SELECTOR`. Differential Revision: https://phabricator.services.mozilla.com/D180726
* style: Clean up Context::for_non_inherited_propertyEmilio Cobos Álvarez2023-11-245-32/+19
| | | | | | | We don't ever check the particular property, so it can just be a boolean. Differential Revision: https://phabricator.services.mozilla.com/D180680
* Further changes required by ServoOriol Brufau2023-11-241-3/+1
|
* style: Fix rebase conflict with bug 1837664Emilio Cobos Álvarez2023-11-241-1/+1
|
* style: Do not snap -webkit-text-stroke-width to dev pixelsEmilio Cobos Álvarez2023-11-248-52/+104
| | | | | | | Introduce LineWidth (which doesn't snap) and let BorderSideWidth wrap it and actually do the snapping. Differential Revision: https://phabricator.services.mozilla.com/D180688
* style: Improve border-image shorthand serialization, and annotate more passesEmilio Cobos Álvarez2023-11-241-11/+25
|
* style: Don't allow to share style by rule node for linksEmilio Cobos Álvarez2023-11-241-13/+7
| | | | | | (Regardless of visitedness) Differential Revision: https://phabricator.services.mozilla.com/D180353
* style: Improve border shorthand serializationEmilio Cobos Álvarez2023-11-243-49/+65
| | | | | | | | | | | | Fix some bugs caught by css/cssom/shorthand-values. In particular: * Make the shorthand order match the spec. * Omit values when we can. Fix a subtest that wasn't correct. Shorthands can be serialized as long as !important matches in all components. Differential Revision: https://phabricator.services.mozilla.com/D180466
* style: Minor clean-ups to border shorthand parsingEmilio Cobos Álvarez2023-11-241-64/+50
| | | | | | This doesn't change behavior. Differential Revision: https://phabricator.services.mozilla.com/D180465
* style: Avoid selecting zero-resolution images in image-setEmilio Cobos Álvarez2023-11-241-7/+11
| | | | | | | Fairly straight-forward. This fixes the two tests mentioned in comment 0 which aren't still in the repo. Differential Revision: https://phabricator.services.mozilla.com/D180414
* Further changes required by ServoOriol Brufau2023-11-241-7/+4
|
* style: Add method to parse CSS filters without context for workersAndrew Osmond2023-11-242-0/+93
| | | | | | | | This patch adds the ability to parse most CSS filters without a context. OffscreenCanvas can use this on worker threads to provide support for filter operations. Differential Revision: https://phabricator.services.mozilla.com/D179994
* style: Serialize NaN and infinity numbersCanadaHonk2023-11-243-23/+37
| | | | | | | | | | | | | | | | | Added NaN/inf serialization of <number> and changed calc() code to not remove NaN/infinity in code using it. This change is unfortunately imperfect as some things using <number> still refuse to serialize NaN/infinity for some reason (scale()?), but this bug/patch is just for <number> so leaving that out of scope for this. Also added new WPT test file for number NaN/inf serialization based on existing serialization tests (all pass already!). 5 other WPT subtests now newly pass. Differential Revision: https://phabricator.services.mozilla.com/D178587
* style: Forbid negative CSS resolutions at parse timeEmilio Cobos Álvarez2023-11-242-2/+2
| | | | | | | | | | Apply some clang-tidy suggestions while I was going through the ServoStyleConstsInlines while at it. Remove one 0x test because it's tested on the same test and causes a harness error. Differential Revision: https://phabricator.services.mozilla.com/D180331
* style: Make flex-flow serialization interoperableTing-Yu Lin2023-11-241-1/+15
| | | | Differential Revision: https://phabricator.services.mozilla.com/D180270
* Further changes required by ServoOriol Brufau2023-11-241-1/+0
|
* style: Remove viewport rule codeEmilio Cobos Álvarez2023-11-2413-1218/+3
| | | | | | | Turns out Servo doesn't need this either, see https://github.com/servo/servo/pull/29850. Differential Revision: https://phabricator.services.mozilla.com/D180264
* Further changes required by ServoOriol Brufau2023-11-242-3/+17
|
* style: Unify parallel and sequential traversal schedulingEmilio Cobos Álvarez2023-11-245-292/+150
| | | | | | | Use in_place_scope_fifo to spawn work into the thread pool while doing work in the main thread. Differential Revision: https://phabricator.services.mozilla.com/D179492
* style: Remove :nth-child(... of) prefEmilio Cobos Álvarez2023-11-241-1/+1
| | | | | | We ship this, and the front-end uses it by default, so remove the pref. Differential Revision: https://phabricator.services.mozilla.com/D180222
* style: Send offset-position to the compositorBoris Chiou2023-11-241-0/+1
| | | | | | | | | | We send offset-position to the compositor, just like other similar properties, e.g. offset-rotate, offset-anchor. This includes extracting this animation value, doing serialization and sending it via IPC. So now we can run the animation of ray() on the compositor properly. Differential Revision: https://phabricator.services.mozilla.com/D179862
* style: Add at <position> into ray() in style systemBoris Chiou2023-11-244-33/+86
| | | | | | | | | | | | We reuse PositionOrAuto here, and let "auto" represent the situation when the author omits "at <position>" because it has a special meaning. https://drafts.fxtf.org/motion-1/#valdef-ray-at-position Note: No need to update css/motion/parsing/offset-path-parsing-valid.html because Blink added some to the upstream repo already. Differential Revision: https://phabricator.services.mozilla.com/D179860
* style: Return Err() in to_animated_zero() for offset-pathBoris Chiou2023-11-241-3/+8
| | | | | | | | It's unnecessary to implement ToAnimatedZero for this property and so we return Err(()), just like other properties which also use basic shapes, e.g. clip-path, shape-outside. Differential Revision: https://phabricator.services.mozilla.com/D179859
* style: Change some references to raw pointers in some FFI functionsEmilio Cobos Álvarez2023-11-241-2/+2
| | | | | | | | Even tho https://github.com/rust-lang/rust/issues/112337 is IMO a rust bug, it's easy to work around in our code and it doesn't really affect expressiveness. Differential Revision: https://phabricator.services.mozilla.com/D180065
* Further changes required by ServoOriol Brufau2023-11-241-1/+2
|
* style: Make content-visibility: auto forces contain-intrinsic-size to gain ↵Jihye Hong2023-11-242-0/+41
| | | | | | | | | | an auto value When the content having `content-visibility: auto` and the specific value for `contain-intrinsic-size` is slightly out of the viewport, its computed value keeps changing. This patch makes `content-visibilty: auto` forces `contain-intrinsic-size` to gain an auto value to solve this issue. Differential Revision: https://phabricator.services.mozilla.com/D174583
* Further changes required by ServoOriol Brufau2023-11-243-6/+6
|
* style: Update serde_with to 3.0.0Mike Hommey2023-11-244-9/+9
| | | | | | We upgrade enumset alongside so that we keep only one copy of darling. Differential Revision: https://phabricator.services.mozilla.com/D179651
* style: Update the syntax of offset-positionBoris Chiou2023-11-247-13/+72
| | | | | | | | | | | | | | | Now it supports "normal" keyword. Also, offset-position doesn't create stacking context and it doesn't have offset transform, so we can simplify CompareMotionValues() a little bit. Note: We don't have to add test in [1] because Blink added one to WPT upstream repo already. [1] css/motion/parsing/offset-position-parsing-valid.html Note: the usage of offset-position is in other bugs. Differential Revision: https://phabricator.services.mozilla.com/D179623