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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 1942623002: Rename Document::ownerElement to localOwner and fix main frame checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove duplication in const overload Created 4 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
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 70e2509cb39ec661154035ac38b7e44ec691b6e9..5c5d61173fbe0aa549a05748e4402a567a6e8427 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -543,7 +543,7 @@ void LayoutBox::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignmen
newRect = getScrollableArea()->scrollIntoView(rect, alignX, alignY, scrollType);
} else if (!parentBox && canBeProgramaticallyScrolled()) {
if (FrameView* frameView = this->frameView()) {
- HTMLFrameOwnerElement* ownerElement = document().ownerElement();
+ HTMLFrameOwnerElement* ownerElement = document().localOwnerElement();
if (!isDisallowedAutoscroll(ownerElement, frameView)) {
if (makeVisibleInVisualViewport) {
frameView->getScrollableArea()->scrollIntoView(rect, alignX, alignY, scrollType);
@@ -855,8 +855,8 @@ IntSize LayoutBox::calculateAutoscrollDirection(const IntPoint& pointInRootFrame
LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* layoutObject)
{
while (layoutObject && !(layoutObject->isBox() && toLayoutBox(layoutObject)->canAutoscroll())) {
- if (!layoutObject->parent() && layoutObject->node() == layoutObject->document() && layoutObject->document().ownerElement())
- layoutObject = layoutObject->document().ownerElement()->layoutObject();
+ if (!layoutObject->parent() && layoutObject->node() == layoutObject->document() && layoutObject->document().localOwnerElement())
+ layoutObject = layoutObject->document().localOwnerElement()->layoutObject();
else
layoutObject = layoutObject->parent();
}

Powered by Google App Engine
This is Rietveld 408576698