Resolve the percentage values of inset properties against proper box.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 May 2019 13:19:57 +0000 (13:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 May 2019 13:19:57 +0000 (13:19 +0000)
commit3150fa7f0ad09693c115c6ac19a2d3ebe73187e2
treebefc664288c07b0fcb89c78b7b5b531d38439617
parentcae30dc9928901187e7bd5fd3e0269fe42ac8f8e
Resolve the percentage values of inset properties against proper box.
https://bugs.webkit.org/show_bug.cgi?id=189549

Patch by Joonghun Park <jh718.park@samsung.com> on 2019-05-03
Reviewed by Antti Koivisto.

Before this CL, sticky element's layout was executed relative to
a box's overflow container,
but the value returned by getComputedStyle was resolved against
its containing block.

So, the computed value and the actual value used in layout
was different before this change.

LayoutTests/imported/w3c:

* web-platform-tests/css/cssom/getComputedStyle-insets-sticky-container-for-abspos-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-sticky-expected.txt.
* web-platform-tests/css/cssom/getComputedStyle-insets-sticky-container-for-abspos.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-sticky.html.
* web-platform-tests/css/cssom/getComputedStyle-insets-sticky-expected.txt:
* web-platform-tests/css/cssom/getComputedStyle-insets-sticky.html:
* web-platform-tests/css/cssom/getComputedStyle-sticky-pos-percent-expected.txt: Added.
* web-platform-tests/css/cssom/getComputedStyle-sticky-pos-percent.html: Added.
* web-platform-tests/css/cssom/support/getComputedStyle-insets.js:
(runTestsWithWM):

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-sticky-container-for-abspos.html
       imported/w3c/web-platform-tests/css/cssom/getComputedStyle-sticky-pos-percent.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::positionOffsetValue):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::enclosingScrollportBox const):
* rendering/RenderBox.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-sticky-container-for-abspos-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-sticky-container-for-abspos.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-sticky-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-sticky.html
LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-sticky-pos-percent-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-sticky-pos-percent.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/cssom/support/getComputedStyle-insets.js
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h