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

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

Issue 1075393002: Implement Document.scrollingElement API behind experimental feature flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Minor fix and comment tweak Created 5 years, 8 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/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 2db28fbdbfe5ed72ccc9c380b25e3289229df80d..8f72548b4d0c696bb36f5e209166e19255a003bb 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1266,6 +1266,23 @@ PassRefPtrWillBeRawPtr<Range> Document::caretRangeFromPoint(int x, int y)
return Range::createAdjustedToTreeScope(*this, rangeCompliantPosition);
}
+Element* Document::scrollingElement()
+{
+ if (RuntimeEnabledFeatures::scrollTopLeftInteropEnabled()) {
+ if (inQuirksMode()) {
+ updateLayoutIgnorePendingStylesheets();
+ if (body()->layoutBox() && body()->layoutBox()->hasOverflowClip())
+ return nullptr;
+
+ return body();
+ }
+
+ return documentElement();
+ }
+
+ return body();
+}
+
/*
* Performs three operations:
* 1. Convert control characters to spaces
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698