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

Unified Diff: third_party/WebKit/public/web/WebDocument.h

Issue 2835183002: Provide a method to remove inserted style sheet (Closed)
Patch Set: rebase Created 3 years, 7 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/web/tests/WebDocumentTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/web/WebDocument.h
diff --git a/third_party/WebKit/public/web/WebDocument.h b/third_party/WebKit/public/web/WebDocument.h
index af9497b88337b948de03fb3dc6a995a22bfce308..eb100681c09f24ed12da44111ca8af7f501b0e9b 100644
--- a/third_party/WebKit/public/web/WebDocument.h
+++ b/third_party/WebKit/public/web/WebDocument.h
@@ -57,6 +57,8 @@ class WebString;
class WebURL;
struct WebDistillabilityFeatures;
+using WebStyleSheetId = unsigned;
+
// Provides readonly access to some properties of a DOM document.
class WebDocument : public WebNode {
public:
@@ -120,8 +122,13 @@ class WebDocument : public WebNode {
// Gets the accessibility object that has focus.
BLINK_EXPORT WebAXObject FocusedAccessibilityObject() const;
- // Inserts the given CSS source code as a stylesheet in the document.
- BLINK_EXPORT void InsertStyleSheet(const WebString& source_code);
+ // Inserts the given CSS source code as a stylesheet in the document, and
+ // return its id.
+ BLINK_EXPORT WebStyleSheetId InsertStyleSheet(const WebString& source_code);
+
+ // Removes the CSS which was previously inserted by a call to
+ // InsertStyleSheet().
+ BLINK_EXPORT void RemoveInsertedStyleSheet(WebStyleSheetId);
// Arranges to call WebFrameClient::didMatchCSS(frame(), ...) when one of
// the selectors matches or stops matching an element in this document.
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebDocumentTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698