| Index: Source/core/rendering/RenderObject.cpp
|
| diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
|
| index a055b5ee4ce817dc1a58f7deff8bbb6664df9d92..e9defe6b0ebfb0c8bac5cefa5db11678aed16741 100644
|
| --- a/Source/core/rendering/RenderObject.cpp
|
| +++ b/Source/core/rendering/RenderObject.cpp
|
| @@ -3264,6 +3264,39 @@ 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;
|
|
|