| 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 20 matching lines...) Expand all Loading... |
| 31 #ifndef WebElement_h | 31 #ifndef WebElement_h |
| 32 #define WebElement_h | 32 #define WebElement_h |
| 33 | 33 |
| 34 #include "../platform/WebImage.h" | 34 #include "../platform/WebImage.h" |
| 35 #include "WebNode.h" | 35 #include "WebNode.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class Element; | 39 class Element; |
| 40 struct WebRect; | 40 struct WebRect; |
| 41 struct WebFloatRect; |
| 41 | 42 |
| 42 // Provides access to some properties of a DOM element node. | 43 // Provides access to some properties of a DOM element node. |
| 43 class WebElement : public WebNode { | 44 class WebElement : public WebNode { |
| 44 public: | 45 public: |
| 45 WebElement() : WebNode() { } | 46 WebElement() : WebNode() { } |
| 46 WebElement(const WebElement& e) : WebNode(e) { } | 47 WebElement(const WebElement& e) : WebNode(e) { } |
| 47 | 48 |
| 48 WebElement& operator=(const WebElement& e) { WebNode::assign(e); return *thi
s; } | 49 WebElement& operator=(const WebElement& e) { WebNode::assign(e); return *thi
s; } |
| 49 void assign(const WebElement& e) { WebNode::assign(e); } | 50 void assign(const WebElement& e) { WebNode::assign(e); } |
| 50 | 51 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 66 BLINK_EXPORT WebString attributeLocalName(unsigned index) const; | 67 BLINK_EXPORT WebString attributeLocalName(unsigned index) const; |
| 67 BLINK_EXPORT WebString attributeValue(unsigned index) const; | 68 BLINK_EXPORT WebString attributeValue(unsigned index) const; |
| 68 BLINK_EXPORT unsigned attributeCount() const; | 69 BLINK_EXPORT unsigned attributeCount() const; |
| 69 | 70 |
| 70 // If this element takes up space in the layout of the page. | 71 // If this element takes up space in the layout of the page. |
| 71 BLINK_EXPORT bool hasNonEmptyLayoutSize() const; | 72 BLINK_EXPORT bool hasNonEmptyLayoutSize() const; |
| 72 | 73 |
| 73 // Returns the bounds of the element in Visual Viewport. The bounds | 74 // Returns the bounds of the element in Visual Viewport. The bounds |
| 74 // have been adjusted to include any transformations, including page scale. | 75 // have been adjusted to include any transformations, including page scale. |
| 75 // This function will update the layout if required. | 76 // This function will update the layout if required. |
| 76 BLINK_EXPORT WebRect boundsInViewport(); | 77 BLINK_EXPORT WebRect boundsInViewportInt(); |
| 78 BLINK_EXPORT WebFloatRect boundsInViewportFloat(); |
| 77 | 79 |
| 78 // Returns the image contents of this element or a null WebImage | 80 // Returns the image contents of this element or a null WebImage |
| 79 // if there isn't any. | 81 // if there isn't any. |
| 80 BLINK_EXPORT WebImage imageContents(); | 82 BLINK_EXPORT WebImage imageContents(); |
| 81 | 83 |
| 82 #if BLINK_IMPLEMENTATION | 84 #if BLINK_IMPLEMENTATION |
| 83 WebElement(const PassRefPtrWillBeRawPtr<Element>&); | 85 WebElement(const PassRefPtrWillBeRawPtr<Element>&); |
| 84 WebElement& operator=(const PassRefPtrWillBeRawPtr<Element>&); | 86 WebElement& operator=(const PassRefPtrWillBeRawPtr<Element>&); |
| 85 operator PassRefPtrWillBeRawPtr<Element>() const; | 87 operator PassRefPtrWillBeRawPtr<Element>() const; |
| 86 #endif | 88 #endif |
| 87 }; | 89 }; |
| 88 | 90 |
| 89 DECLARE_WEB_NODE_TYPE_CASTS(WebElement); | 91 DECLARE_WEB_NODE_TYPE_CASTS(WebElement); |
| 90 | 92 |
| 91 } // namespace blink | 93 } // namespace blink |
| 92 | 94 |
| 93 #endif | 95 #endif |
| OLD | NEW |