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

Unified Diff: Source/core/dom/Element.cpp

Issue 641643004: Reapply the non-MathExtras parts of (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/resolver/TransformBuilder.cpp ('k') | Source/core/rendering/RenderText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « Source/core/css/resolver/TransformBuilder.cpp ('k') | Source/core/rendering/RenderText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698