| 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 21 matching lines...) Expand all Loading... |
| 32 #define WebNode_h | 32 #define WebNode_h |
| 33 | 33 |
| 34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
| 35 #include "../platform/WebPrivatePtr.h" | 35 #include "../platform/WebPrivatePtr.h" |
| 36 #include "../platform/WebString.h" | 36 #include "../platform/WebString.h" |
| 37 #include "WebExceptionCode.h" | 37 #include "WebExceptionCode.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class Node; | 41 class Node; |
| 42 class WebDOMEvent; | |
| 43 class WebDocument; | 42 class WebDocument; |
| 44 class WebElement; | 43 class WebElement; |
| 45 | 44 |
| 46 // Provides access to some properties of a DOM node. | 45 // Provides access to some properties of a DOM node. |
| 47 // Note that the class design requires that neither this class nor any of its su
bclasses have any virtual | 46 // Note that the class design requires that neither this class nor any of its su
bclasses have any virtual |
| 48 // methods (other than the destructor), so that it is possible to safely static_
cast an instance of one | 47 // methods (other than the destructor), so that it is possible to safely static_
cast an instance of one |
| 49 // class to the appropriate subclass based on the actual type of the wrapped bli
nk::Node. For the same | 48 // class to the appropriate subclass based on the actual type of the wrapped bli
nk::Node. For the same |
| 50 // reason, subclasses must not add any additional data members. | 49 // reason, subclasses must not add any additional data members. |
| 51 class WebNode { | 50 class WebNode { |
| 52 public: | 51 public: |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 BLINK_EXPORT WebNode lastChild() const; | 93 BLINK_EXPORT WebNode lastChild() const; |
| 95 BLINK_EXPORT WebNode previousSibling() const; | 94 BLINK_EXPORT WebNode previousSibling() const; |
| 96 BLINK_EXPORT WebNode nextSibling() const; | 95 BLINK_EXPORT WebNode nextSibling() const; |
| 97 BLINK_EXPORT bool hasChildNodes() const; | 96 BLINK_EXPORT bool hasChildNodes() const; |
| 98 BLINK_EXPORT WebString createMarkup() const; | 97 BLINK_EXPORT WebString createMarkup() const; |
| 99 BLINK_EXPORT bool isLink() const; | 98 BLINK_EXPORT bool isLink() const; |
| 100 BLINK_EXPORT bool isTextNode() const; | 99 BLINK_EXPORT bool isTextNode() const; |
| 101 BLINK_EXPORT bool isFocusable() const; | 100 BLINK_EXPORT bool isFocusable() const; |
| 102 BLINK_EXPORT bool isContentEditable() const; | 101 BLINK_EXPORT bool isContentEditable() const; |
| 103 BLINK_EXPORT bool isElementNode() const; | 102 BLINK_EXPORT bool isElementNode() const; |
| 104 BLINK_EXPORT bool dispatchEvent(const WebDOMEvent&); | |
| 105 BLINK_EXPORT void simulateClick(); | 103 BLINK_EXPORT void simulateClick(); |
| 106 BLINK_EXPORT WebElement querySelector(const WebString&, WebExceptionCode&) c
onst; | 104 BLINK_EXPORT WebElement querySelector(const WebString&, WebExceptionCode&) c
onst; |
| 107 BLINK_EXPORT WebElement rootEditableElement() const; | 105 BLINK_EXPORT WebElement rootEditableElement() const; |
| 108 BLINK_EXPORT bool focused() const; | 106 BLINK_EXPORT bool focused() const; |
| 109 BLINK_EXPORT bool remove(); | 107 BLINK_EXPORT bool remove(); |
| 110 | 108 |
| 111 // Returns true if the node has a non-empty bounding box in layout. | 109 // Returns true if the node has a non-empty bounding box in layout. |
| 112 // This does not 100% guarantee the user can see it, but is pretty close. | 110 // This does not 100% guarantee the user can see it, but is pretty close. |
| 113 // Note: This method only works properly after layout has occurred. | 111 // Note: This method only works properly after layout has occurred. |
| 114 BLINK_EXPORT bool hasNonEmptyBoundingBox() const; | 112 BLINK_EXPORT bool hasNonEmptyBoundingBox() const; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 } | 161 } |
| 164 | 162 |
| 165 inline bool operator<(const WebNode& a, const WebNode& b) | 163 inline bool operator<(const WebNode& a, const WebNode& b) |
| 166 { | 164 { |
| 167 return a.lessThan(b); | 165 return a.lessThan(b); |
| 168 } | 166 } |
| 169 | 167 |
| 170 } // namespace blink | 168 } // namespace blink |
| 171 | 169 |
| 172 #endif | 170 #endif |
| OLD | NEW |