| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 class WebElement : public WebNode { | 43 class WebElement : public WebNode { |
| 44 public: | 44 public: |
| 45 WebElement() : WebNode() { } | 45 WebElement() : WebNode() { } |
| 46 WebElement(const WebElement& e) : WebNode(e) { } | 46 WebElement(const WebElement& e) : WebNode(e) { } |
| 47 | 47 |
| 48 WebElement& operator=(const WebElement& e) { WebNode::assign(e); return *thi
s; } | 48 WebElement& operator=(const WebElement& e) { WebNode::assign(e); return *thi
s; } |
| 49 void assign(const WebElement& e) { WebNode::assign(e); } | 49 void assign(const WebElement& e) { WebNode::assign(e); } |
| 50 | 50 |
| 51 // Returns the qualified name, which may contain a prefix and a colon. | 51 // Returns the qualified name, which may contain a prefix and a colon. |
| 52 BLINK_EXPORT WebString tagName() const; | 52 BLINK_EXPORT WebString tagName() const; |
| 53 // Check if this element has the specified local tag name, and the HTML | 53 |
| 54 // namespace. Tag name matching is case-insensitive. | |
| 55 BLINK_EXPORT bool hasHTMLTagName(const WebString&) const; | |
| 56 BLINK_EXPORT bool hasAttribute(const WebString&) const; | 54 BLINK_EXPORT bool hasAttribute(const WebString&) const; |
| 57 BLINK_EXPORT void removeAttribute(const WebString&); | 55 BLINK_EXPORT void removeAttribute(const WebString&); |
| 58 BLINK_EXPORT WebString getAttribute(const WebString&) const; | 56 BLINK_EXPORT WebString getAttribute(const WebString&) const; |
| 59 BLINK_EXPORT bool setAttribute(const WebString& name, const WebString& value
); | 57 BLINK_EXPORT bool setAttribute(const WebString& name, const WebString& value
); |
| 60 BLINK_EXPORT void requestFullScreen(); | 58 BLINK_EXPORT void requestFullScreen(); |
| 61 BLINK_EXPORT WebString attributeLocalName(unsigned index) const; | 59 BLINK_EXPORT WebString attributeLocalName(unsigned index) const; |
| 62 BLINK_EXPORT WebString attributeValue(unsigned index) const; | 60 BLINK_EXPORT WebString attributeValue(unsigned index) const; |
| 63 BLINK_EXPORT unsigned attributeCount() const; | 61 BLINK_EXPORT unsigned attributeCount() const; |
| 64 BLINK_EXPORT WebNode shadowRoot() const; | 62 BLINK_EXPORT WebNode shadowRoot() const; |
| 65 | 63 |
| 66 // Returns the language code specified for this element. This attribute | 64 // Returns the language code specified for this element. This attribute |
| 67 // is inherited, so the returned value is drawn from the closest parent | 65 // is inherited, so the returned value is drawn from the closest parent |
| 68 // element that has the lang attribute set, or from the HTTP | 66 // element that has the lang attribute set, or from the HTTP |
| 69 // "Content-Language" header as a fallback. | 67 // "Content-Language" header as a fallback. |
| 70 BLINK_EXPORT WebString computeInheritedLanguage() const; | 68 BLINK_EXPORT WebString computeInheritedLanguage() const; |
| 71 | 69 |
| 72 // Returns the image contents of this element or a null WebImage | |
| 73 // if there isn't any. | |
| 74 BLINK_EXPORT WebImage imageContents(); | |
| 75 | |
| 76 #if BLINK_IMPLEMENTATION | 70 #if BLINK_IMPLEMENTATION |
| 77 WebElement(const PassRefPtr<Element>&); | 71 WebElement(const PassRefPtr<Element>&); |
| 78 WebElement& operator=(const PassRefPtr<Element>&); | 72 WebElement& operator=(const PassRefPtr<Element>&); |
| 79 operator PassRefPtr<Element>() const; | 73 operator PassRefPtr<Element>() const; |
| 80 #endif | 74 #endif |
| 81 }; | 75 }; |
| 82 | 76 |
| 83 } // namespace blink | 77 } // namespace blink |
| 84 | 78 |
| 85 #endif // SKY_ENGINE_PUBLIC_WEB_WEBELEMENT_H_ | 79 #endif // SKY_ENGINE_PUBLIC_WEB_WEBELEMENT_H_ |
| OLD | NEW |