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

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

Issue 22454003: Support subtitles for native fullscreen video (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 1c0ca09910247206a7fc9f91065c1d604bb83024..7591bd2178673a2a49004047efc4bf0f3eafe67b 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1350,6 +1350,11 @@ void Element::attach(const AttachContext& context)
// lazyAttach in the future that problem should go away.
if (document()->inStyleRecalc())
InspectorInstrumentation::didRecalculateStyleForElement(this);
+
+ if (FullscreenElementStack::isActiveFullScreenElement(this)) {
+ if (FrameView* view = document()->view())
+ view->setCurrentFullscreenRenderer(renderer());
+ }
}
void Element::unregisterNamedFlowContentNode()
@@ -1360,6 +1365,11 @@ void Element::unregisterNamedFlowContentNode()
void Element::detach(const AttachContext& context)
{
+ if (FullscreenElementStack::isActiveFullScreenElement(this)) {
+ if (FrameView* view = document()->view())
+ view->setCurrentFullscreenRenderer(0);
+ }
+
WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
unregisterNamedFlowContentNode();
cancelFocusAppearanceUpdate();
@@ -3651,4 +3661,20 @@ Attribute* UniqueElementData::attributeItem(unsigned index)
return &m_attributeVector.at(index);
}
+void Element::didBecomeFullscreenElement()
+{
+ FrameView* view = document()->view();
+ if (!view)
+ return;
+ view->setCurrentFullscreenRenderer(renderer());
+}
+
+void Element::willStopBeingFullscreenElement()
+{
+ FrameView* view = document()->view();
+ if (!view)
+ return;
+ view->setCurrentFullscreenRenderer(0);
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698