Chromium Code Reviews
DescriptionEarly out if the scroll position passed in by js is NaN
This is interesting bug from slashdot.org. When the page is first loaded,
it has a js scroll call but a NaN scroll position is passed in.
We used to have IntPoint representing scrollPosition, and the scroll position
goes as:
double(NaN) -> static_cast<int> -> int(LONG/INT_MIN) -> adjusted to 0
and it happens to work that page is not scrolled with NaN scroll position.
Now that we change to use DoublePoint to represent scroll position, the NaN
value eventually gets adjusted to be the maximal scroll position and the page
will scroll to the bottom when loaded.
Instead of depending on the nasty conversion rule of NaN, lets make it specific
that if NaN is passed in, just early out in the scrolling path.
BUG=424987
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184210
Patch Set 1 #
Total comments: 1
Patch Set 2 : address comments #
Total comments: 8
Patch Set 3 : address comments #
Total comments: 8
Patch Set 4 : address comments #
Messages
Total messages: 12 (2 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||