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

Issue 723788 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

3D transforms do not show scrollbars

Project Member Reported by atotic@chromium.org, May 17 2017

Issue description

Chrome Version: 58.0.3029.110 (
OS: All

What steps will reproduce the problem?
(1) Load attached file

What is the expected result?

#container should have scrollbars. #target 3D transform causes it to extend beyond padding-box.

What happens instead?

No scrollbars.

Edge/FF display scrollbars. 
Spec agrees:
https://drafts.csswg.org/css-overflow-4/#scrollable-overflow

Tricky part here is dealing with preserve3D.

 
3D_overflow_bug.html
488 bytes View Download

Comment 1 by szager@chromium.org, May 17 2017

I put the demo into jsbin:

https://jsbin.com/zemipipife/edit?html,output
Components: Blink>Compositing Blink>Scroll
Stefan, are you actually thinking of working on this?

Comment 3 by szager@chromium.org, May 17 2017

Cc: szager@chromium.org
Owner: ----
Status: Available (was: Assigned)
No, I'm not :)  Aleks gave it to me because I told him to file the bug.

Unassigning.

Comment 4 by atotic@chromium.org, Jun 12 2017

Cc: trchen@chromium.org
trchen said he'd be interested in looking into this in LegacyLayout.

Comment 5 by trchen@chromium.org, Jun 12 2017

chrishtr@: Another spec bug! Not urgent, but is something we need to think about.

It seems to me that the transformed element's post-transform box has been included in layout overflow, but is computed incorrectly. Let's say if we changed it to transform:translateY(100px)rotateY(-45deg), the box will be scrollable by 100px.

I think it is a bug with PropertyTreeBuilder/GeometryMapper that we failed to include perspective in layout overflow computation (but correctly included it during paint/draw).

This is a tricky case though. The transform spec wasn't so clear whether perspective should be applied before or after flattening, and whether perspective origin follows scrolling if applied before flattening.

Web developers prefer to apply perspective before, and also prefer perspective origin anchor to the (unscrolled) border box, in order to support parallax. But I didn't realize if we do this, the transformed layout overflow will depend on scroll offset. We need to think about what's the reasonable thing to do here and propose it to the spec. :/
Owner: chrishtr@chromium.org
Status: Assigned (was: Available)
PropertyTreeBuilder/GeometryMapper are not currently used to compute layout overflow.
The logic appears to be in LayoutBox::LayoutOverflowRectForPropagation(), which
does this:

LayoutRect rect = BorderBoxRect();
Layer()->CurrentTransform().MapRect(rect);

Furthermore, only children whose containing block is the scroller are included (of course)
Therefore, we should use LayoutObject::GetTransformFromContainer, which will apply perspective.

As for flattening, we decided that that is applied after perspective. See:

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/LayoutBox.cpp?sq=package:chromium&dr=CSs&l=1219

in LayoutBox::MapVisualRectToContainer.
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 24 2017

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

commit 602f4cdf9e0944a68fe91d12ead5b2ece186b8e3
Author: Chris Harrelson <chrishtr@chromium.org>
Date: Sat Jun 24 01:00:35 2017

Account for perspective of the scroller when determining a transformed
child's contribution to layout overflow.

Bug:  723788 
Change-Id: I18902203e16b058d3f2fa715c10605ebf8a50d36
Reviewed-on: https://chromium-review.googlesource.com/539059
Commit-Queue: Chris harrelson <chrishtr@chromium.org>
Reviewed-by: Tien-Ren Chen <trchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482101}
[modify] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/compositing/overflow/accelerated-overflow-scroll-should-not-affect-perspective-expected.txt
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/overflow/overflow-transform-perspective.html
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/linux/overflow/overflow-transform-perspective-expected.png
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/linux/overflow/overflow-transform-perspective-expected.txt
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng/overflow/overflow-transform-perspective-expected.png
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng/overflow/overflow-transform-perspective-expected.txt
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/mac-mac10.9/overflow/overflow-transform-perspective-expected.png
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/layout_ng/overflow/overflow-transform-perspective-expected.png
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/mac/overflow/overflow-transform-perspective-expected.png
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/mac/overflow/overflow-transform-perspective-expected.txt
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng/overflow/overflow-transform-perspective-expected.png
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng/overflow/overflow-transform-perspective-expected.txt
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/win/overflow/overflow-transform-perspective-expected.png
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/win/overflow/overflow-transform-perspective-expected.txt
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng/overflow/overflow-transform-perspective-expected.png
[add] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng/overflow/overflow-transform-perspective-expected.txt
[delete] https://crrev.com/adefd5760bfb4138b462801d4c695d022b0e442b/third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/accelerated-overflow-scroll-should-not-affect-perspective-expected.txt
[modify] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/Source/core/layout/LayoutBlockTest.cpp
[modify] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/Source/core/layout/LayoutBox.cpp
[modify] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/Source/core/layout/LayoutBox.h
[modify] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
[modify] https://crrev.com/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3/third_party/WebKit/Source/core/layout/api/LineLayoutBox.h

Status: Fixed (was: Assigned)

Comment 9 by atotic@google.com, Jul 10 2017

Thanks, glad trchen was in our office when we were disussing overflow.

This will make the NG transition smoother.
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 10 2017

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

commit 87eb92e903a8b3a0fb93617f813408eb5e53fedb
Author: pdr <pdr@chromium.org>
Date: Mon Jul 10 21:37:58 2017

Mark overflow/overflow-transform-002.html as passing

This is passing after:
https://chromium.googlesource.com/chromium/src.git/+/602f4cdf9e0944a68fe91d12ead5b2ece186b8e3

Bug:  723788 
Change-Id: I1a322e8bd4641c33566794e287ae28d2c96a9f71
Reviewed-on: https://chromium-review.googlesource.com/565525
Commit-Queue: Philip Rogers <pdr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485404}
[modify] https://crrev.com/87eb92e903a8b3a0fb93617f813408eb5e53fedb/third_party/WebKit/LayoutTests/TestExpectations

Sign in to add a comment