| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index 2db28fbdbfe5ed72ccc9c380b25e3289229df80d..7223c5e234d13944a9798e9e98419a167d2268ef 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() const
|
| +{
|
| + if (RuntimeEnabledFeatures::scrollTopLeftInteropEnabled()) {
|
| + if (inQuirksMode()) {
|
| + // TODO(rbyers): This detail is under debate on www-style. crbug.com/475531
|
| + if (body()->layoutBox() && body()->layoutBox()->hasOverflowClip())
|
| + return nullptr;
|
| +
|
| + return body();
|
| + }
|
| +
|
| + return documentElement();
|
| + }
|
| +
|
| + return body();
|
| +}
|
| +
|
| /*
|
| * Performs three operations:
|
| * 1. Convert control characters to spaces
|
|
|