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

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

Issue 176763011: Revert "Consider text alignment and direction when computing the left offset for horizontal writing… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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/rendering/RenderObject.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderText.cpp
diff --git a/Source/core/rendering/RenderText.cpp b/Source/core/rendering/RenderText.cpp
index 7d6096c4a29127e77ff85aee1757053231d3976a..bb621bdc2f00687a02b47452b79eacfc44584a28 100644
--- a/Source/core/rendering/RenderText.cpp
+++ b/Source/core/rendering/RenderText.cpp
@@ -692,18 +692,22 @@ LayoutRect RenderText::localCaretRect(InlineBox* inlineBox, int caretOffset, Lay
rightEdge = max<float>(cb->logicalWidth(), rootRight);
bool rightAligned = false;
- switch (simplifiedTextAlign(cbStyle->textAlign())) {
+ switch (cbStyle->textAlign()) {
case RIGHT:
+ case WEBKIT_RIGHT:
rightAligned = true;
break;
case LEFT:
+ case WEBKIT_LEFT:
case CENTER:
+ case WEBKIT_CENTER:
break;
case JUSTIFY:
+ case TASTART:
rightAligned = !cbStyle->isLeftToRightDirection();
break;
- default:
- ASSERT_NOT_REACHED();
+ case TAEND:
+ rightAligned = cbStyle->isLeftToRightDirection();
break;
}
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698