[webkit-reviews] review granted: [Bug 103786] Use background color for GraphicsLayers when applicable : [Attachment 177883] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 7 11:51:50 PST 2012


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Noam Rosenthal
<noam at webkit.org>'s request for review:
Bug 103786: Use background color for GraphicsLayers when applicable
https://bugs.webkit.org/show_bug.cgi?id=103786

Attachment 177883: Patch
https://bugs.webkit.org/attachment.cgi?id=177883&action=review

------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=177883&action=review


> Source/WebCore/rendering/RenderLayerBacking.cpp:798
> +    if (isSimpleContainerCompositingLayer() && renderer()->hasBackground())

isSimpleContainerCompositingLayer() does quite a bit of work. I wonder if we
should cache this or pass it in.

> Source/WebCore/rendering/RenderLayerBacking.cpp:801
> +	   m_graphicsLayer->setContentsRect(backgroundBox());
> +    else
> +	   m_graphicsLayer->setContentsRect(contentsBox());

I prefer things like this to be written as:

FloatRect contentsRect;
if (...)
    contentsRect = 
else
   contentsRect =

m_graphicsLayer->setContentsRect(contentsRect);


More information about the webkit-reviews mailing list