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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2618323004: Don't force-update style and layout in Document::scrollingElement (Closed)
Patch Set: none Created 3 years, 11 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
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())

Powered by Google App Engine
This is Rietveld 408576698