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

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: Rebase 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 void Range::dispose() 112 void Range::dispose()
113 { 113 {
114 #if ENABLE(OILPAN) 114 #if ENABLE(OILPAN)
115 // A prompt detach from the owning Document helps avoid GC overhead. 115 // A prompt detach from the owning Document helps avoid GC overhead.
116 m_ownerDocument->detachRange(this); 116 m_ownerDocument->detachRange(this);
117 #endif 117 #endif
118 } 118 }
119 119
120 bool Range::inDocument() const 120 bool Range::inShadowIncludingDocument() const
121 { 121 {
122 ASSERT(m_start.inDocument() == m_end.inDocument()); 122 ASSERT(m_start.inShadowIncludingDocument() == m_end.inShadowIncludingDocumen t());
123 return m_start.inDocument(); 123 return m_start.inShadowIncludingDocument();
124 } 124 }
125 125
126 void Range::setDocument(Document& document) 126 void Range::setDocument(Document& document)
127 { 127 {
128 ASSERT(m_ownerDocument != document); 128 ASSERT(m_ownerDocument != document);
129 ASSERT(m_ownerDocument); 129 ASSERT(m_ownerDocument);
130 m_ownerDocument->detachRange(this); 130 m_ownerDocument->detachRange(this);
131 m_ownerDocument = &document; 131 m_ownerDocument = &document;
132 m_start.setToStartOfNode(document); 132 m_start.setToStartOfNode(document);
133 m_end.setToStartOfNode(document); 133 m_end.setToStartOfNode(document);
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 { 1614 {
1615 if (range && range->boundaryPointsValid()) { 1615 if (range && range->boundaryPointsValid()) {
1616 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E"); 1616 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E");
1617 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset()); 1617 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset());
1618 } else { 1618 } else {
1619 fprintf(stderr, "Cannot show tree if range is null, or if boundary point s are invalid.\n"); 1619 fprintf(stderr, "Cannot show tree if range is null, or if boundary point s are invalid.\n");
1620 } 1620 }
1621 } 1621 }
1622 1622
1623 #endif 1623 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Range.h ('k') | third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698