Bug 116765 - Path: clean up addPathForRoundedRect()
Summary: Path: clean up addPathForRoundedRect()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-25 12:29 PDT by Alberto Garcia
Modified: 2013-05-25 17:50 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.92 KB, patch)
2013-05-25 12:35 PDT, Alberto Garcia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.