Repository navigation
Update Stylo to "Always borrow applicable declarations" - #64006
Open
servo-wpt-sync wants to merge 1 commit into
Open
servo-wpt-sync wants to merge 1 commit into
servo-wpt-sync wants to merge 1 commit into
Conversation
wpt-pr-bot
approved these changes
Oct 21, 2026
wpt-pr-bot
left a comment
Collaborator
There was a problem hiding this comment.
The review process for this patch is being conducted in the Servo project.
servo-wpt-sync
force-pushed
the
servo_export_48031
branch
2 times, most recently
from
October 26, 2026 14:34
4a7d915 to
b9daf75
Compare
servo-wpt-sync
force-pushed
the
servo_export_48031
branch
6 times, most recently
from
November 4, 2026 22:57
32eead3 to
dd2db26
Compare
This requires refactoring the computation of presentational hints to something closer to Gecko. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
servo-wpt-sync
force-pushed
the
servo_export_48031
branch
from
November 5, 2026 09:02
dd2db26 to
cf96937
Compare
This branch has not been deployed
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.
Mainly, the problem is that the change upstream changed
ApplicableDeclarationBlockto contain aStyleSourceBorrowinstead of aStyleSource. And this impactssynthesize_presentational_hints_for_legacy_attributes(), since it usesApplicableDeclarationBlock.This requires refactoring the computation of presentational hints to something closer to Gecko: instead of producing them on the fly during style resolution, we now compute them beforehand, and cache them.
Caching them directly on
Elementwould have increased its size. So again I used an approach similar to Gecko: theAttributeStoragewill now use aHeaderSliceinstead of aVec. This way we can store the presentational hints in the header. In fact, this approach reduces the size ofElement.Testing: No behavior change, but adding a new test that would have crashed with a previous iteration of this patch. Unit tests check ensure that
Elementis now smaller.Stylo PR: servo/stylo#461
Reviewed in servo/servo#48031