Title: [150696] trunk/Source/WebCore
Revision
150696
Author
[email protected]
Date
2013-05-25 17:51:00 -0700 (Sat, 25 May 2013)

Log Message

Path: clean up addPathForRoundedRect()
https://bugs.webkit.org/show_bug.cgi?id=116765

Patch by Alberto Garcia <[email protected]> on 2013-05-25
Reviewed by Andreas Kling.

Reorganize code that is a bit redundant.

No new tests, no behavior change.

* platform/graphics/Path.cpp:
(WebCore::Path::addPathForRoundedRect):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (150695 => 150696)


--- trunk/Source/WebCore/ChangeLog	2013-05-25 23:56:01 UTC (rev 150695)
+++ trunk/Source/WebCore/ChangeLog	2013-05-26 00:51:00 UTC (rev 150696)
@@ -1,3 +1,17 @@
+2013-05-25  Alberto Garcia  <[email protected]>
+
+        Path: clean up addPathForRoundedRect()
+        https://bugs.webkit.org/show_bug.cgi?id=116765
+
+        Reviewed by Andreas Kling.
+
+        Reorganize code that is a bit redundant.
+
+        No new tests, no behavior change.
+
+        * platform/graphics/Path.cpp:
+        (WebCore::Path::addPathForRoundedRect):
+
 2013-05-25  Simon Fraser  <[email protected]>
 
         Unprefix Page Visibility API

Modified: trunk/Source/WebCore/platform/graphics/Path.cpp (150695 => 150696)


--- trunk/Source/WebCore/platform/graphics/Path.cpp	2013-05-25 23:56:01 UTC (rev 150695)
+++ trunk/Source/WebCore/platform/graphics/Path.cpp	2013-05-26 00:51:00 UTC (rev 150696)
@@ -145,16 +145,14 @@
 
 void Path::addPathForRoundedRect(const FloatRect& rect, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius, RoundedRectStrategy strategy)
 {
-    if (strategy == PreferBezierRoundedRect) {
-        addBeziersForRoundedRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
+    if (strategy == PreferNativeRoundedRect) {
+#if USE(CG) || PLATFORM(BLACKBERRY)
+        platformAddPathForRoundedRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
         return;
+#endif
     }
 
-#if USE(CG) || PLATFORM(BLACKBERRY)
-    platformAddPathForRoundedRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
-#else
     addBeziersForRoundedRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
-#endif
 }
 
 // Approximation of control point positions on a bezier to simulate a quarter of a circle.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to