Child div with opacity doesn't fill up parent's width when not an integer
Reported by
pel...@gmail.com,
Jan 3 2018
|
|||||||
Issue descriptionUserAgent: 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/
,
Jan 3 2018
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.
,
Jan 3 2018
,
Jan 3 2018
The opacity is creating a composited layer and that layer is apparently not sized correctly (or maybe not positioned correctly).
,
Jan 10 2018
I can't repro this on ToT, and I'm not seeing any composited layer. Was the JS fiddle modified?
,
Jan 10 2018
Nope. Jsfiddle is the same. Still seeing this on stable on Mac (and on Android, fwiw)
,
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.
,
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 🤷
,
Jan 10 2018
,
Jan 18 2018
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.
,
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
,
Jan 23 2018
,
Mar 17 2018
Issue 800295 has been merged into this issue. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by pel...@gmail.com
, Jan 3 2018