| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index e6adcbf20803289c0b34ae37f93e15ae70b84cb8..63162b5f190958312a3b58fc108cc2480d829d08 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -665,9 +665,12 @@ void Element::setScrollLeft(double newLeft)
|
| {
|
| document().updateLayoutIgnorePendingStylesheets();
|
|
|
| + if (std::isnan(newLeft))
|
| + return;
|
| +
|
| if (document().documentElement() != this) {
|
| RenderBox* rend = renderBox();
|
| - if (rend && !std::isnan(newLeft))
|
| + if (rend)
|
| rend->setScrollLeft(LayoutUnit::fromFloatRound(newLeft * rend->style()->effectiveZoom()));
|
| return;
|
| }
|
| @@ -712,9 +715,12 @@ void Element::setScrollTop(double newTop)
|
| {
|
| document().updateLayoutIgnorePendingStylesheets();
|
|
|
| + if (std::isnan(newTop))
|
| + return;
|
| +
|
| if (document().documentElement() != this) {
|
| RenderBox* rend = renderBox();
|
| - if (rend && !std::isnan(newTop))
|
| + if (rend)
|
| rend->setScrollTop(LayoutUnit::fromFloatRound(newTop * rend->style()->effectiveZoom()));
|
| return;
|
| }
|
|
|