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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp

Issue 2290353002: Fix crash when scrolling in a remote process frame (Closed)
Patch Set: Added TODOs Created 4 years, 4 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 | « no previous file | third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
diff --git a/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp b/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
index 8fc0647065efa0b7900508e884af631613518610..3bc682f83477506947c25c7eb340f8caa45b92d5 100644
--- a/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
@@ -26,7 +26,7 @@ bool fillsViewport(const Element& element)
LayoutObject* layoutObject = element.layoutObject();
- // TODO(bokan): Broken for OOPIF.
+ // TODO(bokan): Broken for OOPIF. crbug.com/642378.
Document& topDocument = element.document().topDocument();
Vector<FloatQuad> quads;
@@ -159,6 +159,13 @@ bool RootScrollerController::isViewportScrollCallback(
// do the comparison.
DCHECK(!m_document->isInMainFrame());
+ // If we don't have a local owner we must be in a remote iframe.
+ // RootScrollerController doesn't yet work in OOPIF and in any case we have
+ // no way to get at the ViewportScrollCallback so just return false.
+ // TODO(bokan): Make document.rootScroller work in OOPIF. crbug.com/642378.
+ if (!m_document->localOwner())
+ return false;
+
RootScrollerController* topDocumentController =
m_document->topDocument().rootScrollerController();
return topDocumentController->isViewportScrollCallback(callback);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698