Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Element::has_css_layout_box() #9309

Merged

Conversation

Projects
None yet
3 participants
@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Jan 31, 2018

Calling scroll() on an element which is not rendered (by a parent with
display: none) would previously cause a crash. In fact, we should
terminate the algorithm
[https://drafts.csswg.org/cssom-view/#dom-element-scroll] at step 10 in
this situation.

The fix hinges on implementing Element::has_css_layout_box() correctly,
rather than just returning true in all cases as we did previously.

Fixes #19430.

Upstreamed from servo/servo#19803 [ci skip]


This change is Reviewable

Implement Element::has_css_layout_box()
Calling scroll() on an element which is not rendered (by a parent with
display: none) would previously cause a crash. In fact, we should
terminate the algorithm
[https://drafts.csswg.org/cssom-view/#dom-element-scroll] at step 10 in
this situation.

The fix hinges on implementing Element::has_css_layout_box() correctly,
rather than just returning true in all cases as we did previously.

Fixes #19430.

Upstreamed from servo/servo#19803 [ci skip]
@servo-wpt-sync

This comment has been minimized.

Copy link
Collaborator Author

servo-wpt-sync commented Jan 31, 2018

Code reviewed upstream.

@servo-wpt-sync servo-wpt-sync merged commit 5ebb917 into master Jan 31, 2018

@jdm jdm deleted the sync_ad0e18319fc42680edc9029c5f817d0c359442b1 branch Jan 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.