| 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
|
|
|