[Webkit-unassigned] [Bug 140183] Failed to display background image when body is composited
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 30 19:11:34 PST 2015
https://bugs.webkit.org/show_bug.cgi?id=140183
--- Comment #25 from zalan <zalan at apple.com> ---
Comment on attachment 245721
--> https://bugs.webkit.org/attachment.cgi?id=245721
Render: properly update body's background image
View in context: https://bugs.webkit.org/attachment.cgi?id=245721&action=review
> Source/WebCore/rendering/RenderBox.cpp:119
> - return documentElementRenderer
> + bool skip = documentElementRenderer
> && !documentElementRenderer->hasBackground()
> && (documentElementRenderer == bodyElementRenderer->parent());
> +
> + // Also only skip painting background if document's layer can draw its content.
> + if (skip && bodyElementRenderer->isComposited() && documentElementRenderer->isComposited())
> + skip &= downcast<RenderLayerModelObject>(documentElementRenderer)->layer()->backing()->graphicsLayer()->drawsContent();
> +
> + return skip;
This is getting confusing. I think it's time to switch to early returns.
ASSERT(bodyElementRenderer->isBody());
// The <body> only paints its background if the root element has defined a background independent of the body,
// or if the <body>'s parent is not the document element's renderer (e.g. inside SVG foreignObject).
auto documentElementRenderer = bodyElementRenderer->document().documentElement()->renderer();
if (!documentElementRenderer)
return false;
if (documentElementRenderer->hasBackground())
return false;
if (documentElementRenderer != bodyElementRenderer->parent())
return false;
if (!bodyElementRenderer->isComposited() || !documentElementRenderer->isComposited()))
return false;
ASSERT(is<RenderLayerModelObject>(documentElementRenderer));
return downcast<RenderLayerModelObject>(documentElementRenderer)->layer()->backing()->graphicsLayer()->drawsContent();
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150131/316585ac/attachment-0002.html>
More information about the webkit-unassigned
mailing list