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

Side by Side Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 9969112: Merge 112991 - WebViewImpl doesn't notify the page that the user has canceled fullscreen. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 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 unified diff | Download patch
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 , m_suppressNextKeypressEvent(false) 347 , m_suppressNextKeypressEvent(false)
348 , m_initialNavigationPolicy(WebNavigationPolicyIgnore) 348 , m_initialNavigationPolicy(WebNavigationPolicyIgnore)
349 , m_imeAcceptEvents(true) 349 , m_imeAcceptEvents(true)
350 , m_operationsAllowed(WebDragOperationNone) 350 , m_operationsAllowed(WebDragOperationNone)
351 , m_dragOperation(WebDragOperationNone) 351 , m_dragOperation(WebDragOperationNone)
352 , m_autofillPopupShowing(false) 352 , m_autofillPopupShowing(false)
353 , m_autofillPopup(0) 353 , m_autofillPopup(0)
354 , m_isTransparent(false) 354 , m_isTransparent(false)
355 , m_tabsToLinks(false) 355 , m_tabsToLinks(false)
356 , m_dragScrollTimer(adoptPtr(new DragScrollTimer)) 356 , m_dragScrollTimer(adoptPtr(new DragScrollTimer))
357 , m_isCancelingFullScreen(false)
357 #if USE(ACCELERATED_COMPOSITING) 358 #if USE(ACCELERATED_COMPOSITING)
358 , m_rootGraphicsLayer(0) 359 , m_rootGraphicsLayer(0)
359 , m_isAcceleratedCompositingActive(false) 360 , m_isAcceleratedCompositingActive(false)
360 , m_compositorCreationFailed(false) 361 , m_compositorCreationFailed(false)
361 , m_recreatingGraphicsContext(false) 362 , m_recreatingGraphicsContext(false)
362 #endif 363 #endif
363 #if ENABLE(INPUT_SPEECH) 364 #if ENABLE(INPUT_SPEECH)
364 , m_speechInputClient(SpeechInputClientImpl::create(client)) 365 , m_speechInputClient(SpeechInputClientImpl::create(client))
365 #endif 366 #endif
366 , m_deviceOrientationClientProxy(adoptPtr(new DeviceOrientationClientProxy(c lient ? client->deviceOrientationClient() : 0))) 367 , m_deviceOrientationClientProxy(adoptPtr(new DeviceOrientationClientProxy(c lient ? client->deviceOrientationClient() : 0)))
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 #endif 1307 #endif
1307 } 1308 }
1308 1309
1309 void WebViewImpl::willExitFullScreen() 1310 void WebViewImpl::willExitFullScreen()
1310 { 1311 {
1311 #if ENABLE(FULLSCREEN_API) 1312 #if ENABLE(FULLSCREEN_API)
1312 if (!m_fullScreenFrame) 1313 if (!m_fullScreenFrame)
1313 return; 1314 return;
1314 1315
1315 if (Document* doc = m_fullScreenFrame->document()) { 1316 if (Document* doc = m_fullScreenFrame->document()) {
1316 if (doc->webkitIsFullScreen()) 1317 if (doc->webkitIsFullScreen()) {
1318 // When the client exits from full screen we have to call webkitCanc elFullScreen to
1319 // notify the document. While doing that, suppress notifications bac k to the client.
1320 m_isCancelingFullScreen = true;
1321 doc->webkitCancelFullScreen();
1322 m_isCancelingFullScreen = false;
1317 doc->webkitWillExitFullScreenForElement(0); 1323 doc->webkitWillExitFullScreenForElement(0);
1324 }
1318 } 1325 }
1319 #endif 1326 #endif
1320 } 1327 }
1321 1328
1322 void WebViewImpl::didExitFullScreen() 1329 void WebViewImpl::didExitFullScreen()
1323 { 1330 {
1324 #if ENABLE(FULLSCREEN_API) 1331 #if ENABLE(FULLSCREEN_API)
1325 if (!m_fullScreenFrame) 1332 if (!m_fullScreenFrame)
1326 return; 1333 return;
1327 1334
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 return; 1549 return;
1543 } 1550 }
1544 1551
1545 // We need to transition to fullscreen mode. 1552 // We need to transition to fullscreen mode.
1546 if (m_client && m_client->enterFullScreen()) 1553 if (m_client && m_client->enterFullScreen())
1547 m_provisionalFullScreenElement = element; 1554 m_provisionalFullScreenElement = element;
1548 } 1555 }
1549 1556
1550 void WebViewImpl::exitFullScreenForElement(WebCore::Element* element) 1557 void WebViewImpl::exitFullScreenForElement(WebCore::Element* element)
1551 { 1558 {
1559 // The client is exiting full screen, so don't send a notification.
1560 if (m_isCancelingFullScreen)
1561 return;
1552 if (m_client) 1562 if (m_client)
1553 m_client->exitFullScreen(); 1563 m_client->exitFullScreen();
1554 } 1564 }
1555 1565
1556 bool WebViewImpl::hasHorizontalScrollbar() 1566 bool WebViewImpl::hasHorizontalScrollbar()
1557 { 1567 {
1558 return mainFrameImpl()->frameView()->horizontalScrollbar(); 1568 return mainFrameImpl()->frameView()->horizontalScrollbar();
1559 } 1569 }
1560 1570
1561 bool WebViewImpl::hasVerticalScrollbar() 1571 bool WebViewImpl::hasVerticalScrollbar()
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after
3526 const WebMouseEvent& mouseEvent = static_cast<const WebMouseEvent&>(event); 3536 const WebMouseEvent& mouseEvent = static_cast<const WebMouseEvent&>(event);
3527 3537
3528 if (page()) 3538 if (page())
3529 page()->pointerLockController()->dispatchLockedMouseEvent( 3539 page()->pointerLockController()->dispatchLockedMouseEvent(
3530 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), mouseEvent), 3540 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), mouseEvent),
3531 eventType); 3541 eventType);
3532 } 3542 }
3533 #endif 3543 #endif
3534 3544
3535 } // namespace WebKit 3545 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698