OLD | NEW |
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 class WebFormElement; | 58 class WebFormElement; |
59 class WebFrame; | 59 class WebFrame; |
60 class WebNodeCollection; | 60 class WebNodeCollection; |
61 class WebNodeList; | 61 class WebNodeList; |
62 class WebString; | 62 class WebString; |
63 class WebURL; | 63 class WebURL; |
64 | 64 |
65 // Provides readonly access to some properties of a DOM document. | 65 // Provides readonly access to some properties of a DOM document. |
66 class WebDocument : public WebNode { | 66 class WebDocument : public WebNode { |
67 public: | 67 public: |
| 68 // FIXME: Stop using this from Chromium code and get rid of this enum. |
68 enum UserStyleLevel { | 69 enum UserStyleLevel { |
69 UserStyleUserLevel, | |
70 UserStyleAuthorLevel | 70 UserStyleAuthorLevel |
71 }; | 71 }; |
72 | 72 |
73 WebDocument() { } | 73 WebDocument() { } |
74 WebDocument(const WebDocument& e) : WebNode(e) { } | 74 WebDocument(const WebDocument& e) : WebNode(e) { } |
75 | 75 |
76 WebDocument& operator=(const WebDocument& e) | 76 WebDocument& operator=(const WebDocument& e) |
77 { | 77 { |
78 WebNode::assign(e); | 78 WebNode::assign(e); |
79 return *this; | 79 return *this; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 // Accessibility support. These methods should only be called on the | 123 // Accessibility support. These methods should only be called on the |
124 // top-level document, because one accessibility cache spans all of | 124 // top-level document, because one accessibility cache spans all of |
125 // the documents on the page. | 125 // the documents on the page. |
126 | 126 |
127 // Gets the accessibility object for this document. | 127 // Gets the accessibility object for this document. |
128 BLINK_EXPORT WebAXObject accessibilityObject() const; | 128 BLINK_EXPORT WebAXObject accessibilityObject() const; |
129 | 129 |
130 // Gets the accessibility object for an object on this page by ID. | 130 // Gets the accessibility object for an object on this page by ID. |
131 BLINK_EXPORT WebAXObject accessibilityObjectFromID(int axID) const; | 131 BLINK_EXPORT WebAXObject accessibilityObjectFromID(int axID) const; |
132 // Inserts the given CSS source code as a user stylesheet in the document. | 132 // Inserts the given CSS source code as a stylesheet in the document. |
133 // Meant for programatic/one-off injection, as opposed to | 133 // FIXME: Delete insertUserStyleSheet once Chromium code stops calling it. |
134 // WebView::addUserStyleSheet which inserts styles for the lifetime of the | |
135 // WebView. | |
136 BLINK_EXPORT void insertUserStyleSheet(const WebString& sourceCode, UserStyl
eLevel); | 134 BLINK_EXPORT void insertUserStyleSheet(const WebString& sourceCode, UserStyl
eLevel); |
| 135 BLINK_EXPORT void insertStyleSheet(const WebString& sourceCode); |
137 | 136 |
138 // Arranges to call WebFrameClient::didMatchCSS(frame(), ...) when one of | 137 // Arranges to call WebFrameClient::didMatchCSS(frame(), ...) when one of |
139 // the selectors matches or stops matching an element in this document. | 138 // the selectors matches or stops matching an element in this document. |
140 // Each call to this method overrides any previous calls. | 139 // Each call to this method overrides any previous calls. |
141 BLINK_EXPORT void watchCSSSelectors(const WebVector<WebString>& selectors); | 140 BLINK_EXPORT void watchCSSSelectors(const WebVector<WebString>& selectors); |
142 | 141 |
143 BLINK_EXPORT WebVector<WebDraggableRegion> draggableRegions() const; | 142 BLINK_EXPORT WebVector<WebDraggableRegion> draggableRegions() const; |
144 | 143 |
145 BLINK_EXPORT v8::Handle<v8::Value> registerEmbedderCustomElement(const WebSt
ring& name, v8::Handle<v8::Value> options, WebExceptionCode&); | 144 BLINK_EXPORT v8::Handle<v8::Value> registerEmbedderCustomElement(const WebSt
ring& name, v8::Handle<v8::Value> options, WebExceptionCode&); |
146 | 145 |
147 #if BLINK_IMPLEMENTATION | 146 #if BLINK_IMPLEMENTATION |
148 WebDocument(const WTF::PassRefPtr<WebCore::Document>&); | 147 WebDocument(const WTF::PassRefPtr<WebCore::Document>&); |
149 WebDocument& operator=(const WTF::PassRefPtr<WebCore::Document>&); | 148 WebDocument& operator=(const WTF::PassRefPtr<WebCore::Document>&); |
150 operator WTF::PassRefPtr<WebCore::Document>() const; | 149 operator WTF::PassRefPtr<WebCore::Document>() const; |
151 #endif | 150 #endif |
152 }; | 151 }; |
153 | 152 |
154 } // namespace blink | 153 } // namespace blink |
155 | 154 |
156 #endif | 155 #endif |
OLD | NEW |