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

Unified Diff: Source/web/PageWidgetDelegate.cpp

Issue 336553003: Change Page::m_mainFrame to be a Frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 6 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/web/InspectorFrontendClientImpl.cpp ('k') | Source/web/WebDevToolsAgentImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PageWidgetDelegate.cpp
diff --git a/Source/web/PageWidgetDelegate.cpp b/Source/web/PageWidgetDelegate.cpp
index 68a0070d299b1332cca69ea583c952c5ebbeb4ee..02f1c47be8eb97f3145a27573448eb436ff8e679 100644
--- a/Source/web/PageWidgetDelegate.cpp
+++ b/Source/web/PageWidgetDelegate.cpp
@@ -54,7 +54,9 @@ static inline FrameView* mainFrameView(Page* page)
// FIXME: Can we remove this check?
if (!page->mainFrame())
return 0;
- return page->mainFrame()->view();
+ if (!page->mainFrame()->isLocalFrame())
+ return 0;
+ return page->deprecatedLocalMainFrame()->view();
}
void PageWidgetDelegate::animate(Page* page, double monotonicFrameBeginTime)
@@ -85,7 +87,7 @@ void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas*
gc.save(); // Needed to save the canvas, not the GraphicsContext.
FrameView* view = mainFrameView(page);
// FIXME: Can we remove the mainFrame()->document() check?
- if (view && page->mainFrame()->document()) {
+ if (view && page->deprecatedLocalMainFrame()->document()) {
gc.clip(dirtyRect);
view->paint(&gc, dirtyRect);
if (overlays)
@@ -98,7 +100,7 @@ void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas*
bool PageWidgetDelegate::handleInputEvent(Page* page, PageWidgetEventHandler& handler, const WebInputEvent& event)
{
- LocalFrame* frame = page ? page->mainFrame() : 0;
+ LocalFrame* frame = page && page->mainFrame()->isLocalFrame() ? page->deprecatedLocalMainFrame() : 0;
switch (event.type) {
// FIXME: WebKit seems to always return false on mouse events processing
« no previous file with comments | « Source/web/InspectorFrontendClientImpl.cpp ('k') | Source/web/WebDevToolsAgentImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698