Chromium Code Reviews| Index: Source/core/rendering/RenderButton.cpp |
| diff --git a/Source/core/rendering/RenderButton.cpp b/Source/core/rendering/RenderButton.cpp |
| index 4a58833036388f69ba2117ec3f5f007b366bb000..bf1bac58cda037c5ed8c9065e00320e02cb8c660 100644 |
| --- a/Source/core/rendering/RenderButton.cpp |
| +++ b/Source/core/rendering/RenderButton.cpp |
| @@ -89,13 +89,20 @@ void RenderButton::styleDidChange(StyleDifference diff, const RenderStyle* oldSt |
| void RenderButton::setupInnerStyle(RenderStyle* innerStyle) |
| { |
| ASSERT(innerStyle->refCount() == 1); |
| - // RenderBlock::createAnonymousBlock creates a new RenderStyle, so this is |
|
cbiesinger
2014/05/13 07:58:27
You need to keep this comment.
harpreet.sk
2014/05/13 09:30:44
I will keep this comment in next patch.
|
| - // safe to modify. |
| - innerStyle->setFlexGrow(1.0f); |
|
cbiesinger
2014/05/13 07:58:27
Why remove this line?
harpreet.sk
2014/05/13 09:30:44
Actually i removed this line as this line will dis
|
| // Use margin:auto instead of align-items:center to get safe centering, i.e. |
| // when the content overflows, treat it the same as align-items: flex-start. |
| innerStyle->setMarginTop(Length()); |
| innerStyle->setMarginBottom(Length()); |
| + |
| + if (innerStyle->textAlign() == LEFT || innerStyle->textAlign() == WEBKIT_LEFT) { |
| + innerStyle->setMarginRight(Length()); |
| + } else if (innerStyle->textAlign() == RIGHT || innerStyle->textAlign() == WEBKIT_RIGHT) { |
| + innerStyle->setMarginLeft(Length()); |
| + } else { |
| + innerStyle->setMarginLeft(Length()); |
| + innerStyle->setMarginRight(Length()); |
| + } |
| + |
| innerStyle->setFlexDirection(style()->flexDirection()); |
| } |