Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(545)

Issue 2870983002: Update return value of getComputedStyle for sticky elements (Closed)

Created:
3 years, 7 months ago by yigu
Modified:
3 years, 7 months ago
Reviewers:
flackr, Rick Byers
CC:
chromium-reviews, blink-reviews-style_chromium.org, blink-reviews-css, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Update return value of getComputedStyle for sticky elements Top/bottom/left/right have special meaning for sticky elements. So when calling getComputedStyle on sticky elements whose style contains "top: auto;", we should return "auto" rather than "0px" to eliminate ambiguity. Chromium followed the spec which specifies that getComputedStyle should return used value (0px) for sticky elements with "top: auto;". That is incorrect. A spec issue has been added: https://github.com/w3c/csswg-drafts/issues/1346 BUG=703816 TEST=LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html Review-Url: https://codereview.chromium.org/2870983002 Cr-Commit-Position: refs/heads/master@{#471185} Committed: https://chromium.googlesource.com/chromium/src/+/c6fcc669f0a2e7d8f9cbf99704a1ca4ca3a8c77f

Patch Set 1 #

Total comments: 6

Patch Set 2 : nit #

Total comments: 2

Patch Set 3 : nit #

Total comments: 4

Patch Set 4 : nit #

Patch Set 5 : Update test with testharness.js #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -1 line) Patch
A third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html View 1 2 3 4 1 chunk +42 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 23 (10 generated)
yigu
This patch only focuses on position: sticky. "fixed" or "absolute" still return used value which ...
3 years, 7 months ago (2017-05-09 20:09:37 UTC) #2
flackr
https://codereview.chromium.org/2870983002/diff/1/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html File third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html (right): https://codereview.chromium.org/2870983002/diff/1/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html#newcode12 third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html:12: top: 2px; nit: use top: 0px to showcase the ...
3 years, 7 months ago (2017-05-09 20:26:35 UTC) #3
yigu
Thanks Rob. PTAL. https://codereview.chromium.org/2870983002/diff/1/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html File third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html (right): https://codereview.chromium.org/2870983002/diff/1/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html#newcode12 third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html:12: top: 2px; On 2017/05/09 20:26:34, flackr ...
3 years, 7 months ago (2017-05-09 20:43:58 UTC) #4
flackr
https://codereview.chromium.org/2870983002/diff/20001/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp File third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp (right): https://codereview.chromium.org/2870983002/diff/20001/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp#newcode229 third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp:229: return CSSIdentifierValue::Create(CSSValueAuto); This extra condition should no longer be ...
3 years, 7 months ago (2017-05-09 20:45:53 UTC) #5
yigu
Thanks. Have updated the patch. https://codereview.chromium.org/2870983002/diff/20001/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp File third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp (right): https://codereview.chromium.org/2870983002/diff/20001/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp#newcode229 third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp:229: return CSSIdentifierValue::Create(CSSValueAuto); On 2017/05/09 ...
3 years, 7 months ago (2017-05-09 21:08:06 UTC) #6
flackr
LGTM with nits. https://codereview.chromium.org/2870983002/diff/40001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html File third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html (right): https://codereview.chromium.org/2870983002/diff/40001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html#newcode21 third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html:21: <body> nit: I think the body ...
3 years, 7 months ago (2017-05-09 21:21:42 UTC) #7
yigu
Thanks Rob for the review. https://codereview.chromium.org/2870983002/diff/40001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html File third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html (right): https://codereview.chromium.org/2870983002/diff/40001/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html#newcode21 third_party/WebKit/LayoutTests/fast/css/sticky/sticky-top-auto-get-computedstyle.html:21: <body> On 2017/05/09 21:21:41, ...
3 years, 7 months ago (2017-05-09 21:35:20 UTC) #8
Rick Byers
LGTM Please ensure a spec issue is filed for this (describing this as existing behavior) ...
3 years, 7 months ago (2017-05-09 21:42:39 UTC) #9
smcgruer
On 2017/05/09 21:42:39, Rick Byers wrote: > LGTM > > Please ensure a spec issue ...
3 years, 7 months ago (2017-05-10 13:12:12 UTC) #10
yigu
On 2017/05/10 13:12:12, smcgruer wrote: > On 2017/05/09 21:42:39, Rick Byers wrote: > > LGTM ...
3 years, 7 months ago (2017-05-10 15:23:19 UTC) #14
Rick Byers
Thanks for updating the test, still LGTM.
3 years, 7 months ago (2017-05-10 17:53:14 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2870983002/80001
3 years, 7 months ago (2017-05-11 23:10:24 UTC) #20
commit-bot: I haz the power
3 years, 7 months ago (2017-05-12 02:21:01 UTC) #23
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/c6fcc669f0a2e7d8f9cbf99704a1...

Powered by Google App Engine
This is Rietveld 408576698