Add overflow default property for replaced element #51873
+41
−0
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.
Set default value for overflow property to replaced element. This is based on https://drafts.csswg.org/css-overflow-4/#overflow-control
We already implement the first half of the above spec previously.
Note that in chromium, author can change the overflow value of
img
,video
, and canvas, but not foriframe
,embed
, and object. In Firefox, you cannot change the value for all above element.https://jsfiddle.net/7m98gqsk/
There is also a possibility of handling this attribute somewhere in the rust code so that we do not have to change the UA stylesheet for every new replaced element. But for now, I just change the UA stylesheet just like mentioned in the spec.
Testing: this change does not change any result of the current test.
Fixes: #35950
Try: http://github.com/PotatoCP/servo/actions/runs/14303000315
cc: @xiaochengh @d-desiatkin
Reviewed in servo/servo#36303