RESOLVED FIXED 112313
Compute image background size when testing for background visibility
https://bugs.webkit.org/show_bug.cgi?id=112313
Summary Compute image background size when testing for background visibility
Antti Koivisto
Reported 2013-03-13 19:43:27 PDT
We can catch more cases.
Attachments
patch (9.30 KB, patch)
2013-03-13 21:10 PDT, Antti Koivisto
simon.fraser: review+
Antti Koivisto
Comment 1 2013-03-13 21:10:06 PDT
Simon Fraser (smfr)
Comment 2 2013-03-13 21:53:53 PDT
Comment on attachment 193058 [details] patch 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.
Antti Koivisto
Comment 3 2013-03-13 22:14:28 PDT
Note You need to log in before you can comment on or make changes to this bug.