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

Unified Diff: Source/core/rendering/RenderObject.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.h ('k') | Source/core/rendering/RenderText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index 35f06e3a4147574ce162536bc6ce6959ae9ec2d1..01a18dd39c2ddc0560ed2833509dfc1630bba7cb 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -3209,39 +3209,6 @@ PositionWithAffinity RenderObject::createPositionWithAffinity(const Position& po
return createPositionWithAffinity(0, DOWNSTREAM);
}
-ETextAlign RenderObject::simplifiedTextAlign(const ETextAlign& textAlign, const RootInlineBox* rootInlineBox) const
-{
- TextDirection direction;
- if (rootInlineBox && rootInlineBox->renderer().style()->unicodeBidi() == Plaintext)
- direction = rootInlineBox->direction();
- else
- direction = style()->direction();
-
- bool isLTR = isLeftToRightDirection(direction);
-
- switch (textAlign) {
- case LEFT:
- case WEBKIT_LEFT:
- return LEFT;
- case RIGHT:
- case WEBKIT_RIGHT:
- return RIGHT;
- case CENTER:
- case WEBKIT_CENTER:
- return CENTER;
- case TASTART:
- return isLTR ? LEFT : RIGHT;
- case TAEND:
- return isLTR ? RIGHT : LEFT;
- default:
- break;
- }
-
- // The point of this method is to return only LEFT, RIGHT, CENTER or
- // JUSTIFY, so we can only return JUSTIFY if this point is reached.
- return JUSTIFY;
-}
-
CursorDirective RenderObject::getCursor(const LayoutPoint&, Cursor&) const
{
return SetCursorBasedOnStyle;
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/RenderText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698