Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: Source/core/dom/Range.h

Issue 1335573004: Introduce Range::dispose() for prompt detachment from owner Document. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: split out rangeContents() switch Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/dom/Range.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 , public ScriptWrappable { 57 , public ScriptWrappable {
58 DEFINE_WRAPPERTYPEINFO(); 58 DEFINE_WRAPPERTYPEINFO();
59 public: 59 public:
60 static PassRefPtrWillBeRawPtr<Range> create(Document&); 60 static PassRefPtrWillBeRawPtr<Range> create(Document&);
61 static PassRefPtrWillBeRawPtr<Range> create(Document&, Node* startContainer, int startOffset, Node* endContainer, int endOffset); 61 static PassRefPtrWillBeRawPtr<Range> create(Document&, Node* startContainer, int startOffset, Node* endContainer, int endOffset);
62 static PassRefPtrWillBeRawPtr<Range> create(Document&, const Position&, cons t Position&); 62 static PassRefPtrWillBeRawPtr<Range> create(Document&, const Position&, cons t Position&);
63 static PassRefPtrWillBeRawPtr<Range> createAdjustedToTreeScope(const TreeSco pe&, const Position&); 63 static PassRefPtrWillBeRawPtr<Range> createAdjustedToTreeScope(const TreeSco pe&, const Position&);
64 #if !ENABLE(OILPAN) || !defined(NDEBUG) 64 #if !ENABLE(OILPAN) || !defined(NDEBUG)
65 ~Range(); 65 ~Range();
66 #endif 66 #endif
67 void dispose();
67 68
68 Document& ownerDocument() const { ASSERT(m_ownerDocument); return *m_ownerDo cument.get(); } 69 Document& ownerDocument() const { ASSERT(m_ownerDocument); return *m_ownerDo cument.get(); }
69 Node* startContainer() const { return m_start.container(); } 70 Node* startContainer() const { return m_start.container(); }
70 int startOffset() const { return m_start.offset(); } 71 int startOffset() const { return m_start.offset(); }
71 Node* endContainer() const { return m_end.container(); } 72 Node* endContainer() const { return m_end.container(); }
72 int endOffset() const { return m_end.offset(); } 73 int endOffset() const { return m_end.offset(); }
73 74
74 bool collapsed() const { return m_start == m_end; } 75 bool collapsed() const { return m_start == m_end; }
75 76
76 Node* commonAncestorContainer() const; 77 Node* commonAncestorContainer() const;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 CORE_EXPORT bool areRangesEqual(const Range*, const Range*); 186 CORE_EXPORT bool areRangesEqual(const Range*, const Range*);
186 187
187 } // namespace blink 188 } // namespace blink
188 189
189 #ifndef NDEBUG 190 #ifndef NDEBUG
190 // Outside the WebCore namespace for ease of invocation from gdb. 191 // Outside the WebCore namespace for ease of invocation from gdb.
191 void showTree(const blink::Range*); 192 void showTree(const blink::Range*);
192 #endif 193 #endif
193 194
194 #endif // Range_h 195 #endif // Range_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Range.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698