| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) | 3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) |
| 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) | 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) |
| 5 * (C) 2001 Peter Kelly (pmk@post.com) | 5 * (C) 2001 Peter Kelly (pmk@post.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 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 |
| 11 * version 2 of the License, or (at your option) any later version. | 11 * version 2 of the License, or (at your option) any later version. |
| 12 * | 12 * |
| 13 * This library is distributed in the hope that it will be useful, | 13 * This library is distributed in the hope that it will be useful, |
| 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 * Library General Public License for more details. | 16 * Library General Public License for more details. |
| 17 * | 17 * |
| 18 * You should have received a copy of the GNU Library General Public License | 18 * You should have received a copy of the GNU Library General Public License |
| 19 * along with this library; see the file COPYING.LIB. If not, write to | 19 * along with this library; see the file COPYING.LIB. If not, write to |
| 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 21 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
| 22 * | 22 * |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef SKY_ENGINE_CORE_DOM_RANGE_H_ | 25 #ifndef SKY_ENGINE_CORE_DOM_RANGE_H_ |
| 26 #define SKY_ENGINE_CORE_DOM_RANGE_H_ | 26 #define SKY_ENGINE_CORE_DOM_RANGE_H_ |
| 27 | 27 |
| 28 #include "sky/engine/bindings/core/v8/ExceptionStatePlaceholder.h" | 28 #include "sky/engine/bindings2/exception_state_placeholder.h" |
| 29 #include "sky/engine/bindings/core/v8/ScriptWrappable.h" | 29 #include "sky/engine/tonic/dart_wrappable.h" |
| 30 #include "sky/engine/core/dom/RangeBoundaryPoint.h" | 30 #include "sky/engine/core/dom/RangeBoundaryPoint.h" |
| 31 #include "sky/engine/platform/geometry/FloatRect.h" | 31 #include "sky/engine/platform/geometry/FloatRect.h" |
| 32 #include "sky/engine/platform/geometry/IntRect.h" | 32 #include "sky/engine/platform/geometry/IntRect.h" |
| 33 #include "sky/engine/platform/heap/Handle.h" | 33 #include "sky/engine/platform/heap/Handle.h" |
| 34 #include "sky/engine/wtf/Forward.h" | 34 #include "sky/engine/wtf/Forward.h" |
| 35 #include "sky/engine/wtf/RefCounted.h" | 35 #include "sky/engine/wtf/RefCounted.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class ClientRect; | 39 class ClientRect; |
| 40 class ClientRectList; | 40 class ClientRectList; |
| 41 class ContainerNode; | 41 class ContainerNode; |
| 42 class Document; | 42 class Document; |
| 43 class DocumentFragment; | 43 class DocumentFragment; |
| 44 class ExceptionState; | 44 class ExceptionState; |
| 45 class FloatQuad; | 45 class FloatQuad; |
| 46 class Node; | 46 class Node; |
| 47 class NodeWithIndex; | 47 class NodeWithIndex; |
| 48 class Text; | 48 class Text; |
| 49 | 49 |
| 50 class Range final : public RefCounted<Range>, public ScriptWrappable { | 50 class Range final : public RefCounted<Range>, public DartWrappable { |
| 51 DEFINE_WRAPPERTYPEINFO(); | 51 DEFINE_WRAPPERTYPEINFO(); |
| 52 public: | 52 public: |
| 53 static PassRefPtr<Range> create(Document&); | 53 static PassRefPtr<Range> create(Document&); |
| 54 static PassRefPtr<Range> create(Document&, Node* startContainer, int startOf
fset, Node* endContainer, int endOffset); | 54 static PassRefPtr<Range> create(Document&, Node* startContainer, int startOf
fset, Node* endContainer, int endOffset); |
| 55 static PassRefPtr<Range> create(Document&, const Position&, const Position&)
; | 55 static PassRefPtr<Range> create(Document&, const Position&, const Position&)
; |
| 56 ~Range(); | 56 ~Range(); |
| 57 | 57 |
| 58 Document& ownerDocument() const { ASSERT(m_ownerDocument); return *m_ownerDo
cument.get(); } | 58 Document& ownerDocument() const { ASSERT(m_ownerDocument); return *m_ownerDo
cument.get(); } |
| 59 Node* startContainer() const { return m_start.container(); } | 59 Node* startContainer() const { return m_start.container(); } |
| 60 int startOffset() const { return m_start.offset(); } | 60 int startOffset() const { return m_start.offset(); } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 bool areRangesEqual(const Range*, const Range*); | 165 bool areRangesEqual(const Range*, const Range*); |
| 166 | 166 |
| 167 } // namespace blink | 167 } // namespace blink |
| 168 | 168 |
| 169 #ifndef NDEBUG | 169 #ifndef NDEBUG |
| 170 // Outside the WebCore namespace for ease of invocation from gdb. | 170 // Outside the WebCore namespace for ease of invocation from gdb. |
| 171 void showTree(const blink::Range*); | 171 void showTree(const blink::Range*); |
| 172 #endif | 172 #endif |
| 173 | 173 |
| 174 #endif // SKY_ENGINE_CORE_DOM_RANGE_H_ | 174 #endif // SKY_ENGINE_CORE_DOM_RANGE_H_ |
| OLD | NEW |