New issue
Advanced search Search tips

Issue 898941 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 26
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Unwanted movement of a layer when changing being composited and non-composited

Project Member Reported by wangxianzhu@chromium.org, Oct 25

Issue description

This 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.
 
jitter.html
420 bytes View Download
test (6).html
1.4 KB View Download
Cc: kristip...@chromium.org
Thanks for looking into this!
Description: Show this description
Description: Show this description
Project Member

Comment 4 by bugdroid1@chromium.org, 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

Status: Fixed (was: Assigned)

Sign in to add a comment