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

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

Issue 150403003: Consider text alignment and direction when computing the left offset for horizontal writing modes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@issue313593
Patch Set: Rebased patch against master 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 88ac68e1c46dc80056d93ceea742777e081b4d86..d5cd9386fe856e2cf1cb6ba5a9994492f07d9887 100644
--- a/Source/core/rendering/RenderText.cpp
+++ b/Source/core/rendering/RenderText.cpp
@@ -693,22 +693,18 @@ LayoutRect RenderText::localCaretRect(InlineBox* inlineBox, int caretOffset, Lay
rightEdge = max<float>(cb->logicalWidth(), rootRight);
bool rightAligned = false;
- switch (cbStyle->textAlign()) {
+ switch (simplifiedTextAlign(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;
- case TAEND:
- rightAligned = cbStyle->isLeftToRightDirection();
+ default:
+ ASSERT_NOT_REACHED();
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