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

Issue 51553002: Fix body.scrollTop/Left for scrollable <body> tags (Closed)

Created:
7 years, 1 month ago by tonikitoo_
Modified:
6 years, 10 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Fix body.scrollTop/Left for scrollable <body> tags Blink was erroneously not setting (and getting) the scrollTop and scrollLeft properties of a scrollable body element. As per the spec [1], if an element (including body) has a scrollable area, being it overflown or not, set and get scroll{Top,Left} should apply to the element itself, in both quirks and strict modes. What Blink used to do instead was to apply these properties to the document viewport. Patch changes it to now match Gecko in that regard. - Note: "scrollable body" above actually refers to a body element that has a scrollable area which differs from the viewport's scrollable area, if any. - Note2: scrollTop/Left were already working properly for other elements (see dom/Element.cpp), but only body differs. Additionally, the patch removes a couple of out of date comments in Element::setScrollTop and Element::setScrollTop, after https://www.w3.org/Bugs/Public/show_bug.cgi?id=23448 got fixed. [1] http://dev.w3.org/csswg/cssom-view/#dom-element-scrolltop Test: fast/dom/Element/scrollTop-scrollLeft-body.html BUG=312435 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165969

Patch Set 1 #

Total comments: 5

Patch Set 2 : #

Total comments: 3

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+296 lines, -5 lines) Patch
A LayoutTests/fast/dom/Element/resources/display-none-body-quirks.html View 1 chunk +15 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Element/resources/display-none-body-strict.html View 1 chunk +16 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Element/resources/overflow-hidden-scrollable-body-quirks.html View 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Element/resources/overflow-hidden-scrollable-body-strict.html View 1 chunk +16 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Element/resources/overflow-scroll-non-scrollable-body-quirks.html View 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Element/resources/overflow-scroll-non-scrollable-body-strict.html View 1 chunk +15 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Element/resources/overflow-scroll-scrollable-body-quirks.html View 1 chunk +15 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Element/resources/overflow-scroll-scrollable-body-strict.html View 1 chunk +16 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Element/scrollTop-scrollLeft-body.html View 1 2 1 chunk +88 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Element/scrollTop-scrollLeft-body-expected.txt View 1 1 chunk +49 lines, -0 lines 0 comments Download
M Source/core/html/HTMLBodyElement.cpp View 1 2 5 chunks +38 lines, -5 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
tonikitoo_
7 years, 1 month ago (2013-10-29 22:26:28 UTC) #1
Julien - ping for review
As said on IRC, I would like to see a runtime flag. The more changes ...
7 years, 1 month ago (2013-11-01 16:49:14 UTC) #2
tonikitoo_
On 2013/11/01 16:49:14, Julien Chaffraix - PST wrote: > As said on IRC, I would ...
7 years, 1 month ago (2013-11-04 18:13:45 UTC) #3
tonikitoo_
On 2013/11/01 16:49:14, Julien Chaffraix - AEDT wrote: > https://codereview.chromium.org/51553002/diff/1/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-body.html > File LayoutTests/fast/dom/Element/scrollTop-scrollLeft-body.html (right): > ...
7 years, 1 month ago (2013-11-14 14:47:05 UTC) #4
tonikitoo_
6 years, 11 months ago (2014-01-23 19:07:43 UTC) #5
tonikitoo_
6 years, 11 months ago (2014-01-23 19:59:33 UTC) #6
tonikitoo_
6 years, 11 months ago (2014-01-23 20:01:15 UTC) #7
tonikitoo_
On 2013/11/14 14:47:05, tonikitoo_ wrote: > On 2013/11/01 16:49:14, Julien Chaffraix - AEDT wrote: > ...
6 years, 11 months ago (2014-01-23 20:01:52 UTC) #8
tonikitoo_
Jan 23 17:30:05 <jchaffraix> tonikitoo: looking .. Jan 23 17:33:29 <jchaffraix> tonikitoo: that sounds reasonnable ...
6 years, 10 months ago (2014-01-28 15:44:33 UTC) #9
Julien - ping for review
lgtm https://codereview.chromium.org/51553002/diff/130001/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-body.html File LayoutTests/fast/dom/Element/scrollTop-scrollLeft-body.html (right): https://codereview.chromium.org/51553002/diff/130001/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-body.html#newcode9 LayoutTests/fast/dom/Element/scrollTop-scrollLeft-body.html:9: // Need to wait on both inner frames ...
6 years, 10 months ago (2014-01-28 18:03:29 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/a1.gomes@sisa.samsung.com/51553002/150001
6 years, 10 months ago (2014-01-28 19:35:58 UTC) #11
commit-bot: I haz the power
Change committed as 165969
6 years, 10 months ago (2014-01-28 22:20:27 UTC) #12
commit-bot: I haz the power
6 years, 10 months ago (2014-01-28 22:21:49 UTC) #13
Message was sent while issue was closed.
CQ bit was unchecked on CL. Ignoring.

Powered by Google App Engine
This is Rietveld 408576698