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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebDocumentTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 class Document; 51 class Document;
52 class WebAXObject; 52 class WebAXObject;
53 class WebElement; 53 class WebElement;
54 class WebFormElement; 54 class WebFormElement;
55 class WebElementCollection; 55 class WebElementCollection;
56 class WebString; 56 class WebString;
57 class WebURL; 57 class WebURL;
58 struct WebDistillabilityFeatures; 58 struct WebDistillabilityFeatures;
59 59
60 using WebStyleSheetId = unsigned;
61
60 // Provides readonly access to some properties of a DOM document. 62 // Provides readonly access to some properties of a DOM document.
61 class WebDocument : public WebNode { 63 class WebDocument : public WebNode {
62 public: 64 public:
63 WebDocument() {} 65 WebDocument() {}
64 WebDocument(const WebDocument& e) : WebNode(e) {} 66 WebDocument(const WebDocument& e) : WebNode(e) {}
65 67
66 WebDocument& operator=(const WebDocument& e) { 68 WebDocument& operator=(const WebDocument& e) {
67 WebNode::Assign(e); 69 WebNode::Assign(e);
68 return *this; 70 return *this;
69 } 71 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 115
114 // Gets the accessibility object for this document. 116 // Gets the accessibility object for this document.
115 BLINK_EXPORT WebAXObject AccessibilityObject() const; 117 BLINK_EXPORT WebAXObject AccessibilityObject() const;
116 118
117 // Gets the accessibility object for an object on this page by ID. 119 // Gets the accessibility object for an object on this page by ID.
118 BLINK_EXPORT WebAXObject AccessibilityObjectFromID(int ax_id) const; 120 BLINK_EXPORT WebAXObject AccessibilityObjectFromID(int ax_id) const;
119 121
120 // Gets the accessibility object that has focus. 122 // Gets the accessibility object that has focus.
121 BLINK_EXPORT WebAXObject FocusedAccessibilityObject() const; 123 BLINK_EXPORT WebAXObject FocusedAccessibilityObject() const;
122 124
123 // Inserts the given CSS source code as a stylesheet in the document. 125 // Inserts the given CSS source code as a stylesheet in the document, and
124 BLINK_EXPORT void InsertStyleSheet(const WebString& source_code); 126 // return its id.
127 BLINK_EXPORT WebStyleSheetId InsertStyleSheet(const WebString& source_code);
128
129 // Removes the CSS which was previously inserted by a call to
130 // InsertStyleSheet().
131 BLINK_EXPORT void RemoveInsertedStyleSheet(WebStyleSheetId);
125 132
126 // Arranges to call WebFrameClient::didMatchCSS(frame(), ...) when one of 133 // Arranges to call WebFrameClient::didMatchCSS(frame(), ...) when one of
127 // the selectors matches or stops matching an element in this document. 134 // the selectors matches or stops matching an element in this document.
128 // Each call to this method overrides any previous calls. 135 // Each call to this method overrides any previous calls.
129 BLINK_EXPORT void WatchCSSSelectors(const WebVector<WebString>& selectors); 136 BLINK_EXPORT void WatchCSSSelectors(const WebVector<WebString>& selectors);
130 137
131 BLINK_EXPORT WebVector<WebDraggableRegion> DraggableRegions() const; 138 BLINK_EXPORT WebVector<WebDraggableRegion> DraggableRegions() const;
132 139
133 BLINK_EXPORT v8::Local<v8::Value> RegisterEmbedderCustomElement( 140 BLINK_EXPORT v8::Local<v8::Value> RegisterEmbedderCustomElement(
134 const WebString& name, 141 const WebString& name,
135 v8::Local<v8::Value> options, 142 v8::Local<v8::Value> options,
136 WebExceptionCode&); 143 WebExceptionCode&);
137 144
138 BLINK_EXPORT WebURL ManifestURL() const; 145 BLINK_EXPORT WebURL ManifestURL() const;
139 BLINK_EXPORT bool ManifestUseCredentials() const; 146 BLINK_EXPORT bool ManifestUseCredentials() const;
140 BLINK_EXPORT WebDistillabilityFeatures DistillabilityFeatures(); 147 BLINK_EXPORT WebDistillabilityFeatures DistillabilityFeatures();
141 148
142 #if BLINK_IMPLEMENTATION 149 #if BLINK_IMPLEMENTATION
143 BLINK_EXPORT WebDocument(Document*); 150 BLINK_EXPORT WebDocument(Document*);
144 BLINK_EXPORT WebDocument& operator=(Document*); 151 BLINK_EXPORT WebDocument& operator=(Document*);
145 BLINK_EXPORT operator Document*() const; 152 BLINK_EXPORT operator Document*() const;
146 #endif 153 #endif
147 }; 154 };
148 155
149 DECLARE_WEB_NODE_TYPE_CASTS(WebDocument); 156 DECLARE_WEB_NODE_TYPE_CASTS(WebDocument);
150 157
151 } // namespace blink 158 } // namespace blink
152 159
153 #endif 160 #endif
OLDNEW
« 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