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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2855843002: Reland "Sync requestFullscreen() and exitFullscreen() algorithms with the spec" (Closed)
Patch Set: Reland "Sync requestFullscreen() and exitFullscreen() algorithms with the spec" Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * (C) 2007 Eric Seidel (eric@webkit.org) 9 * (C) 2007 Eric Seidel (eric@webkit.org)
10 * 10 *
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 SetIsInCanvasSubtree(true); 1664 SetIsInCanvasSubtree(true);
1665 1665
1666 return kInsertionDone; 1666 return kInsertionDone;
1667 } 1667 }
1668 1668
1669 void Element::RemovedFrom(ContainerNode* insertion_point) { 1669 void Element::RemovedFrom(ContainerNode* insertion_point) {
1670 bool was_in_document = insertion_point->isConnected(); 1670 bool was_in_document = insertion_point->isConnected();
1671 1671
1672 DCHECK(!HasRareData() || !GetElementRareData()->HasPseudoElements()); 1672 DCHECK(!HasRareData() || !GetElementRareData()->HasPseudoElements());
1673 1673
1674 if (Fullscreen::IsCurrentFullScreenElement(*this)) { 1674 if (Fullscreen::IsFullscreenElement(*this)) {
1675 SetContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false); 1675 SetContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false);
1676 if (insertion_point->IsElementNode()) { 1676 if (insertion_point->IsElementNode()) {
1677 ToElement(insertion_point)->SetContainsFullScreenElement(false); 1677 ToElement(insertion_point)->SetContainsFullScreenElement(false);
1678 ToElement(insertion_point) 1678 ToElement(insertion_point)
1679 ->SetContainsFullScreenElementOnAncestorsCrossingFrameBoundaries( 1679 ->SetContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(
1680 false); 1680 false);
1681 } 1681 }
1682 } 1682 }
1683 1683
1684 if (Fullscreen* fullscreen = Fullscreen::FromIfExists(GetDocument())) 1684 if (Fullscreen* fullscreen = Fullscreen::FromIfExists(GetDocument()))
(...skipping 1945 matching lines...) Expand 10 before | Expand all | Expand 10 after
3630 element = NextAncestorElement(element)) 3630 element = NextAncestorElement(element))
3631 element->SetContainsFullScreenElement(flag); 3631 element->SetContainsFullScreenElement(flag);
3632 } 3632 }
3633 3633
3634 void Element::SetContainsPersistentVideo(bool value) { 3634 void Element::SetContainsPersistentVideo(bool value) {
3635 SetElementFlag(kContainsPersistentVideo, value); 3635 SetElementFlag(kContainsPersistentVideo, value);
3636 PseudoStateChanged(CSSSelector::kPseudoVideoPersistentAncestor); 3636 PseudoStateChanged(CSSSelector::kPseudoVideoPersistentAncestor);
3637 3637
3638 // In some rare situations, when the persistent video has been removed from 3638 // In some rare situations, when the persistent video has been removed from
3639 // the tree, part of the tree might still carry the flag. 3639 // the tree, part of the tree might still carry the flag.
3640 if (!value && Fullscreen::IsCurrentFullScreenElement(*this)) { 3640 if (!value && Fullscreen::IsFullscreenElement(*this)) {
3641 for (Node* node = firstChild(); node;) { 3641 for (Node* node = firstChild(); node;) {
3642 if (!node->IsElementNode() || 3642 if (!node->IsElementNode() ||
3643 !ToElement(node)->ContainsPersistentVideo()) { 3643 !ToElement(node)->ContainsPersistentVideo()) {
3644 node = node->nextSibling(); 3644 node = node->nextSibling();
3645 break; 3645 break;
3646 } 3646 }
3647 3647
3648 ToElement(node)->SetContainsPersistentVideo(false); 3648 ToElement(node)->SetContainsPersistentVideo(false);
3649 node = node->firstChild(); 3649 node = node->firstChild();
3650 } 3650 }
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
4269 if (IsUserActionElement()) 4269 if (IsUserActionElement())
4270 return false; 4270 return false;
4271 if (!ParentOrShadowHostElement()->ChildrenSupportStyleSharing()) 4271 if (!ParentOrShadowHostElement()->ChildrenSupportStyleSharing())
4272 return false; 4272 return false;
4273 if (this == GetDocument().CssTarget()) 4273 if (this == GetDocument().CssTarget())
4274 return false; 4274 return false;
4275 if (IsHTMLElement() && ToHTMLElement(this)->HasDirectionAuto()) 4275 if (IsHTMLElement() && ToHTMLElement(this)->HasDirectionAuto())
4276 return false; 4276 return false;
4277 if (HasAnimations()) 4277 if (HasAnimations())
4278 return false; 4278 return false;
4279 if (Fullscreen::IsCurrentFullScreenElement(*this)) 4279 if (Fullscreen::IsFullscreenElement(*this))
4280 return false; 4280 return false;
4281 return true; 4281 return true;
4282 } 4282 }
4283 4283
4284 void Element::LogAddElementIfIsolatedWorldAndInDocument( 4284 void Element::LogAddElementIfIsolatedWorldAndInDocument(
4285 const char element[], 4285 const char element[],
4286 const QualifiedName& attr1) { 4286 const QualifiedName& attr1) {
4287 if (!isConnected()) 4287 if (!isConnected())
4288 return; 4288 return;
4289 V8DOMActivityLogger* activity_logger = 4289 V8DOMActivityLogger* activity_logger =
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
4357 } 4357 }
4358 4358
4359 DEFINE_TRACE_WRAPPERS(Element) { 4359 DEFINE_TRACE_WRAPPERS(Element) {
4360 if (HasRareData()) { 4360 if (HasRareData()) {
4361 visitor->TraceWrappers(GetElementRareData()); 4361 visitor->TraceWrappers(GetElementRareData());
4362 } 4362 }
4363 ContainerNode::TraceWrappers(visitor); 4363 ContainerNode::TraceWrappers(visitor);
4364 } 4364 }
4365 4365
4366 } // namespace blink 4366 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentFullscreen.idl ('k') | third_party/WebKit/Source/core/dom/Fullscreen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698