Issue metadata
Sign in to add a comment
|
Unwanted movement of a layer when changing being composited and non-composited |
||||||||||||||||||||||
Issue descriptionThis is the root cause of bug 897006 . kristipark@chromium.org created the attached test case "test (6).html". "jitter.html" is a further reduced test case. Jitter occurs on an object under an iframe with subpixel location when the object changes between composited and non-composited status.
,
Oct 25
,
Oct 25
,
Oct 26
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ecac02278f03bf594b7ce36b0c53583b7a965565 commit ecac02278f03bf594b7ce36b0c53583b7a965565 Author: Xianzhu Wang <wangxianzhu@chromium.org> Date: Fri Oct 26 23:09:18 2018 [PE] Fix -1px offset of compositing contents in subpixel-positioned iframe For a composited object whose layout location is at (10.5, 10.5), we snap the layer location to (11, 11), and keep a subpixel accumulation (-0.5, -0.5). RoundIntPoint(LayoutUnit(-0.5, -0.5)) is zero to ensure that the contents of the composited object will paint at correct location. Previously in CompositedLayerMapping::UpdateAfterPartResize() we used FloatSize::RoundedIntSize() which rounded (-0.5, -0.5) to (-1, -1) (which is based on the roundf() behavior), causing the iframe's document layer to be placed at unwanted -1px offset. Now use LayoutSize::RoundedIntSize() to keep consistent pixel snapping behavior. Bug: 898941 Change-Id: I50b27565850061aec9cffffbe77061570683610b Reviewed-on: https://chromium-review.googlesource.com/c/1302327 Reviewed-by: Philip Rogers <pdr@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#603241} [add] https://crrev.com/ecac02278f03bf594b7ce36b0c53583b7a965565/third_party/WebKit/LayoutTests/paint/subpixel/subpixel-composited-iframe-expected.html [add] https://crrev.com/ecac02278f03bf594b7ce36b0c53583b7a965565/third_party/WebKit/LayoutTests/paint/subpixel/subpixel-composited-iframe.html [modify] https://crrev.com/ecac02278f03bf594b7ce36b0c53583b7a965565/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc
,
Oct 26
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by kristip...@chromium.org
, Oct 25