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

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 1997413003: Revert of Add support for entering/exiting HTML fullscreen from OOPIFs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/data/fullscreen_frame.html ('k') | third_party/WebKit/Source/core/dom/Fullscreen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 60a880d42afa7182e94563745f87382232b1fa11..15c15451b2df73ca1b29a9169639cffaaf911047 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -3056,31 +3056,15 @@
pseudoStateChanged(CSSSelector::PseudoFullScreenAncestor);
}
-// Unlike Node::parentNode, this can cross frame boundaries.
-static Element* nextAncestorElement(Element* element)
+static Element* parentCrossingFrameBoundaries(Element* element)
{
DCHECK(element);
- if (element->parentElement())
- return element->parentElement();
-
- Frame* frame = element->document().frame();
- if (!frame || !frame->owner())
- return nullptr;
-
- // Find the next LocalFrame on the ancestor chain, and return the
- // corresponding <iframe> element for the remote child if it exists.
- while (frame->tree().parent() && frame->tree().parent()->isRemoteFrame())
- frame = frame->tree().parent();
-
- if (frame->owner() && frame->owner()->isLocal())
- return toHTMLFrameOwnerElement(frame->owner());
-
- return nullptr;
+ return element->parentElement() ? element->parentElement() : element->document().localOwner();
}
void Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(bool flag)
{
- for (Element* element = nextAncestorElement(this); element; element = nextAncestorElement(element))
+ for (Element* element = parentCrossingFrameBoundaries(this); element; element = parentCrossingFrameBoundaries(element))
element->setContainsFullScreenElement(flag);
}
« no previous file with comments | « content/test/data/fullscreen_frame.html ('k') | third_party/WebKit/Source/core/dom/Fullscreen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698