| 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 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebRange_h | 31 #ifndef WebRange_h |
| 32 #define WebRange_h | 32 #define WebRange_h |
| 33 | 33 |
| 34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
| 35 #include "../platform/WebVector.h" | 35 #include "../platform/WebVector.h" |
| 36 #include "WebFrame.h" | |
| 37 | 36 |
| 38 #if BLINK_IMPLEMENTATION | 37 #if BLINK_IMPLEMENTATION |
| 39 namespace WebCore { class Range; } | 38 namespace WebCore { class Range; } |
| 40 namespace WTF { template <typename T> class PassRefPtr; } | 39 namespace WTF { template <typename T> class PassRefPtr; } |
| 41 #endif | 40 #endif |
| 42 | 41 |
| 43 namespace blink { | 42 namespace blink { |
| 44 | 43 |
| 45 struct WebFloatQuad; | 44 struct WebFloatQuad; |
| 45 class WebFrame; |
| 46 class WebNode; | 46 class WebNode; |
| 47 class WebRangePrivate; | 47 class WebRangePrivate; |
| 48 class WebString; | 48 class WebString; |
| 49 | 49 |
| 50 // Provides readonly access to some properties of a DOM range. | 50 // Provides readonly access to some properties of a DOM range. |
| 51 class WebRange { | 51 class WebRange { |
| 52 public: | 52 public: |
| 53 ~WebRange() { reset(); } | 53 ~WebRange() { reset(); } |
| 54 | 54 |
| 55 WebRange() : m_private(0) { } | 55 WebRange() : m_private(0) { } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 68 BLINK_EXPORT int startOffset() const; | 68 BLINK_EXPORT int startOffset() const; |
| 69 BLINK_EXPORT int endOffset() const; | 69 BLINK_EXPORT int endOffset() const; |
| 70 BLINK_EXPORT WebNode startContainer(int& exceptionCode) const; | 70 BLINK_EXPORT WebNode startContainer(int& exceptionCode) const; |
| 71 BLINK_EXPORT WebNode endContainer(int& exceptionCode) const; | 71 BLINK_EXPORT WebNode endContainer(int& exceptionCode) const; |
| 72 | 72 |
| 73 BLINK_EXPORT WebString toHTMLText() const; | 73 BLINK_EXPORT WebString toHTMLText() const; |
| 74 BLINK_EXPORT WebString toPlainText() const; | 74 BLINK_EXPORT WebString toPlainText() const; |
| 75 | 75 |
| 76 BLINK_EXPORT WebRange expandedToParagraph() const; | 76 BLINK_EXPORT WebRange expandedToParagraph() const; |
| 77 | 77 |
| 78 BLINK_EXPORT static WebRange fromDocumentRange(WebLocalFrame*, int start, in
t length); | 78 BLINK_EXPORT static WebRange fromDocumentRange(WebFrame*, int start, int len
gth); |
| 79 | 79 |
| 80 BLINK_EXPORT WebVector<WebFloatQuad> textQuads() const; | 80 BLINK_EXPORT WebVector<WebFloatQuad> textQuads() const; |
| 81 | 81 |
| 82 #if BLINK_IMPLEMENTATION | 82 #if BLINK_IMPLEMENTATION |
| 83 WebRange(const WTF::PassRefPtr<WebCore::Range>&); | 83 WebRange(const WTF::PassRefPtr<WebCore::Range>&); |
| 84 WebRange& operator=(const WTF::PassRefPtr<WebCore::Range>&); | 84 WebRange& operator=(const WTF::PassRefPtr<WebCore::Range>&); |
| 85 operator WTF::PassRefPtr<WebCore::Range>() const; | 85 operator WTF::PassRefPtr<WebCore::Range>() const; |
| 86 #endif | 86 #endif |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 void assign(WebRangePrivate*); | 89 void assign(WebRangePrivate*); |
| 90 WebRangePrivate* m_private; | 90 WebRangePrivate* m_private; |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace blink | 93 } // namespace blink |
| 94 | 94 |
| 95 #endif | 95 #endif |
| OLD | NEW |