Index: third_party/WebKit/Source/core/dom/Document.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
index f42226205775d7df98216f125d44c20a63f005cc..bb7fa1e5091a70a720fe9b6407e4ec3930f6e6ee 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -1345,9 +1345,15 @@ Range* Document::caretRangeFromPoint(int x, int y) { |
} |
Element* Document::scrollingElement() { |
+ if (RuntimeEnabledFeatures::scrollTopLeftInteropEnabled() && inQuirksMode()) |
+ updateStyleAndLayoutTree(); |
+ return scrollingElementNoLayout(); |
+} |
+ |
+Element* Document::scrollingElementNoLayout() { |
if (RuntimeEnabledFeatures::scrollTopLeftInteropEnabled()) { |
if (inQuirksMode()) { |
- updateStyleAndLayoutTree(); |
+ DCHECK(m_lifecycle.state() >= DocumentLifecycle::StyleClean); |
HTMLBodyElement* body = firstBodyElement(); |
if (body && body->layoutObject() && |
body->layoutObject()->hasOverflowClip()) |