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

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

Issue 2287353002: Cross shadow DOM boundaries for :-webkit-full-screen-ancestor (Closed)
Patch Set: Created 4 years, 3 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 | « third_party/WebKit/LayoutTests/fullscreen/full-screen-ancestor-shadow.html ('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) 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. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 3119 matching lines...) Expand 10 before | Expand all | Expand 10 after
3130 setAttribute(attributeName, AtomicString::number(value)); 3130 setAttribute(attributeName, AtomicString::number(value));
3131 } 3131 }
3132 3132
3133 void Element::setContainsFullScreenElement(bool flag) 3133 void Element::setContainsFullScreenElement(bool flag)
3134 { 3134 {
3135 setElementFlag(ContainsFullScreenElement, flag); 3135 setElementFlag(ContainsFullScreenElement, flag);
3136 document().styleEngine().ensureFullscreenUAStyle(); 3136 document().styleEngine().ensureFullscreenUAStyle();
3137 pseudoStateChanged(CSSSelector::PseudoFullScreenAncestor); 3137 pseudoStateChanged(CSSSelector::PseudoFullScreenAncestor);
3138 } 3138 }
3139 3139
3140 // Unlike Node::parentNode, this can cross frame boundaries. 3140 // Unlike Node::parentOrShadowHostElement, this can cross frame boundaries.
3141 static Element* nextAncestorElement(Element* element) 3141 static Element* nextAncestorElement(Element* element)
3142 { 3142 {
3143 DCHECK(element); 3143 DCHECK(element);
3144 if (element->parentElement()) 3144 if (element->parentOrShadowHostElement())
3145 return element->parentElement(); 3145 return element->parentOrShadowHostElement();
3146 3146
3147 Frame* frame = element->document().frame(); 3147 Frame* frame = element->document().frame();
3148 if (!frame || !frame->owner()) 3148 if (!frame || !frame->owner())
3149 return nullptr; 3149 return nullptr;
3150 3150
3151 // Find the next LocalFrame on the ancestor chain, and return the 3151 // Find the next LocalFrame on the ancestor chain, and return the
3152 // corresponding <iframe> element for the remote child if it exists. 3152 // corresponding <iframe> element for the remote child if it exists.
3153 while (frame->tree().parent() && frame->tree().parent()->isRemoteFrame()) 3153 while (frame->tree().parent() && frame->tree().parent()->isRemoteFrame())
3154 frame = frame->tree().parent(); 3154 frame = frame->tree().parent();
3155 3155
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
3818 3818
3819 DEFINE_TRACE_WRAPPERS(Element) 3819 DEFINE_TRACE_WRAPPERS(Element)
3820 { 3820 {
3821 if (hasRareData()) { 3821 if (hasRareData()) {
3822 visitor->traceWrappers(elementRareData()); 3822 visitor->traceWrappers(elementRareData());
3823 } 3823 }
3824 ContainerNode::traceWrappers(visitor); 3824 ContainerNode::traceWrappers(visitor);
3825 } 3825 }
3826 3826
3827 } // namespace blink 3827 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fullscreen/full-screen-ancestor-shadow.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698