OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved. | 6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 bool hasAttribute(const AtomicString& name) const; | 177 bool hasAttribute(const AtomicString& name) const; |
178 bool hasAttributeNS(const AtomicString& namespaceURI, | 178 bool hasAttributeNS(const AtomicString& namespaceURI, |
179 const AtomicString& localName) const; | 179 const AtomicString& localName) const; |
180 | 180 |
181 const AtomicString& getAttribute(const AtomicString& name) const; | 181 const AtomicString& getAttribute(const AtomicString& name) const; |
182 const AtomicString& getAttributeNS(const AtomicString& namespaceURI, | 182 const AtomicString& getAttributeNS(const AtomicString& namespaceURI, |
183 const AtomicString& localName) const; | 183 const AtomicString& localName) const; |
184 | 184 |
185 void setAttribute(const AtomicString& name, | 185 void setAttribute(const AtomicString& name, |
186 const AtomicString& value, | 186 const AtomicString& value, |
187 ExceptionState&); | 187 ExceptionState& = ASSERT_NO_EXCEPTION); |
188 static bool parseAttributeName(QualifiedName&, | 188 static bool parseAttributeName(QualifiedName&, |
189 const AtomicString& namespaceURI, | 189 const AtomicString& namespaceURI, |
190 const AtomicString& qualifiedName, | 190 const AtomicString& qualifiedName, |
191 ExceptionState&); | 191 ExceptionState&); |
192 void setAttributeNS(const AtomicString& namespaceURI, | 192 void setAttributeNS(const AtomicString& namespaceURI, |
193 const AtomicString& qualifiedName, | 193 const AtomicString& qualifiedName, |
194 const AtomicString& value, | 194 const AtomicString& value, |
195 ExceptionState&); | 195 ExceptionState&); |
196 | 196 |
197 const AtomicString& getIdAttribute() const; | 197 const AtomicString& getIdAttribute() const; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 void setNeedsCompositingUpdate(); | 426 void setNeedsCompositingUpdate(); |
427 | 427 |
428 bool supportsStyleSharing() const; | 428 bool supportsStyleSharing() const; |
429 | 429 |
430 ElementShadow* shadow() const; | 430 ElementShadow* shadow() const; |
431 ElementShadow& ensureShadow(); | 431 ElementShadow& ensureShadow(); |
432 // If type of ShadowRoot (either closed or open) is explicitly specified, | 432 // If type of ShadowRoot (either closed or open) is explicitly specified, |
433 // creation of multiple shadow roots is prohibited in any combination and | 433 // creation of multiple shadow roots is prohibited in any combination and |
434 // throws an exception. Multiple shadow roots are allowed only when | 434 // throws an exception. Multiple shadow roots are allowed only when |
435 // createShadowRoot() is used without any parameters from JavaScript. | 435 // createShadowRoot() is used without any parameters from JavaScript. |
436 ShadowRoot* createShadowRoot(const ScriptState*, ExceptionState&); | 436 // |
| 437 // TODO(esprehn): These take a ScriptState only for calling |
| 438 // HostsUsingFeatures::countMainWorldOnly, which should be handled in the |
| 439 // bindings instead so adding a ShadowRoot from C++ doesn't need one. |
| 440 ShadowRoot* createShadowRoot(const ScriptState* = nullptr, |
| 441 ExceptionState& = ASSERT_NO_EXCEPTION); |
437 ShadowRoot* attachShadow(const ScriptState*, | 442 ShadowRoot* attachShadow(const ScriptState*, |
438 const ShadowRootInit&, | 443 const ShadowRootInit&, |
439 ExceptionState&); | 444 ExceptionState&); |
440 ShadowRoot* createShadowRootInternal(ShadowRootType, ExceptionState&); | 445 ShadowRoot* createShadowRootInternal(ShadowRootType, ExceptionState&); |
441 | 446 |
442 ShadowRoot* openShadowRoot() const; | 447 ShadowRoot* openShadowRoot() const; |
443 ShadowRoot* closedShadowRoot() const; | 448 ShadowRoot* closedShadowRoot() const; |
444 ShadowRoot* authorShadowRoot() const; | 449 ShadowRoot* authorShadowRoot() const; |
445 ShadowRoot* userAgentShadowRoot() const; | 450 ShadowRoot* userAgentShadowRoot() const; |
446 | 451 |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 1196 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
1192 static T* create(const QualifiedName&, Document&) | 1197 static T* create(const QualifiedName&, Document&) |
1193 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 1198 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
1194 T* T::create(const QualifiedName& tagName, Document& document) { \ | 1199 T* T::create(const QualifiedName& tagName, Document& document) { \ |
1195 return new T(tagName, document); \ | 1200 return new T(tagName, document); \ |
1196 } | 1201 } |
1197 | 1202 |
1198 } // namespace blink | 1203 } // namespace blink |
1199 | 1204 |
1200 #endif // Element_h | 1205 #endif // Element_h |
OLD | NEW |