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

Side by Side Diff: Source/web/ChromeClientImpl.cpp

Issue 27599002: A page should exit fullscreen mode if it opens a new popup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #include "WebTextDirection.h" 64 #include "WebTextDirection.h"
65 #include "WebUserGestureIndicator.h" 65 #include "WebUserGestureIndicator.h"
66 #include "WebUserGestureToken.h" 66 #include "WebUserGestureToken.h"
67 #include "WebViewClient.h" 67 #include "WebViewClient.h"
68 #include "WebViewImpl.h" 68 #include "WebViewImpl.h"
69 #include "WebWindowFeatures.h" 69 #include "WebWindowFeatures.h"
70 #include "bindings/v8/ScriptController.h" 70 #include "bindings/v8/ScriptController.h"
71 #include "core/accessibility/AXObjectCache.h" 71 #include "core/accessibility/AXObjectCache.h"
72 #include "core/accessibility/AccessibilityObject.h" 72 #include "core/accessibility/AccessibilityObject.h"
73 #include "core/dom/Document.h" 73 #include "core/dom/Document.h"
74 #include "core/dom/DocumentFullscreen.h"
74 #include "core/dom/Node.h" 75 #include "core/dom/Node.h"
75 #include "core/html/HTMLInputElement.h" 76 #include "core/html/HTMLInputElement.h"
76 #include "core/loader/DocumentLoader.h" 77 #include "core/loader/DocumentLoader.h"
77 #include "core/loader/FrameLoadRequest.h" 78 #include "core/loader/FrameLoadRequest.h"
78 #include "core/frame/Console.h" 79 #include "core/frame/Console.h"
79 #include "core/frame/FrameView.h" 80 #include "core/frame/FrameView.h"
80 #include "core/page/Page.h" 81 #include "core/page/Page.h"
81 #include "core/page/PagePopupDriver.h" 82 #include "core/page/PagePopupDriver.h"
82 #include "core/page/Settings.h" 83 #include "core/page/Settings.h"
83 #include "core/page/WindowFeatures.h" 84 #include "core/page/WindowFeatures.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 Page* ChromeClientImpl::createWindow( 232 Page* ChromeClientImpl::createWindow(
232 Frame* frame, const FrameLoadRequest& r, const WindowFeatures& features, Nav igationPolicy navigationPolicy) 233 Frame* frame, const FrameLoadRequest& r, const WindowFeatures& features, Nav igationPolicy navigationPolicy)
233 { 234 {
234 if (!m_webView->client()) 235 if (!m_webView->client())
235 return 0; 236 return 0;
236 237
237 WebNavigationPolicy policy = static_cast<WebNavigationPolicy>(navigationPoli cy); 238 WebNavigationPolicy policy = static_cast<WebNavigationPolicy>(navigationPoli cy);
238 if (policy == WebNavigationPolicyIgnore) 239 if (policy == WebNavigationPolicyIgnore)
239 policy = getNavigationPolicy(); 240 policy = getNavigationPolicy();
240 241
242 DocumentFullscreen::webkitCancelFullScreen(frame->document());
243
241 WebViewImpl* newView = toWebViewImpl( 244 WebViewImpl* newView = toWebViewImpl(
242 m_webView->client()->createView(WebFrameImpl::fromFrame(frame), WrappedR esourceRequest(r.resourceRequest()), features, r.frameName(), policy)); 245 m_webView->client()->createView(WebFrameImpl::fromFrame(frame), WrappedR esourceRequest(r.resourceRequest()), features, r.frameName(), policy));
243 if (!newView) 246 if (!newView)
244 return 0; 247 return 0;
245 return newView->page(); 248 return newView->page();
246 } 249 }
247 250
248 static inline void updatePolicyForEvent(const WebInputEvent* inputEvent, Navigat ionPolicy* policy) 251 static inline void updatePolicyForEvent(const WebInputEvent* inputEvent, Navigat ionPolicy* policy)
249 { 252 {
250 if (!inputEvent || inputEvent->type != WebInputEvent::MouseUp) 253 if (!inputEvent || inputEvent->type != WebInputEvent::MouseUp)
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 { 1007 {
1005 } 1008 }
1006 1009
1007 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title) 1010 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title)
1008 { 1011 {
1009 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); 1012 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title);
1010 } 1013 }
1011 #endif 1014 #endif
1012 1015
1013 } // namespace WebKit 1016 } // namespace WebKit
OLDNEW
« no previous file with comments | « LayoutTests/fullscreen/full-screen-exit-when-popup-expected.txt ('k') | Source/web/FrameLoaderClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698