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

Unified Diff: Source/core/rendering/RenderBoxModelObject.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/RenderBox.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBoxModelObject.cpp
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp
index b310eb090c0a68b65dd1298b0c0094415b615904..a33ac25c186917a5a668af2f49614bd27dfeda1a 100644
--- a/Source/core/rendering/RenderBoxModelObject.cpp
+++ b/Source/core/rendering/RenderBoxModelObject.cpp
@@ -2638,21 +2638,26 @@ LayoutRect RenderBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width,
CaretAlignment alignment = alignLeft;
- switch (simplifiedTextAlign(currentStyle->textAlign())) {
+ switch (currentStyle->textAlign()) {
case LEFT:
+ case WEBKIT_LEFT:
break;
case CENTER:
+ case WEBKIT_CENTER:
alignment = alignCenter;
break;
case RIGHT:
+ case WEBKIT_RIGHT:
alignment = alignRight;
break;
case JUSTIFY:
+ case TASTART:
if (!currentStyle->isLeftToRightDirection())
alignment = alignRight;
break;
- default:
- ASSERT_NOT_REACHED();
+ case TAEND:
+ if (currentStyle->isLeftToRightDirection())
+ alignment = alignRight;
break;
}
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698