mirror of
https://github.com/servo/servo.git
synced 2025-07-02 13:03:43 +01:00
There are two key steps when resolving text styles with `::first-line`: 1. `ResolveStyleForText` computes the initial style of the text via `Servo_ComputedValues_Inherit` 2. `ReparentStyleContext` is called to update style data when the first line of text is moved to be a child of the `::first-line` frame Before this patch, `Servo_ComputedValues_Inherit` would clear out unvisited rules, but visited styles (with rules inside) were cloned as-is, meaning that step 1 might leave the text node with a style that has: * Unvisited rules: None * Visited rules: Some When we later go to step 2 and re-parent onto the `::first-line` styles, we try to cascade with these leftover visited rules. This causes any `::first-line` styles from our parent to be overridden by these rules which are no longer quite right for the new frame tree. In this patch, we resolve this by changing `StyleBuilder::for_inheritance` (which is used by step 1's `Servo_ComputedValues_Inherit`) to also clear out visited rules, so that we use the same logic for both unvisited and visited text styles when reparenting onto the `::first-line` frame. MozReview-Commit-ID: 3sgc4eGHBXs |
||
---|---|---|
.. | ||
atoms | ||
bluetooth | ||
bluetooth_traits | ||
canvas | ||
canvas_traits | ||
compositing | ||
config | ||
constellation | ||
debugger | ||
deny_public_fields | ||
devtools | ||
devtools_traits | ||
dom_struct | ||
domobject_derive | ||
fallible | ||
geometry | ||
gfx | ||
gfx_traits | ||
hashglobe | ||
jstraceable_derive | ||
layout | ||
layout_thread | ||
layout_traits | ||
lru_cache | ||
malloc_size_of | ||
malloc_size_of_derive | ||
metrics | ||
msg | ||
net | ||
net_traits | ||
profile | ||
profile_traits | ||
rand | ||
range | ||
remutex | ||
script | ||
script_layout_interface | ||
script_plugins | ||
script_traits | ||
selectors | ||
servo | ||
servo_arc | ||
size_of_test | ||
style | ||
style_derive | ||
style_traits | ||
url | ||
webdriver_server | ||
webvr | ||
webvr_traits |