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

Unified Diff: Source/core/editing/TextIterator.cpp

Issue 24278008: [oilpan] Handlify Nodes in htmlediting (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/editing/TextIterator.cpp
diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp
index b1cff5176e52f465292303e855d0bcd249a2c79f..1676c1514f0c244d18ae217730967faa31c6b30b 100644
--- a/Source/core/editing/TextIterator.cpp
+++ b/Source/core/editing/TextIterator.cpp
@@ -730,7 +730,7 @@ static bool shouldEmitTabBeforeNode(Node* node)
RenderObject* r = node->renderer();
// Table cells are delimited by tabs.
- if (!r || !isTableCell(node))
+ if (!r || !isTableCell(adoptRawResult(node)))
return false;
// Want a tab before every cell other than the first one
@@ -777,7 +777,7 @@ static bool shouldEmitNewlinesBeforeAndAfterNode(Node* node)
// Need to make an exception for table cells, because they are blocks, but we
// want them tab-delimited rather than having newlines before and after.
- if (isTableCell(node))
+ if (isTableCell(adoptRawResult(node)))
return false;
// Need to make an exception for table row elements, because they are neither
@@ -859,7 +859,7 @@ static int collapsedSpaceLength(RenderText* renderer, int textEnd)
static int maxOffsetIncludingCollapsedSpaces(Node* node)
{
- int offset = caretMaxOffset(node);
+ int offset = caretMaxOffset(adoptRawResult(node));
if (node->renderer() && node->renderer()->isText())
offset += collapsedSpaceLength(toRenderText(node->renderer()), offset);
@@ -1195,9 +1195,9 @@ void SimplifiedBackwardsTextIterator::advance()
// Exit empty containers as we pass over them or containers
// where [container, 0] is where we started iterating.
if (!m_handledNode
- && canHaveChildrenForEditing(m_node)
- && m_node->parentNode()
- && (!m_node->lastChild() || (m_node == m_endNode && !m_endOffset))) {
+ && canHaveChildrenForEditing(adoptRawResult(m_node))
+ && m_node->parentNode()
+ && (!m_node->lastChild() || (m_node == m_endNode && !m_endOffset))) {
exitNode();
if (m_positionNode) {
m_handledNode = true;

Powered by Google App Engine
This is Rietveld 408576698