[Webkit-unassigned] [Bug 71225] [chromium] when position:fixed in a separate layer it doesn't get full resolution with css transform

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 2 15:10:11 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=71225





--- Comment #12 from Vangelis Kokkevis <vangelis at chromium.org>  2011-11-02 15:10:11 PST ---
(From update of attachment 113374)
View in context: https://bugs.webkit.org/attachment.cgi?id=113374&action=review

I'm not sure I understand why we have to be applying the scale in all these places.  It seems to me that when the page is scaled there will be a scale transform at the top of the tree that will affect the positions and bounds of all layers.  Only when it comes time to paint the contents of an individual layer do we have to scale the canvas by the contentsScale and adjust the draw transform by 1/contentsScale to make sure it renders correctly.

That should work for all composited layers, not just the fixed position ones.

> Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp:509
> +    IntSize layerSize(m_size.width() * contentsScaleFactor, m_size.height() * contentsScaleFactor);

If the whole page is scaled via a scale transform at the very top of the tree, then you shouldn't have to worry about accommodating for scales down here.

> Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp:530
> +    primaryLayer()->setAnchorPointZ(m_anchorPoint.z() * contentsScaleFactor);

Not sure you need that.  You're not adjusting the x and y either...

> Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp:541
> +    if (appliesPageScale()) {

style: no braces

> Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp:542
> +        layerTransform = TransformationMatrix().scale(1 / contentsScale()) * m_transform;

Should be 1.0 to force a float division ? 

Also, the scale probably needs to be applied to all 3d axes so I think you need: 
layerTransform.scale3d(1/cs, 1/cs, 1/cs);

> Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp:593
> +        m_layer->setContentsScale(contentsScale());

Isn't the scale going to be set by updateContentsScale() above?

> Source/WebCore/platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:191
>      PlatformContextSkia platformContext(canvas);

I believe you'll need to apply the scale here too.

> Source/WebCore/rendering/RenderLayer.cpp:3851
> +    return transform() && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || paintsToWindow || paintsForFixedPositionLayer);

I don't think you want to be special-casing fixed position elements...

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list