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

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

Issue 214383008: Rework MediaQueryMatcher to batch up listener notification (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 9bf2eb2e39b265ec949b830f4135d6e064e215da..2c25ab1e236c4de0598b66aa83b8432a91919bb3 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -640,7 +640,7 @@ SelectorQueryCache& Document::selectorQueryCache()
MediaQueryMatcher& Document::mediaQueryMatcher()
{
if (!m_mediaQueryMatcher)
- m_mediaQueryMatcher = MediaQueryMatcher::create(this);
+ m_mediaQueryMatcher = MediaQueryMatcher::create(*this);
return *m_mediaQueryMatcher;
}
@@ -2165,7 +2165,7 @@ void Document::detach(const AttachContext& context)
m_frame = 0;
if (m_mediaQueryMatcher)
- m_mediaQueryMatcher->documentDestroyed();
+ m_mediaQueryMatcher->documentDetached();
lifecycleNotifier().notifyDocumentWasDetached();
m_lifecycle.advanceTo(DocumentLifecycle::Stopped);
@@ -3325,7 +3325,7 @@ void Document::evaluateMediaQueryListIfNeeded()
void Document::evaluateMediaQueryList()
{
if (m_mediaQueryMatcher)
- m_mediaQueryMatcher->styleResolverChanged();
+ m_mediaQueryMatcher->mediaChanged();
kenneth.r.christiansen 2014/04/03 21:54:15 handleMediaChanged? actually I consider media to m
rune 2014/06/10 06:17:07 I was just looking at this in a different context.
}
void Document::notifyResizeForViewportUnits()
« Source/core/css/MediaQueryMatcher.cpp ('K') | « Source/core/css/MediaQueryMatcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698