| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index 3fbc3c43508309278c1bade06826703856a2de2e..a3807aec2b78bdc81ec01a43bcb432c81df92be3 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -663,7 +663,8 @@ void Element::setScrollLeft(double newLeft)
|
| document().updateLayoutIgnorePendingStylesheets();
|
|
|
| if (document().documentElement() != this) {
|
| - if (RenderBox* rend = renderBox())
|
| + RenderBox* rend = renderBox();
|
| + if (rend && !std::isnan(newLeft))
|
| rend->setScrollLeft(LayoutUnit::fromFloatRound(newLeft * rend->style()->effectiveZoom()));
|
| return;
|
| }
|
| @@ -709,7 +710,8 @@ void Element::setScrollTop(double newTop)
|
| document().updateLayoutIgnorePendingStylesheets();
|
|
|
| if (document().documentElement() != this) {
|
| - if (RenderBox* rend = renderBox())
|
| + RenderBox* rend = renderBox();
|
| + if (rend && !std::isnan(newTop))
|
| rend->setScrollTop(LayoutUnit::fromFloatRound(newTop * rend->style()->effectiveZoom()));
|
| return;
|
| }
|
|
|