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

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

Issue 25039006: document.documentElement.scrollTop/Left is zero (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: document.documentElement.scrollTop/Left is zero Created 7 years, 3 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
« Source/core/dom/Element.cpp ('K') | « 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 ecf39231e90c8bee182b61938d351ffe0d36ffd0..d8c9fb2eb4d8426cc3cc6610a9366bb1e9363d77 100644
--- a/Source/core/html/HTMLBodyElement.cpp
+++ b/Source/core/html/HTMLBodyElement.cpp
@@ -253,6 +253,9 @@ static int adjustForZoom(int value, Document* document)
int HTMLBodyElement::scrollLeft()
{
+ if (!document().inQuirksMode())
+ return 0;
+
// Update the document's layout.
Document& document = this->document();
document.updateLayoutIgnorePendingStylesheets();
@@ -275,6 +278,9 @@ void HTMLBodyElement::setScrollLeft(int scrollLeft)
int HTMLBodyElement::scrollTop()
{
+ if (!document().inQuirksMode())
+ return 0;
Julien - ping for review 2013/09/30 23:39:57 Is this totally correct? Step 4 of scrollTop says
tonikitoo_ 2013/10/01 14:42:17 This is a valid observation! I believe the specifi
Julien - ping for review 2013/10/01 15:19:51 Clarifying the specification is definitely the way
+
// Update the document's layout.
Document& document = this->document();
document.updateLayoutIgnorePendingStylesheets();
« Source/core/dom/Element.cpp ('K') | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698