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

Unified Diff: Source/core/html/HTMLBodyElement.cpp

Issue 25741004: set and get scrollTop/Left through documentElement and body should be symmetric, according to the d… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: set and get scrollTop/Left through documentElement and body should be symmetric, according to the d… Created 7 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/dom/Element.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLBodyElement.cpp
diff --git a/Source/core/html/HTMLBodyElement.cpp b/Source/core/html/HTMLBodyElement.cpp
index eed6b0ccc044ff4651261af1214e5e0907678360..23d1423fef1a73f7031cb4cf8993ed8a7b8071be 100644
--- a/Source/core/html/HTMLBodyElement.cpp
+++ b/Source/core/html/HTMLBodyElement.cpp
@@ -268,6 +268,9 @@ int HTMLBodyElement::scrollLeft()
void HTMLBodyElement::setScrollLeft(int scrollLeft)
{
+ if (!document().inQuirksMode())
+ return;
+
Document& document = this->document();
document.updateLayoutIgnorePendingStylesheets();
Frame* frame = document.frame();
@@ -296,6 +299,9 @@ int HTMLBodyElement::scrollTop()
void HTMLBodyElement::setScrollTop(int scrollTop)
{
+ if (!document().inQuirksMode())
+ return;
+
Document& document = this->document();
document.updateLayoutIgnorePendingStylesheets();
Frame* frame = document.frame();
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698