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

Unified Diff: Source/core/rendering/RenderText.cpp

Issue 20681004: Make first-letter style to work with editing Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-08-01T17:57:42 Created 7 years, 5 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/rendering/RenderText.cpp
diff --git a/Source/core/rendering/RenderText.cpp b/Source/core/rendering/RenderText.cpp
index 7911acabef303ca84e6695b2ff682f19cd9b8015..ab3cb1ca6564071a58710c3125bc2f5bb7a3e4eb 100644
--- a/Source/core/rendering/RenderText.cpp
+++ b/Source/core/rendering/RenderText.cpp
@@ -528,7 +528,7 @@ static PositionWithAffinity createPositionWithAffinityForBox(const InlineBox* bo
affinity = offset > box->caretMinOffset() ? VP_UPSTREAM_IF_POSSIBLE : DOWNSTREAM;
break;
}
- return box->renderer()->createPositionWithAffinity(offset, affinity);
+ return box->renderer()->createPositionWithAffinity(offset + toRenderText(box->renderer())->textStartOffset(), affinity);
tkent 2013/08/02 02:22:19 Is it safe to assume box->renderer() is RenderText
yosin_UTC9 2013/08/02 05:01:55 No. Good catch!
}
static PositionWithAffinity createPositionWithAffinityForBoxAfterAdjustingOffsetForBiDi(const InlineTextBox* box, int offset, ShouldAffinityBeDownstream shouldAffinityBeDownstream)

Powered by Google App Engine
This is Rietveld 408576698