layout: Handle selection during display list construction#41963
Merged
mrobinson merged 1 commit intoservo:mainfrom Jan 21, 2026
Merged
layout: Handle selection during display list construction#41963mrobinson merged 1 commit intoservo:mainfrom
mrobinson merged 1 commit intoservo:mainfrom
Conversation
1d6aab5 to
60b689a
Compare
|
🔨 Triggering try run (#21074500955) for Linux (WPT) |
|
Test results for linux-wpt from try job (#21074500955): Flaky unexpected result (39)
Stable unexpected results that are known to be intermittent (28)
Stable unexpected results (79)
|
|
|
60b689a to
7b38203
Compare
|
🔨 Triggering try run (#21080084031) for Linux (WPT) |
|
Test results for linux-wpt from try job (#21080084031): Flaky unexpected result (32)
Stable unexpected results that are known to be intermittent (32)
Stable unexpected results (1)
|
|
|
Member
Author
|
This failure is actually a progression. The caret has started showing up correctly, but we now aren't handling |
42a239a to
ce3546d
Compare
|
🔨 Triggering try run (#21083907139) for Linux (WPT) |
|
Test results for linux-wpt from try job (#21083907139): Flaky unexpected result (40)
Stable unexpected results that are known to be intermittent (29)
|
|
✨ Try run (#21083907139) succeeded. |
187f4b7 to
56e0cf6
Compare
56e0cf6 to
e00ea88
Compare
50c0ab6 to
fb6396f
Compare
Loirooriol
approved these changes
Jan 20, 2026
| use style::values::generics::rect::Rect; | ||
| use style::values::specified::text::TextDecorationLine; | ||
| use style_traits::{CSSPixel as StyloCSSPixel, DevicePixel as StyloDevicePixel}; | ||
| use style_traits::{CSSPixel, CSSPixel as StyloCSSPixel, DevicePixel as StyloDevicePixel}; |
Contributor
There was a problem hiding this comment.
CSSPixel was already imported as StyloCSSPixel
Comment on lines
+931
to
+932
| containing_block: &euclid::Rect<Au, StyloCSSPixel>, | ||
| baseline_origin: Point2D<Au, CSSPixel>, |
Contributor
There was a problem hiding this comment.
Suggested change
| containing_block: &euclid::Rect<Au, StyloCSSPixel>, | |
| baseline_origin: Point2D<Au, CSSPixel>, | |
| containing_block: &PhysicalRect<Au>, | |
| baseline_origin: PhysicalPoint<Au>, |
fb6396f to
4911e48
Compare
Instead of handling selection in text input during box tree / fragment tree construction, fully handle it during display list construction. This means that when the selection changes in script, it updates automatically in the `FragmentTree` and only a new display list is necessary. This avoids a layout while changing the selection in text fields. Co-authored-by: Oriol Brufau <[email protected]> Signed-off-by: Martin Robinson <[email protected]>
4911e48 to
9281b4f
Compare
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 21, 2026
layout: Add support for `caret-color` This upgrades our version of `stylo` to one that supports `caret-color` and implements support for it during display list construction. Depends on: - #41963 - servo/stylo#287 Testing: This causes about 10 WPT tests to start passing. Signed-off-by: Martin Robinson <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of handling selection in text input during box tree / fragment
tree construction, fully handle it during display list construction.
This means that when the selection changes in script, it updates
automatically in the
FragmentTreeand only a new display list isnecessary. This avoids a layout while changing the selection in text
fields.
Testing: This fixes a few rendering issues, but these are very hard
to isolate and test for. It causes one test to start failing, but this is
because a cursor that wasn't rendered properly now starts showing
up.
Fixes: #41920.