[Webkit-unassigned] [Bug 83206] webkit fails IETC border-radius-content-edge-001

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 8 10:38:56 PDT 2012


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





--- Comment #6 from Julien Chaffraix <jchaffraix at webkit.org>  2012-06-08 10:38:54 PST ---
(From update of attachment 144021)
View in context: https://bugs.webkit.org/attachment.cgi?id=144021&action=review

> Source/WebCore/ChangeLog:20
> +        care of any radii's scale. So it probably causes to shrink the radii too much.

Some of the images have some red pixels, is this the cause for that? Shouldn't you solve this issue too instead of just mentioning it here?

> Source/WebCore/rendering/RenderImage.cpp:439
> +        LayoutUnit leftWidth = style()->borderLeftWidth();
> +        LayoutUnit rightWidth = style()->borderRightWidth();
> +        LayoutUnit topWidth = style()->borderTopWidth();
> +        LayoutUnit bottomWidth = style()->borderBottomWidth();

Borders are unsigned, please avoid those unneeded conversions to LayoutUnit. Also let's avoid abbreviation, those are border width, not just width (which can be anything)

> Source/WebCore/rendering/RenderImage.cpp:441
> +        LayoutRect rectWithBorder(rect.x() - leftWidth, rect.y() - topWidth,
> +                                  rect.width() + leftWidth + rightWidth, rect.height() + topWidth + bottomWidth);

It would be neat to add a test for vertical writing mode (unless already covered). This should work as painting assumes rectangles in device coordinates and not logical ones.

> Source/WebCore/rendering/RenderImage.cpp:444
> +            rectWithBorder.move(-paddingLeft(), -paddingTop());
> +            rectWithBorder.expand(paddingLeft() + paddingRight(), paddingTop() + paddingBottom());

rectWithBorder.inflate(paddingLeft(), paddingTop());
rectWithBorder.expand(paddingRight(), paddingBottom());

> Source/WebCore/rendering/RenderImage.cpp:450
> +            clipRect.setRect(alignedRect);

As a whole, we do a lot of recurrent computation here (shrink / expanding to account for paddings or margin). I don't know of any smarter way of doing it but maybe someone else may. At least exposing a way of expanding a rect using a LayoutBoxExtend and adding the ad-hoc getter in RenderStyle should reduce the risk of error.

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