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

Unified Diff: Source/core/dom/PositionIterator.cpp

Issue 20681004: Make first-letter style to work with editing Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-09-20T18:27:32 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/dom/PositionIterator.cpp
diff --git a/Source/core/dom/PositionIterator.cpp b/Source/core/dom/PositionIterator.cpp
index 5cc76b10806b1aa7cfbe0da0200b9766bb96b019..6427a2d2ee68752473d5d1fa62e440ddaf495ceb 100644
--- a/Source/core/dom/PositionIterator.cpp
+++ b/Source/core/dom/PositionIterator.cpp
@@ -31,6 +31,7 @@
#include "core/editing/htmlediting.h"
#include "core/html/HTMLHtmlElement.h"
#include "core/rendering/RenderBlock.h"
+#include "core/rendering/RenderTextFragment.h"
namespace WebCore {
@@ -103,6 +104,14 @@ void PositionIterator::decrement()
}
}
+RenderObject* PositionIterator::renderer() const
ojan 2013/09/23 23:01:45 This is confusing since it's only the renderer of
+{
+ if (!m_anchorNode)
ojan 2013/09/23 23:01:45 This null check is redundant with the one in Posit
+ return 0;
+ Position pos = *this;
+ return pos.rendererOfAnchorNode();
+}
+
bool PositionIterator::atStart() const
{
if (!m_anchorNode)
@@ -144,7 +153,7 @@ bool PositionIterator::isCandidate() const
if (!m_anchorNode)
return false;
- RenderObject* renderer = m_anchorNode->renderer();
+ RenderObject* renderer = this->renderer();
if (!renderer)
return false;

Powered by Google App Engine
This is Rietveld 408576698