[webkit-reviews] review granted: [Bug 71240] Switch background/border image back to Int : [Attachment 113197] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 1 14:04:13 PDT 2011


Darin Adler <darin at apple.com> has granted Emil A Eklund <eae at chromium.org>'s
request for review:
Bug 71240: Switch background/border image back to Int
https://bugs.webkit.org/show_bug.cgi?id=71240

Attachment 113197: Patch
https://bugs.webkit.org/attachment.cgi?id=113197&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=113197&action=review


This is a mix of two changes. About 2/3 of this is changing background and
border back to int, and about 1/3 is changes for the newer version of
LayoutUnit where implicit conversion from int is not allowed. It would be
better if the change log told the truth about that.

> Source/WebCore/rendering/RenderBoxModelObject.cpp:441
> -    LayoutUnit xPos = (isBox() ? toRenderBox(this)->left() : 0);
> -    
> +    LayoutUnit xPos = (isBox() ? toRenderBox(this)->left() : LayoutUnit(0));


This change is not part of changing background and border back to int.

> Source/WebCore/rendering/RenderBoxModelObject.cpp:475
> -    LayoutUnit yPos = (isBox() ? toRenderBox(this)->top() : 0);
> +    LayoutUnit yPos = (isBox() ? toRenderBox(this)->top() : LayoutUnit(0));

Neither is this.

> Source/WebCore/rendering/RenderBoxModelObject.cpp:657
> -    LayoutUnit bLeft = includeLeftEdge ? borderLeft() : 0;
> -    LayoutUnit bRight = includeRightEdge ? borderRight() : 0;
> -    LayoutUnit pLeft = includeLeftEdge ? paddingLeft() : 0;
> -    LayoutUnit pRight = includeRightEdge ? paddingRight() : 0;
> +    LayoutUnit bLeft = includeLeftEdge ? borderLeft() : LayoutUnit(0);
> +    LayoutUnit bRight = includeRightEdge ? borderRight() : LayoutUnit(0);
> +    LayoutUnit pLeft = includeLeftEdge ? paddingLeft() : LayoutUnit(0);
> +    LayoutUnit pRight = includeRightEdge ? paddingRight() : LayoutUnit(0);

Neither is this.

> Source/WebCore/rendering/RenderBoxModelObject.cpp:679
> -	   LayoutRect clipRect = LayoutRect(scrolledPaintRect.x() + bLeft +
(includePadding ? pLeft : 0),
> -				      scrolledPaintRect.y() + borderTop() +
(includePadding ? paddingTop() : 0),
> -				      scrolledPaintRect.width() - bLeft -
bRight - (includePadding ? pLeft + pRight : 0),
> -				      scrolledPaintRect.height() - borderTop()
- borderBottom() - (includePadding ? paddingTop() + paddingBottom() : 0));
> +	   LayoutRect clipRect = LayoutRect(scrolledPaintRect.x() + bLeft +
(includePadding ? pLeft : LayoutUnit(0)),
> +				      scrolledPaintRect.y() + borderTop() +
(includePadding ? paddingTop() : LayoutUnit(0)),
> +				      scrolledPaintRect.width() - bLeft -
bRight - (includePadding ? pLeft + pRight : LayoutUnit(0)),
> +				      scrolledPaintRect.height() - borderTop()
- borderBottom() - (includePadding ? paddingTop() + paddingBottom() :
LayoutUnit(0)));

Neither is this.


More information about the webkit-reviews mailing list