[Webkit-unassigned] [Bug 51664] Refactoring: Extract IntRectRadii class
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 11 09:21:32 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=51664
--- Comment #7 from Simon Fraser (smfr) <simon.fraser at apple.com> 2011-01-11 09:21:31 PST ---
(From update of attachment 78511)
View in context: https://bugs.webkit.org/attachment.cgi?id=78511&action=review
> Source/WebCore/platform/graphics/IntRectRadii.cpp:43
> +void IntRectRadii::constrainFor(const IntRect& rect)
> +{
> + // Constrain corner radii using CSS3 rules:
> + // http://www.w3.org/TR/css3-background/#the-border-radius
I'm not sure that CSS-specific behavior belongs in a utility class like this. Is this just one possible way of constraining the radii?
> Source/WebCore/platform/graphics/IntRectRadii.h:38
> +class IntRectRadii {
> +public:
> + IntRectRadii() {}
I wonder if it might not be better to have a RoundedIntRect that includes the rect and the radii. Maybe it could inherit from IntRect?
> Source/WebCore/rendering/RenderObject.cpp:1030
> + graphicsContext->addRoundedRectClip(halfBorderRect,
> + style->getInnerBorderRadiiForRectWithBorderWidths(halfBorderRect,
> + style->borderLeftWidth() / 2,
> + style->borderBottomWidth() / 2,
> + style->borderLeftWidth() / 2,
> + style->borderRightWidth() / 2));
We don't normally indent like this.
--
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