[Webkit-unassigned] [Bug 112313] Compute image background size when testing for background visibility

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 13 21:51:28 PDT 2013


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


Simon Fraser (smfr) <simon.fraser at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #193058|review?                     |review+
               Flag|                            |




--- Comment #2 from Simon Fraser (smfr) <simon.fraser at apple.com>  2013-03-13 21:53:53 PST ---
(From update of attachment 193058)
View in context: https://bugs.webkit.org/attachment.cgi?id=193058&action=review

> Source/WebCore/rendering/RenderBox.cpp:1151
> +LayoutRect RenderBox::backgroundBoundsRect() const
> +{
> +    ASSERT(hasBackground());
> +    LayoutRect backgroundRect = borderBoxRect();
> +
> +    Color backgroundColor = style()->visitedDependentColor(CSSPropertyBackgroundColor);
> +    if (backgroundColor.isValid() && backgroundColor.alpha())
> +        return backgroundRect;
> +    if (!style()->backgroundLayers()->image() || style()->backgroundLayers()->next())
> +        return backgroundRect;
> +    BackgroundImageGeometry geometry;
> +    const_cast<RenderBox*>(this)->calculateBackgroundImageGeometry(style()->backgroundLayers(), backgroundRect, geometry);
> +    return geometry.destRect();

Given what it does, I think the name of this function is confusing. I would call it backgroundPaintedExtent() or something.

-- 
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