| 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 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 class CORE_EXPORT Range final : public GarbageCollected<Range>, public ScriptWra
ppable { | 51 class CORE_EXPORT Range final : public GarbageCollected<Range>, public ScriptWra
ppable { |
| 52 DEFINE_WRAPPERTYPEINFO(); | 52 DEFINE_WRAPPERTYPEINFO(); |
| 53 public: | 53 public: |
| 54 static RawPtr<Range> create(Document&); | 54 static RawPtr<Range> create(Document&); |
| 55 static RawPtr<Range> create(Document&, Node* startContainer, int startOffset
, Node* endContainer, int endOffset); | 55 static RawPtr<Range> create(Document&, Node* startContainer, int startOffset
, Node* endContainer, int endOffset); |
| 56 static RawPtr<Range> create(Document&, const Position&, const Position&); | 56 static RawPtr<Range> create(Document&, const Position&, const Position&); |
| 57 static RawPtr<Range> createAdjustedToTreeScope(const TreeScope&, const Posit
ion&); | 57 static RawPtr<Range> createAdjustedToTreeScope(const TreeScope&, const Posit
ion&); |
| 58 | 58 |
| 59 void dispose(); | 59 void dispose(); |
| 60 | 60 |
| 61 Document& ownerDocument() const { ASSERT(m_ownerDocument); return *m_ownerDo
cument.get(); } | 61 Document& ownerDocument() const { DCHECK(m_ownerDocument); return *m_ownerDo
cument.get(); } |
| 62 Node* startContainer() const { return m_start.container(); } | 62 Node* startContainer() const { return m_start.container(); } |
| 63 int startOffset() const { return m_start.offset(); } | 63 int startOffset() const { return m_start.offset(); } |
| 64 Node* endContainer() const { return m_end.container(); } | 64 Node* endContainer() const { return m_end.container(); } |
| 65 int endOffset() const { return m_end.offset(); } | 65 int endOffset() const { return m_end.offset(); } |
| 66 | 66 |
| 67 bool collapsed() const { return m_start == m_end; } | 67 bool collapsed() const { return m_start == m_end; } |
| 68 bool inShadowIncludingDocument() const; | 68 bool inShadowIncludingDocument() const; |
| 69 | 69 |
| 70 Node* commonAncestorContainer() const; | 70 Node* commonAncestorContainer() const; |
| 71 static Node* commonAncestorContainer(const Node* containerA, const Node* con
tainerB); | 71 static Node* commonAncestorContainer(const Node* containerA, const Node* con
tainerB); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 CORE_EXPORT bool areRangesEqual(const Range*, const Range*); | 173 CORE_EXPORT bool areRangesEqual(const Range*, const Range*); |
| 174 | 174 |
| 175 } // namespace blink | 175 } // namespace blink |
| 176 | 176 |
| 177 #ifndef NDEBUG | 177 #ifndef NDEBUG |
| 178 // Outside the WebCore namespace for ease of invocation from gdb. | 178 // Outside the WebCore namespace for ease of invocation from gdb. |
| 179 void showTree(const blink::Range*); | 179 void showTree(const blink::Range*); |
| 180 #endif | 180 #endif |
| 181 | 181 |
| 182 #endif // Range_h | 182 #endif // Range_h |
| OLD | NEW |