Summary: | Compute image background size when testing for background visibility | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | eric, esprehn+autocc, ojan.autocc, simon.fraser, webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Antti Koivisto
2013-03-13 19:43:27 PDT
Created attachment 193058 [details]
patch
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. |