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

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

Issue 342483002: The length of a TextIterator containing replaced element is at least 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix style issues. Created 6 years, 6 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
« no previous file with comments | « Source/core/editing/TextIterator.h ('k') | 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 45a5f213b3a52a91642d61b585c07bc17b29ca7a..a3069b3bec5203fa5c2aedc57b0791250d4fe3da 100644
--- a/Source/core/editing/TextIterator.cpp
+++ b/Source/core/editing/TextIterator.cpp
@@ -356,6 +356,15 @@ TextIterator::~TextIterator()
{
}
+bool TextIterator::isInsideReplacedElement() const
+{
+ if (atEnd() || length() != 1 || !m_node)
+ return false;
+
+ RenderObject* renderer = m_node->renderer();
+ return renderer && renderer->isReplaced();
+}
+
void TextIterator::advance()
{
if (m_shouldStop)
« no previous file with comments | « Source/core/editing/TextIterator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698