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

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=198784 #17323

Merged

Conversation

alijuma
Copy link
Contributor

@alijuma alijuma commented Jun 13, 2019

@alijuma
Copy link
Contributor Author

alijuma commented Jun 13, 2019

Already approved downstream.

@alijuma alijuma merged commit 38d6051 into web-platform-tests:master Jun 13, 2019
philn pushed a commit to philn/old-webkit that referenced this pull request Jun 15, 2019
…ment

https://bugs.webkit.org/show_bug.cgi?id=198784

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Import web-platform-tests/wpt#17323.

* web-platform-tests/intersection-observer/root-margin-root-element-expected.txt: Added.
* web-platform-tests/intersection-observer/root-margin-root-element.html: Added.

Source/WebCore:

When computing a target's bounds in root space, we were applying the root's
clip rect (if any), and then intersecting with the root rect expanded by the
root margin. This meant that if a target did not intersect the non-expanded root
rect, we would get an empty intersection even if the target did intersect the
expanded root rect. Fix this by not applying the root's clip rect when computing
a target's bounds in root space. Add a new VisibleRectContextOption::ApplyContainerClip
that determines whether RenderObject::computeVisibleRectInContainer should apply
the container's clip.

Test: imported/w3c/web-platform-tests/intersection-observer/root-margin-root-element.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::applyCachedClipAndScrollPosition const):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::visibleRectContextForRepaint):
* rendering/RenderObject.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@246432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants