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

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

Issue 2617103002: Use a new Supplement constructor for Supplement<Document> (Part 1) (Closed)
Patch Set: temp Created 3 years, 11 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: third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
diff --git a/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp b/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
index 259dfd10a38c5f2906787eeff26cde16ebbe2e95..e7e118265a4a49d8dbe38de8d059dec046fe99f3 100644
--- a/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
+++ b/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
@@ -46,7 +46,7 @@ namespace blink {
static const char kSupplementName[] = "CSSSelectorWatch";
CSSSelectorWatch::CSSSelectorWatch(Document& document)
- : m_document(document),
+ : Supplement<Document>(document),
m_callbackSelectorChangeTimer(
TaskRunnerHelper::get(TaskType::UnspecedTimer, &document),
this,
@@ -76,13 +76,13 @@ void CSSSelectorWatch::callbackSelectorChangeTimerFired(TimerBase*) {
m_callbackSelectorChangeTimer.startOneShot(0, BLINK_FROM_HERE);
return;
}
- if (document().frame()) {
+ if (host()->frame()) {
Vector<String> addedSelectors;
Vector<String> removedSelectors;
copyToVector(m_addedSelectors, addedSelectors);
copyToVector(m_removedSelectors, removedSelectors);
- document().frame()->loader().client()->selectorMatchChanged(
- addedSelectors, removedSelectors);
+ host()->frame()->loader().client()->selectorMatchChanged(addedSelectors,
+ removedSelectors);
}
m_addedSelectors.clear();
m_removedSelectors.clear();
@@ -164,12 +164,11 @@ void CSSSelectorWatch::watchCSSSelectors(const Vector<String>& selectors) {
m_watchedCallbackSelectors.push_back(
StyleRule::create(std::move(selectorList), callbackPropertySet));
}
- document().styleEngine().watchedSelectorsChanged();
+ host()->styleEngine().watchedSelectorsChanged();
}
DEFINE_TRACE(CSSSelectorWatch) {
visitor->trace(m_watchedCallbackSelectors);
- visitor->trace(m_document);
Supplement<Document>::trace(visitor);
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/CSSSelectorWatch.h ('k') | third_party/WebKit/Source/core/dom/DocumentParserTiming.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698