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

Issue 278603002: Centering text inside a button set to display flex with justify-content: center is impossible (Closed)

Created:
6 years, 7 months ago by harpreet.sk
Modified:
6 years, 7 months ago
CC:
blink-reviews, blink-reviews-rendering, zoltan1, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, pdr., rune+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Centering text inside a button set to display flex with justify-content: center is impossible When we set button display to flex and set justify-content: center chrome does not render text in center. This patch removes this bug by setting justify-content property with value specified in style for the flexbox. BUG=344733 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174761

Patch Set 1 #

Patch Set 2 : New solution considering text-align property #

Patch Set 3 : Fixup for Linux and Windows LayoutTests #

Patch Set 4 : Fixup for Mac Layout tests #

Total comments: 4

Patch Set 5 : Modified solution that do not break existing LayoutTests #

Patch Set 6 : New patchset based on comments #

Total comments: 4

Patch Set 7 : Addresses the changes asked in patch set 6 #

Total comments: 8

Patch Set 8 : Addressing comments for LayoutTests and fix for layouttest that get failed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -0 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html View 1 2 3 4 5 6 7 1 chunk +15 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/button-set-display-flex-justifyContent-center-expected.html View 1 2 3 4 5 6 7 1 chunk +12 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderButton.cpp View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
harpreet.sk
PTAL
6 years, 7 months ago (2014-05-08 14:54:53 UTC) #1
keishi
On 2014/05/08 14:54:53, harpreet.sk wrote: > PTAL This will break the case when text-align: left ...
6 years, 7 months ago (2014-05-09 02:35:48 UTC) #2
harpreet.sk
On 2014/05/09 02:35:48, keishi1 wrote: > On 2014/05/08 14:54:53, harpreet.sk wrote: > > PTAL > ...
6 years, 7 months ago (2014-05-09 09:24:18 UTC) #3
ojan
6 years, 7 months ago (2014-05-10 17:53:32 UTC) #4
keishi
I think RenderButton.cpp looks good. Please make this pass the layout tests.
6 years, 7 months ago (2014-05-12 06:25:07 UTC) #5
cbiesinger
https://codereview.chromium.org/278603002/diff/60001/Source/core/rendering/RenderButton.cpp File Source/core/rendering/RenderButton.cpp (left): https://codereview.chromium.org/278603002/diff/60001/Source/core/rendering/RenderButton.cpp#oldcode92 Source/core/rendering/RenderButton.cpp:92: // RenderBlock::createAnonymousBlock creates a new RenderStyle, so this is ...
6 years, 7 months ago (2014-05-13 07:58:27 UTC) #6
harpreet.sk
https://codereview.chromium.org/278603002/diff/60001/Source/core/rendering/RenderButton.cpp File Source/core/rendering/RenderButton.cpp (left): https://codereview.chromium.org/278603002/diff/60001/Source/core/rendering/RenderButton.cpp#oldcode92 Source/core/rendering/RenderButton.cpp:92: // RenderBlock::createAnonymousBlock creates a new RenderStyle, so this is ...
6 years, 7 months ago (2014-05-13 09:30:44 UTC) #7
cbiesinger
On 2014/05/13 09:30:44, harpreet.sk wrote: > https://codereview.chromium.org/278603002/diff/60001/Source/core/rendering/RenderButton.cpp#oldcode94 > Source/core/rendering/RenderButton.cpp:94: innerStyle->setFlexGrow(1.0f); > On 2014/05/13 07:58:27, cbiesinger ...
6 years, 7 months ago (2014-05-14 12:49:19 UTC) #8
harpreet.sk
On 2014/05/14 12:49:19, cbiesinger wrote: > My concern is that this will change the behavior ...
6 years, 7 months ago (2014-05-14 13:33:30 UTC) #9
cbiesinger
On 2014/05/14 13:33:30, harpreet.sk wrote: > On 2014/05/14 12:49:19, cbiesinger wrote: > > > My ...
6 years, 7 months ago (2014-05-14 13:46:26 UTC) #10
harpreet.sk
I have uploaded a new patch that set the margins to be auto only in ...
6 years, 7 months ago (2014-05-15 09:25:51 UTC) #11
harpreet.sk
PING
6 years, 7 months ago (2014-05-16 08:13:07 UTC) #12
cbiesinger
Sorry, I was on a plane. I will take a look today.
6 years, 7 months ago (2014-05-16 21:30:35 UTC) #13
cbiesinger
So, I previously misunderstood what this bug was about. The text-align code in RenderButton misled ...
6 years, 7 months ago (2014-05-17 00:04:23 UTC) #14
harpreet.sk
On 2014/05/17 00:04:23, cbiesinger wrote: > So, I previously misunderstood what this bug was about. ...
6 years, 7 months ago (2014-05-18 10:52:23 UTC) #15
harpreet.sk
PING
6 years, 7 months ago (2014-05-19 08:34:35 UTC) #16
cbiesinger
On 2014/05/19 08:34:35, harpreet.sk wrote: > PING (I don't usually work on weekends.) justify-content and ...
6 years, 7 months ago (2014-05-19 17:11:43 UTC) #17
esprehn
On 2014/05/19 17:11:43, cbiesinger wrote: > ... > > Huh, that is interesting because I ...
6 years, 7 months ago (2014-05-19 21:09:44 UTC) #18
cbiesinger
On 2014/05/19 21:09:44, esprehn wrote: > On 2014/05/19 17:11:43, cbiesinger wrote: > > ... > ...
6 years, 7 months ago (2014-05-19 21:15:33 UTC) #19
esprehn
On 2014/05/19 21:15:33, cbiesinger wrote: > On 2014/05/19 21:09:44, esprehn wrote: > > On 2014/05/19 ...
6 years, 7 months ago (2014-05-19 21:27:51 UTC) #20
cbiesinger
On 2014/05/19 21:27:51, esprehn wrote: > On 2014/05/19 21:15:33, cbiesinger wrote: > > On 2014/05/19 ...
6 years, 7 months ago (2014-05-19 21:30:34 UTC) #21
harpreet.sk
I have uploaded a new patch fixing justify-content. Please have a look.
6 years, 7 months ago (2014-05-20 10:04:13 UTC) #22
cbiesinger
https://codereview.chromium.org/278603002/diff/90001/LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html File LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html (right): https://codereview.chromium.org/278603002/diff/90001/LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html#newcode5 LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html:5: button { I think you could make this a ...
6 years, 7 months ago (2014-05-21 00:18:10 UTC) #23
harpreet.sk
Please have another look. https://codereview.chromium.org/278603002/diff/90001/LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html File LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html (right): https://codereview.chromium.org/278603002/diff/90001/LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html#newcode5 LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html:5: button { On 2014/05/21 00:18:10, ...
6 years, 7 months ago (2014-05-21 06:39:57 UTC) #24
harpreet.sk
6 years, 7 months ago (2014-05-23 10:12:37 UTC) #25
cbiesinger
lgtm thanks! an owner will have to give the official lgtm - ojan?
6 years, 7 months ago (2014-05-23 18:59:14 UTC) #26
ojan
lgtm Feel free to commit after addressing my test nits. https://codereview.chromium.org/278603002/diff/110001/LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html File LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html (right): https://codereview.chromium.org/278603002/diff/110001/LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html#newcode1 ...
6 years, 7 months ago (2014-05-23 19:52:39 UTC) #27
harpreet.sk
https://codereview.chromium.org/278603002/diff/110001/LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html File LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html (right): https://codereview.chromium.org/278603002/diff/110001/LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html#newcode1 LayoutTests/fast/forms/button-set-display-flex-justifyContent-center.html:1: <!doctype html> On 2014/05/23 19:52:39, ojan wrote: > Nit: ...
6 years, 7 months ago (2014-05-24 11:17:21 UTC) #28
harpreet.sk
The CQ bit was checked by harpreet.sk@samsung.com
6 years, 7 months ago (2014-05-24 11:17:35 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/harpreet.sk@samsung.com/278603002/120001
6 years, 7 months ago (2014-05-24 11:17:47 UTC) #30
commit-bot: I haz the power
6 years, 7 months ago (2014-05-24 12:37:53 UTC) #31
Message was sent while issue was closed.
Change committed as 174761

Powered by Google App Engine
This is Rietveld 408576698