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

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

Issue 107103005: Minor refactoring of code in TextIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/TextIterator.cpp
diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp
index 7da300e6a2755fbe064ad31749186f66087d90cd..0b8b8072c3aef799a763dba4b89c9a439822b206 100644
--- a/Source/core/editing/TextIterator.cpp
+++ b/Source/core/editing/TextIterator.cpp
@@ -402,11 +402,11 @@ void TextIterator::advance()
if (renderer->isText() && m_node->nodeType() == Node::TEXT_NODE) { // FIXME: What about CDATA_SECTION_NODE?
handledNode = handleTextNode();
} else if (renderer && (renderer->isImage() || renderer->isWidget()
- || (renderer->node() && renderer->node()->isElementNode()
- && (toElement(renderer->node())->isFormControlElement()
- || toElement(renderer->node())->hasTagName(legendTag)
- || toElement(renderer->node())->hasTagName(meterTag)
- || toElement(renderer->node())->hasTagName(progressTag))))) {
+ || (m_node && m_node->isElementNode()
+ && (toElement(m_node)->isFormControlElement()
+ || toElement(m_node)->hasTagName(legendTag)
+ || toElement(m_node)->hasTagName(meterTag)
+ || toElement(m_node)->hasTagName(progressTag))))) {
handledNode = handleReplacedElement();
} else {
handledNode = handleNonTextNode();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698