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

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

Issue 803133002: Use invalidation sets for fullscreen pseudos. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Load fullscreen.css on demand Created 4 years, 9 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 | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.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/Fullscreen.cpp
diff --git a/third_party/WebKit/Source/core/dom/Fullscreen.cpp b/third_party/WebKit/Source/core/dom/Fullscreen.cpp
index 3ac938b548ee3563d7a648d4d7a80e055e95c36c..73b227fb0c54e104bcca7770d8b92dbacfd2b1b7 100644
--- a/third_party/WebKit/Source/core/dom/Fullscreen.cpp
+++ b/third_party/WebKit/Source/core/dom/Fullscreen.cpp
@@ -31,6 +31,7 @@
#include "core/dom/Document.h"
#include "core/dom/ElementTraversal.h"
#include "core/dom/StyleChangeReason.h"
+#include "core/dom/StyleEngine.h"
#include "core/events/Event.h"
#include "core/frame/FrameHost.h"
#include "core/frame/LocalFrame.h"
@@ -446,8 +447,10 @@ void Fullscreen::didEnterFullScreenForElement(Element* element)
m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(true);
- // FIXME: This should not call updateStyleIfNeeded.
- document()->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::FullScreen));
+ document()->styleEngine().ensureFullscreenUAStyle();
+ m_fullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen);
+
+ // FIXME: This should not call updateLayoutTree.
document()->updateLayoutTree();
m_fullScreenElement->didBecomeFullscreenElement();
@@ -473,8 +476,8 @@ void Fullscreen::didExitFullScreenForElement(Element*)
if (m_fullScreenLayoutObject)
LayoutFullScreenItem(m_fullScreenLayoutObject).unwrapLayoutObject();
+ m_fullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen);
m_fullScreenElement = nullptr;
- document()->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::FullScreen));
if (document()->frame())
document()->frame()->eventHandler().scheduleHoverStateUpdate();
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698