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

Side by Side Diff: third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp

Issue 2667913002: Revert of Sync requestFullscreen() and exitFullscreen() algorithms with the spec (patchset #3 id:40… (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "web/WebRemoteFrameImpl.h" 5 #include "web/WebRemoteFrameImpl.h"
6 6
7 #include "core/dom/Fullscreen.h" 7 #include "core/dom/Fullscreen.h"
8 #include "core/dom/RemoteSecurityContext.h" 8 #include "core/dom/RemoteSecurityContext.h"
9 #include "core/dom/SecurityContext.h" 9 #include "core/dom/SecurityContext.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 return false; 496 return false;
497 return owner->layoutObject()->style()->pointerEvents() == 497 return owner->layoutObject()->style()->pointerEvents() ==
498 EPointerEvents::kNone; 498 EPointerEvents::kNone;
499 } 499 }
500 500
501 void WebRemoteFrameImpl::willEnterFullscreen() { 501 void WebRemoteFrameImpl::willEnterFullscreen() {
502 // This should only ever be called when the FrameOwner is local. 502 // This should only ever be called when the FrameOwner is local.
503 HTMLFrameOwnerElement* ownerElement = 503 HTMLFrameOwnerElement* ownerElement =
504 toHTMLFrameOwnerElement(frame()->owner()); 504 toHTMLFrameOwnerElement(frame()->owner());
505 505
506 // Call |requestFullscreen()| on |ownerElement| to make it the pending 506 // Call requestFullscreen() on |ownerElement| to make it the provisional
507 // fullscreen element in anticipation of the coming |didEnterFullscreen()| 507 // fullscreen element in FullscreenController, and to prepare
508 // call. 508 // fullscreenchange events that will need to fire on it and its (local)
509 // ancestors. The events will be triggered if/when fullscreen is entered.
509 // 510 //
510 // PrefixedForCrossProcessDescendant is necessary because: 511 // Passing |forCrossProcessAncestor| to requestFullscreen is necessary
511 // - The fullscreen element ready check and other checks should be bypassed. 512 // because:
512 // - |ownerElement| will need :-webkit-full-screen-ancestor style in addition 513 // - |ownerElement| will need :-webkit-full-screen-ancestor style in
513 // to :-webkit-full-screen. 514 // addition to :-webkit-full-screen.
515 // - there's no need to resend the ToggleFullscreen IPC to the browser
516 // process.
514 // 517 //
515 // TODO(alexmos): currently, this assumes prefixed requests, but in the 518 // TODO(alexmos): currently, this assumes prefixed requests, but in the
516 // future, this should plumb in information about which request type 519 // future, this should plumb in information about which request type
517 // (prefixed or unprefixed) to use for firing fullscreen events. 520 // (prefixed or unprefixed) to use for firing fullscreen events.
518 Fullscreen::requestFullscreen( 521 Fullscreen::requestFullscreen(*ownerElement,
519 *ownerElement, 522 Fullscreen::RequestType::Prefixed,
520 Fullscreen::RequestType::PrefixedForCrossProcessDescendant); 523 true /* forCrossProcessAncestor */);
521 } 524 }
522 525
523 void WebRemoteFrameImpl::setHasReceivedUserGesture() { 526 void WebRemoteFrameImpl::setHasReceivedUserGesture() {
524 frame()->setDocumentHasReceivedUserGesture(); 527 frame()->setDocumentHasReceivedUserGesture();
525 } 528 }
526 529
527 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, 530 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope,
528 WebRemoteFrameClient* client) 531 WebRemoteFrameClient* client)
529 : WebRemoteFrame(scope), 532 : WebRemoteFrame(scope),
530 m_frameClient(RemoteFrameClientImpl::create(this)), 533 m_frameClient(RemoteFrameClientImpl::create(this)),
531 m_client(client), 534 m_client(client),
532 m_selfKeepAlive(this) {} 535 m_selfKeepAlive(this) {}
533 536
534 } // namespace blink 537 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698