diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderBoxModelObject.cpp')
-rw-r--r-- | Source/WebCore/rendering/RenderBoxModelObject.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/WebCore/rendering/RenderBoxModelObject.cpp b/Source/WebCore/rendering/RenderBoxModelObject.cpp index 8f9b9a622..5eef3ccac 100644 --- a/Source/WebCore/rendering/RenderBoxModelObject.cpp +++ b/Source/WebCore/rendering/RenderBoxModelObject.cpp @@ -1171,13 +1171,11 @@ void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* fil // its margins. Since those were added in already, we have to factor them out when computing // the background positioning area. if (isRoot()) { - positioningAreaSize = IntSize(snapSizeToPixel(toRenderBox(this)->width() - left - right, toRenderBox(this)->x()), - snapSizeToPixel(toRenderBox(this)->height() - top - bottom, toRenderBox(this)->y())); + positioningAreaSize = pixelSnappedIntSize(toRenderBox(this)->size() - LayoutSize(left + right, top + bottom), toRenderBox(this)->location()); left += marginLeft(); top += marginTop(); } else - positioningAreaSize = IntSize(snapSizeToPixel(paintRect.width() - left - right, paintRect.x()), - snapSizeToPixel(paintRect.height() - top - bottom, paintRect.y())); + positioningAreaSize = pixelSnappedIntSize(paintRect.size() - LayoutSize(left + right, top + bottom), paintRect.location()); } else { geometry.setDestRect(pixelSnappedIntRect(viewRect())); positioningAreaSize = geometry.destRect().size(); @@ -1410,7 +1408,7 @@ public: } bool hasVisibleColorAndStyle() const { return style > BHIDDEN && !isTransparent; } - bool shouldRender() const { return isPresent && hasVisibleColorAndStyle(); } + bool shouldRender() const { return isPresent && width && hasVisibleColorAndStyle(); } bool presentButInvisible() const { return usedWidth() && !hasVisibleColorAndStyle(); } bool obscuresBackgroundEdge(float scale) const { @@ -1648,6 +1646,7 @@ void RenderBoxModelObject::paintOneBorderSide(GraphicsContext* graphicsContext, BackgroundBleedAvoidance bleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias, const Color* overrideColor) { const BorderEdge& edgeToRender = edges[side]; + ASSERT(edgeToRender.width); const BorderEdge& adjacentEdge1 = edges[adjacentSide1]; const BorderEdge& adjacentEdge2 = edges[adjacentSide2]; |