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

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

Issue 2557943002: Sync requestFullscreen() and exitFullscreen() algorithms with the spec (Closed)
Patch Set: rebase Created 4 years 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 return false; 502 return false;
503 return owner->layoutObject()->style()->pointerEvents() == 503 return owner->layoutObject()->style()->pointerEvents() ==
504 EPointerEvents::None; 504 EPointerEvents::None;
505 } 505 }
506 506
507 void WebRemoteFrameImpl::willEnterFullscreen() { 507 void WebRemoteFrameImpl::willEnterFullscreen() {
508 // This should only ever be called when the FrameOwner is local. 508 // This should only ever be called when the FrameOwner is local.
509 HTMLFrameOwnerElement* ownerElement = 509 HTMLFrameOwnerElement* ownerElement =
510 toHTMLFrameOwnerElement(frame()->owner()); 510 toHTMLFrameOwnerElement(frame()->owner());
511 511
512 // Call requestFullscreen() on |ownerElement| to make it the provisional 512 // Call |requestFullscreen()| on |ownerElement| to make it the pending
513 // fullscreen element in FullscreenController, and to prepare 513 // fullscreen element in anticipation of the coming |didEnterFullscreen()|
514 // fullscreenchange events that will need to fire on it and its (local) 514 // call.
515 // ancestors. The events will be triggered if/when fullscreen is entered.
516 // 515 //
517 // Passing |forCrossProcessAncestor| to requestFullscreen is necessary 516 // PrefixedForCrossProcessDescendant is necessary because:
518 // because: 517 // - The fullscreen element ready check and other checks should be bypassed.
519 // - |ownerElement| will need :-webkit-full-screen-ancestor style in 518 // - |ownerElement| will need :-webkit-full-screen-ancestor style in addition
520 // addition to :-webkit-full-screen. 519 // to :-webkit-full-screen.
521 // - there's no need to resend the ToggleFullscreen IPC to the browser
522 // process.
523 // 520 //
524 // TODO(alexmos): currently, this assumes prefixed requests, but in the 521 // TODO(alexmos): currently, this assumes prefixed requests, but in the
525 // future, this should plumb in information about which request type 522 // future, this should plumb in information about which request type
526 // (prefixed or unprefixed) to use for firing fullscreen events. 523 // (prefixed or unprefixed) to use for firing fullscreen events.
527 Fullscreen::requestFullscreen(*ownerElement, 524 Fullscreen::requestFullscreen(
528 Fullscreen::RequestType::Prefixed, 525 *ownerElement,
529 true /* forCrossProcessAncestor */); 526 Fullscreen::RequestType::PrefixedForCrossProcessDescendant);
530 } 527 }
531 528
532 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, 529 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope,
533 WebRemoteFrameClient* client) 530 WebRemoteFrameClient* client)
534 : WebRemoteFrame(scope), 531 : WebRemoteFrame(scope),
535 m_frameClient(RemoteFrameClientImpl::create(this)), 532 m_frameClient(RemoteFrameClientImpl::create(this)),
536 m_client(client), 533 m_client(client),
537 m_selfKeepAlive(this) {} 534 m_selfKeepAlive(this) {}
538 535
539 } // namespace blink 536 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698