Bug 116765

Summary: Path: clean up addPathForRoundedRect()
Product: WebKit Reporter: Alberto Garcia <berto>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Alberto Garcia 2013-05-25 12:29:42 PDT
The current implementation of Path::addPathForRoundedRect() is a bit confusing and redundant

if (preferBezier) {
   bezier();
   return;
}

#if CG || BLACKBERRY
   native();
#else
   bezier();
#fi

I would suggest something like

#if CG || BLACKBERRY
if (preferNative) {
   native();
   return;
}
#endif

bezier();
Comment 1 Alberto Garcia 2013-05-25 12:35:17 PDT
Created attachment 202891 [details]
Patch

Here's the patch. The only reason why I put the #ifdef inside the if() block is to avoid a "unused parameter: strategy" warning.
Comment 2 WebKit Commit Bot 2013-05-25 17:50:44 PDT
Comment on attachment 202891 [details]
Patch

Clearing flags on attachment: 202891

Committed r150696: <http://trac.webkit.org/changeset/150696>
Comment 3 WebKit Commit Bot 2013-05-25 17:50:46 PDT
All reviewed patches have been landed.  Closing bug.