Bug 97484 - [Sub-pixel layout] incorrect rendering when painting sub-layers as their own root
Summary: [Sub-pixel layout] incorrect rendering when painting sub-layers as their own ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Levi Weintraub
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-24 14:44 PDT by Levi Weintraub
Modified: 2012-10-05 19:01 PDT (History)
4 users (show)

See Also:


Attachments
Fixes the one known occurrence of the bug (1.10 KB, patch)
2012-09-26 13:23 PDT, Levi Weintraub
no flags Details | Formatted Diff | Diff
Patch (2.22 KB, patch)
2012-09-28 15:30 PDT, Levi Weintraub
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Levi Weintraub 2012-09-24 14:44:15 PDT
Upstream bug: http://code.google.com/p/chromium/issues/detail?id=150624

RenderLayerBacking::paintIntoLayer passes LayoutSize() into RenderLayer::paint, which can result in off-by-one paint errors with sub-pixel layout enabled. It should use the sub-pixel fraction from the root layer.

I'm not sure of how, or if, this can be tested with a LayoutTest...
Comment 1 Levi Weintraub 2012-09-26 13:18:39 PDT
My previous comment wasn't entirely accurate. The issue comes to losing the correct sub-pixel offset by virtue of the layer bounds being zero when painting a layer in a vacuum. This is because convertToLayerCoords is a no-op when we're treating ourselves as our own root.
Comment 2 Levi Weintraub 2012-09-26 13:23:58 PDT
Created attachment 165860 [details]
Fixes the one known occurrence of the bug

This eliminates the issue that I've seen, but I'm not convinced this is the right thing for all cases. I'm continuing to investigate...
Comment 3 Levi Weintraub 2012-09-28 15:30:56 PDT
Created attachment 166324 [details]
Patch
Comment 4 Eric Seidel (no email) 2012-10-01 11:47:10 PDT
Comment on attachment 166324 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=166324&action=review

Seems reasonable.  I normally defer to Simon or James for Layer reviews, so you might want to poke one of them in #webkit to make sure.

> Source/WebCore/ChangeLog:9
> +        happens, a sub-RenderLayer is called to paint as its own root. Normally, we attempt to preserve

a non-root render layer?
Comment 5 Levi Weintraub 2012-10-03 14:29:44 PDT
Committed r130322: <http://trac.webkit.org/changeset/130322>
Comment 6 Levi Weintraub 2012-10-05 19:01:49 PDT
Comment on attachment 166324 [details]
Patch

Clearing flags.