DescriptionFix 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 : #Messages
Total messages: 13 (0 generated)
|