Chromium Code Reviews| 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(); |