Index: Source/core/dom/Element.cpp |
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
index 02518c5bcfad6a3e0e43c5279e4d700cd817c74a..17df66fe879d75385cc852870a0eea65deb7df05 100644 |
--- a/Source/core/dom/Element.cpp |
+++ b/Source/core/dom/Element.cpp |
@@ -1353,6 +1353,11 @@ void Element::attach(const AttachContext& context) |
} |
InspectorInstrumentation::didRecalculateStyleForElement(this); |
+ |
+ if (FullscreenElementStack::isActiveFullScreenElement(this)) { |
+ if (FrameView* view = document().view()) |
esprehn
2013/09/13 02:46:07
All the null checks for view() look wrong in here.
trchen
2013/09/13 05:14:58
Okay I'll change it to ASSERT.
|
+ view->setCurrentFullscreenRenderer(renderer()); |
+ } |
} |
void Element::unregisterNamedFlowContentNode() |
@@ -1363,6 +1368,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(); |
@@ -3639,4 +3649,20 @@ Attribute* UniqueElementData::attributeItem(unsigned index) |
return &m_attributeVector.at(index); |
} |
+void Element::didBecomeFullscreenElement() |
+{ |
+ FrameView* view = document().view(); |
+ if (!view) |
esprehn
2013/09/13 02:46:07
It should be impossible to get here if there's no
trchen
2013/09/13 05:14:58
Will change to ASSERT too.
|
+ return; |
+ view->setCurrentFullscreenRenderer(renderer()); |
+} |
+ |
+void Element::willStopBeingFullscreenElement() |
+{ |
+ FrameView* view = document().view(); |
+ if (!view) |
+ return; |
+ view->setCurrentFullscreenRenderer(0); |
+} |
+ |
} // namespace WebCore |