[Webkit-unassigned] [Bug 51664] Refactoring: Extract IntRectRadii class

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 14 02:32:16 PST 2011


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





--- Comment #9 from MORITA Hajime <morrita at google.com>  2011-01-14 02:32:16 PST ---
Hi Simon, thank you for reviewing and I'm sorry for my slow response.
I updated the patch to address the feedback. Could you take another look?

(In reply to comment #7)
> (From update of attachment 78511 [details])
> 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?
Sure. Moved to RenderStyle.cpp

> 
> > 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?
It makes sense. I extracted RoundedIntRect. The radii are also grouped int RoundedIntRect::Radii
class because there are some cases that handle radii individually.

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

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