WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
45934
Cleanup: Extract common border radii expansion code in RenderBoxModelObject::paintBoxShadow() into function
https://bugs.webkit.org/show_bug.cgi?id=45934
Summary
Cleanup: Extract common border radii expansion code in RenderBoxModelObject::...
Daniel Bates
Reported
2010-09-16 16:31:54 PDT
There are three places in RenderBoxModelObject::paintBoxShadow() that use almost verbatim code to expand the border radii rects and clamp their dimensions to non-negative values.
http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderBoxModelObject.cpp?rev=66170#L1641
http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderBoxModelObject.cpp?rev=66170#L1660
http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderBoxModelObject.cpp?rev=66170#L1737
We should extract the common code into a function, say uniformlyExpandBorderRadii, to remove duplication and shorten the function body of RenderBoxModelObject::paintBoxShadow(), which is long.
Attachments
Patch
(4.96 KB, patch)
2010-09-16 16:42 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2010-09-16 16:42:07 PDT
Created
attachment 67860
[details]
Patch I was not sure what to call the function or how best to incorporate the knowledge that we also clamp the rects to non-negative dimensions. Some name ideas were uniformlyExpandAndClampToNonNegativeDimensionsBorderRadii, uniformlyExpandAndClampNegativeToZeroBorderRadii, and uniformlyExpandBorderRadiiAndClampToNonNegativeDimensions. I felt these were a bit verbose and didn't read well so I went with uniformlyExpandBorderRadii. I am open to suggestions.
Daniel Bates
Comment 2
2010-09-20 21:27:54 PDT
Comment on
attachment 67860
[details]
Patch Clearing flags on attachment: 67860 Committed
r67921
: <
http://trac.webkit.org/changeset/67921
>
Daniel Bates
Comment 3
2010-09-20 21:28:06 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug