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

Issue 798627 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Child div with opacity doesn't fill up parent's width when not an integer

Reported by pel...@gmail.com, Jan 3 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36

Steps to reproduce the problem:
1. create a child div inside of a parent with non-integer width
2. apply opacity to child div
3. child div doesn't seem to take up entire parent's width

What is the expected behavior?
child div should take up all of its parent's width

What went wrong?
while devtools says the child div has the correct, fractional width, it is clear that there is a gap between the parent div and the child.

when opacity is removed, the child takes up the whole width as expected.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 63.0.3239.84  Channel: stable
OS Version: OS X 10.13.2
Flash Version: 

JS Fiddle here: https://jsfiddle.net/sr33hw9z/1/
 
test.html
585 bytes View Download
Screen Shot 2018-01-02 at 8.18.05 PM.png
31.7 KB View Download

Comment 1 by pel...@gmail.com, Jan 3 2018

wonder if related to this issue: https://bugs.chromium.org/p/chromium/issues/detail?id=703095
Able to reproduce this issue on reported version 63.0.3239.84 and on latest canary 65.0.3309.0 using Mac 10.13.1, and the same is not seen using windows 10, Ubuntu 14.04 and the same Issue is seen from M50[50.0.2661.0]. Hence considering this issue as Non-Regression and marking as Untriaged.
Cc: viswatej...@techmahindra.com sc00335...@techmahindra.com
Labels: Triaged-ET M-65 Needs-Triage-M63
Status: Untriaged (was: Unconfirmed)
Components: -Blink>Paint Blink>Compositing
Labels: -M-65 -Needs-Triage-M63
Owner: trchen@chromium.org
Status: Assigned (was: Untriaged)
The opacity is creating a composited layer and that layer is apparently not sized correctly (or maybe not positioned correctly).

Comment 5 by trchen@chromium.org, Jan 10 2018

Status: Unconfirmed (was: Assigned)
I can't repro this on ToT, and I'm not seeing any composited layer. Was the JS fiddle modified?

Comment 6 by pel...@gmail.com, Jan 10 2018

Nope. Jsfiddle is the same. Still seeing this on stable on Mac (and on Android, fwiw)

Comment 7 by trchen@chromium.org, Jan 10 2018

Thanks for clarification! I don't have a Mac at hand right now, will try to repro this later today.

As for what you saw on Android, does the bottom banner without opacity also have visible seams on both left edge and right edge? If that's the case, I believe it is what's known as "anti-aliasing edge bleeding". In general it is very difficult to fix without FSAA. At this moment we don't consider it a bug.

But if it is leaking one solid pixel like the screenshot has shown, it is likely a layout bug and we should investigate.

Comment 8 by pel...@gmail.com, Jan 10 2018

Np! It seems like there might be a pixel, or even less, missing on Android, as well. See screenshot below. Hope this makes it easier to debug rather than more difficult 🤷
Screenshot_20180109-201211.png
65.9 KB View Download
Status: Assigned (was: Unconfirmed)
This can be repro'd  on Linux with: --force-device-scale-factor=2 --enable-use-zoom-for-dsf=false

I guess the bound of the compositing recorder is not snapped correctly.
Project Member

Comment 11 by bugdroid1@chromium.org, Jan 23 2018

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

commit f7e9b915ec017f24bf25d3fed8c0eef4e85ecc8f
Author: Tien-Ren Chen <trchen@chromium.org>
Date: Tue Jan 23 11:24:10 2018

[Blink/Paint] Descendant bounds should be snapped before passing to CompositingRecorder

It is almost never correct to cast LayoutUnit to floats directly. They
should be snapped first to determine the used layout position.

BUG= 798627 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ib0e3a5139e393cee3fdc643c66555afe05777eb5
Reviewed-on: https://chromium-review.googlesource.com/872211
Commit-Queue: Tien-Ren Chen <trchen@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531206}
[add] https://crrev.com/f7e9b915ec017f24bf25d3fed8c0eef4e85ecc8f/third_party/WebKit/LayoutTests/fast/sub-pixel/save-layer-bounds-should-snap-expected.html
[add] https://crrev.com/f7e9b915ec017f24bf25d3fed8c0eef4e85ecc8f/third_party/WebKit/LayoutTests/fast/sub-pixel/save-layer-bounds-should-snap.html
[modify] https://crrev.com/f7e9b915ec017f24bf25d3fed8c0eef4e85ecc8f/third_party/WebKit/LayoutTests/platform/linux/fast/reflections/opacity-reflection-transform-expected.png
[modify] https://crrev.com/f7e9b915ec017f24bf25d3fed8c0eef4e85ecc8f/third_party/WebKit/LayoutTests/platform/mac/fast/reflections/opacity-reflection-transform-expected.png
[modify] https://crrev.com/f7e9b915ec017f24bf25d3fed8c0eef4e85ecc8f/third_party/WebKit/LayoutTests/platform/win/fast/reflections/opacity-reflection-transform-expected.png
[modify] https://crrev.com/f7e9b915ec017f24bf25d3fed8c0eef4e85ecc8f/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp

Status: Fixed (was: Assigned)
Cc: chrishtr@chromium.org trchen@chromium.org pdr@chromium.org
 Issue 800295  has been merged into this issue.

Sign in to add a comment