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

Side by Side Diff: third_party/WebKit/Source/core/dom/Range.cpp

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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, 2010, 2011 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 #endif 142 #endif
143 143
144 void Range::dispose() 144 void Range::dispose()
145 { 145 {
146 #if ENABLE(OILPAN) 146 #if ENABLE(OILPAN)
147 // A prompt detach from the owning Document helps avoid GC overhead. 147 // A prompt detach from the owning Document helps avoid GC overhead.
148 m_ownerDocument->detachRange(this); 148 m_ownerDocument->detachRange(this);
149 #endif 149 #endif
150 } 150 }
151 151
152 bool Range::inDocument() const 152 bool Range::inShadowIncludingDocument() const
153 { 153 {
154 ASSERT(m_start.inDocument() == m_end.inDocument()); 154 ASSERT(m_start.inShadowIncludingDocument() == m_end.inShadowIncludingDocumen t());
155 return m_start.inDocument(); 155 return m_start.inShadowIncludingDocument();
156 } 156 }
157 157
158 void Range::setDocument(Document& document) 158 void Range::setDocument(Document& document)
159 { 159 {
160 ASSERT(m_ownerDocument != document); 160 ASSERT(m_ownerDocument != document);
161 ASSERT(m_ownerDocument); 161 ASSERT(m_ownerDocument);
162 m_ownerDocument->detachRange(this); 162 m_ownerDocument->detachRange(this);
163 m_ownerDocument = &document; 163 m_ownerDocument = &document;
164 m_start.setToStartOfNode(document); 164 m_start.setToStartOfNode(document);
165 m_end.setToStartOfNode(document); 165 m_end.setToStartOfNode(document);
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 { 1646 {
1647 if (range && range->boundaryPointsValid()) { 1647 if (range && range->boundaryPointsValid()) {
1648 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E"); 1648 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E");
1649 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset()); 1649 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset());
1650 } else { 1650 } else {
1651 fprintf(stderr, "Cannot show tree if range is null, or if boundary point s are invalid.\n"); 1651 fprintf(stderr, "Cannot show tree if range is null, or if boundary point s are invalid.\n");
1652 } 1652 }
1653 } 1653 }
1654 1654
1655 #endif 1655 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698