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

Unified Diff: Source/web/WebDocument.cpp

Issue 18371008: Add a WebDocument::watchCssSelectors(selectors) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Add a test for watching dynamic attribute changes Created 7 years, 4 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 | « Source/web/FrameLoaderClientImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebDocument.cpp
diff --git a/Source/web/WebDocument.cpp b/Source/web/WebDocument.cpp
index 41e9224b692080b7d0ea509d974ed08129079d2a..132414c444391ed4fd73cdababf1350cd2972c32 100644
--- a/Source/web/WebDocument.cpp
+++ b/Source/web/WebDocument.cpp
@@ -45,6 +45,7 @@
#include "core/accessibility/AXObjectCache.h"
#include "core/css/CSSParserMode.h"
#include "core/css/StyleSheetContents.h"
+#include "core/dom/CSSSelectorWatch.h"
#include "core/dom/Document.h"
#include "core/dom/DocumentStyleSheetCollection.h"
#include "core/dom/DocumentType.h"
@@ -209,6 +210,14 @@ void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLev
document->styleSheetCollection()->addAuthorSheet(parsedSheet);
}
+void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors)
+{
+ RefPtr<Document> document = unwrap<Document>();
+ Vector<String> selectors;
+ selectors.append(webSelectors.data(), webSelectors.size());
+ CSSSelectorWatch::from(document.get())->watchCSSSelectors(selectors);
+}
+
void WebDocument::cancelFullScreen()
{
if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(unwrap<Document>()))
« no previous file with comments | « Source/web/FrameLoaderClientImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698