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

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: Sync 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
Index: Source/web/WebDocument.cpp
diff --git a/Source/web/WebDocument.cpp b/Source/web/WebDocument.cpp
index a6d93df59cf3ae75670ca20c5ae805281975d201..6fe8c68976309d7031558396409c2457cd2a936d 100644
--- a/Source/web/WebDocument.cpp
+++ b/Source/web/WebDocument.cpp
@@ -48,6 +48,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/DocumentType.h"
#include "core/dom/Element.h"
@@ -213,6 +214,14 @@ void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLev
document->styleSheetCollections()->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>()))

Powered by Google App Engine
This is Rietveld 408576698