New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 617287 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug-Regression

Blocking:
issue 589681
issue 614588



Sign in to add a comment

padding-top is setting the top AND left offset in flex-direction: column

Project Member Reported by michae...@chromium.org, Jun 3 2016

Issue description

Version: 52.0.2743.19
OS: Chrome

Not reproducing in 51 Linux.

The setup:

* Outer div is a flexbox with flex-direction: column and a top padding.
* Inner div is position: fixed.

In recent Chrome versions, the inner div is offset *horizontally* as well as vertically by the amount of the top padding of the outer div.

https://jsfiddle.net/cwm2z9x3/
 
Screenshot 2016-06-03 at 2.05.42 PM.png
6.5 KB View Download
Labels: OS-All
Confirmed on Linux and CrOS, assuming all.

Comment 2 by e...@chromium.org, Jun 4 2016

Cc: -cbiesin...@chromium.org
Labels: -Pri-1 Pri-2
Owner: cbiesin...@chromium.org
Status: Assigned (was: Untriaged)
Over to cbiesinger for further triage.
Blocking: 589681
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2559d25930929daaa397b783b86633163169805e

commit 2559d25930929daaa397b783b86633163169805e
Author: michaelpg <michaelpg@chromium.org>
Date: Thu Jun 09 19:29:38 2016

MD Settings: Workaround for section expand/collapse animation jank.

Temporary workaround for  crbug.com/617287  by using margin instead of padding.
The result is not 100% identical but is very close.

The transition bug this fixes is the jump right (and left) at the start (and
end) of the subpage open animations.

BUG= 589681 ,  617287 
R=dschuyler@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2041083002
Cr-Commit-Position: refs/heads/master@{#398981}

[modify] https://crrev.com/2559d25930929daaa397b783b86633163169805e/chrome/browser/resources/settings/settings_page/main_page_behavior.js
[modify] https://crrev.com/2559d25930929daaa397b783b86633163169805e/chrome/browser/resources/settings/settings_page_css.html

> the inner div is offset *horizontally* as well as vertically 

I think you mean "instead of" rather than "as well", based on the screenshot and my testing?

If so, I have a fix. If not, I didn't understand the issue :-)
#5: yes, I think that's what I meant.

In fact, `padding-left` exhibits the opposite behavior: it offsets the fixed-position div vertically *instead of* horizontally.

So I guess I could have landed a much simpler workaround by using padding-left instead of padding-top... haha.
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2559d25930929daaa397b783b86633163169805e

commit 2559d25930929daaa397b783b86633163169805e
Author: michaelpg <michaelpg@chromium.org>
Date: Thu Jun 09 19:29:38 2016

MD Settings: Workaround for section expand/collapse animation jank.

Temporary workaround for  crbug.com/617287  by using margin instead of padding.
The result is not 100% identical but is very close.

The transition bug this fixes is the jump right (and left) at the start (and
end) of the subpage open animations.

BUG= 589681 ,  617287 
R=dschuyler@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2041083002
Cr-Commit-Position: refs/heads/master@{#398981}

[modify] https://crrev.com/2559d25930929daaa397b783b86633163169805e/chrome/browser/resources/settings/settings_page/main_page_behavior.js
[modify] https://crrev.com/2559d25930929daaa397b783b86633163169805e/chrome/browser/resources/settings/settings_page_css.html

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7640d892c09f7f8307648de38ca2e29a625dcc10

commit 7640d892c09f7f8307648de38ca2e29a625dcc10
Author: cbiesinger <cbiesinger@chromium.org>
Date: Wed Jun 15 14:50:55 2016

[css-flexbox] Fix handling of borders/padding for abspos items

We can't use the flowAware functions for these because they are
unaffected by the flex-direction. Use regular block functions instead.

R=szager@chromium.org
BUG= 617287 

Review-Url: https://codereview.chromium.org/2052243003
Cr-Commit-Position: refs/heads/master@{#399896}

[add] https://crrev.com/7640d892c09f7f8307648de38ca2e29a625dcc10/third_party/WebKit/LayoutTests/css3/flexbox/border-and-padding-abspos.html
[modify] https://crrev.com/7640d892c09f7f8307648de38ca2e29a625dcc10/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp

Labels: Merge-Request-52
Status: Fixed (was: Assigned)

Comment 11 by tin...@google.com, Jun 16 2016

Labels: -Merge-Request-52 Merge-Approved-52 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M52 (branch: 2743)
Project Member

Comment 12 by bugdroid1@chromium.org, Jun 16 2016

Labels: -merge-approved-52 merge-merged-2743
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/10f49aac698899ab7be5e452fe73c2f7793e40f5

commit 10f49aac698899ab7be5e452fe73c2f7793e40f5
Author: Christian Biesinger <cbiesinger@chromium.org>
Date: Thu Jun 16 14:08:11 2016

[css-flexbox] Fix handling of borders/padding for abspos items

We can't use the flowAware functions for these because they are
unaffected by the flex-direction. Use regular block functions instead.

R=szager@chromium.org
BUG= 617287 

Review-Url: https://codereview.chromium.org/2052243003
Cr-Commit-Position: refs/heads/master@{#399896}
(cherry picked from commit 7640d892c09f7f8307648de38ca2e29a625dcc10)

Review URL: https://codereview.chromium.org/2065383005 .

Cr-Commit-Position: refs/branch-heads/2743@{#367}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[add] https://crrev.com/10f49aac698899ab7be5e452fe73c2f7793e40f5/third_party/WebKit/LayoutTests/css3/flexbox/border-and-padding-abspos.html
[modify] https://crrev.com/10f49aac698899ab7be5e452fe73c2f7793e40f5/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp

Labels: Needs-Feedback
Verified the issue on Chrome Beta# 52.0.2743.49 on Windows 7, Mac OS X 10.11.5 and Ubuntu 14.04 and is not working as intended.
Attaching a screenshot for reference.
@cbiesinger -- Could you please look into the issue and provide an update.
Thank You.
617287.jpg
108 KB View Download
Cc: msrchandra@chromium.org
msrchandra: Thanks for the testing -- that's actually the correct rendering, believe it or not! (Both lines of text have the same offset from the top and no offset from the left)
Labels: TE-Verified-52.0.2743.49
Status: Verified (was: Fixed)
As per # 14, marking this as Verified as the screenshot in # 13 shows the correct rendering.

Comment 16 by yio...@gmail.com, May 16 2017

Fixed?
Yes, this should be fixed. Do you still see this bug?

Comment 18 by yio...@gmail.com, May 16 2017

What about display: grid?
Cc: r...@igalia.com
Labels: -Needs-Feedback
Yes, what about grid? I don't think that has this problem?

Comment 20 by r...@igalia.com, May 24 2017

I don't see any issue with Grid Layout. Am I missing something?

Sign in to add a comment