[BlackBerry] Use GraphicsContext::fillPath() and strokePath instead of drawPath(...
authorleo.yang@torchmobile.com.cn <leo.yang@torchmobile.com.cn@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Apr 2012 13:40:30 +0000 (13:40 +0000)
committerleo.yang@torchmobile.com.cn <leo.yang@torchmobile.com.cn@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Apr 2012 13:40:30 +0000 (13:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81486

Reviewed by Rob Buis.

RenderThemeBlackBerry was using GraphicsContext::drawPath() that's added for BlackBerry internally.
But we already have fillPath() and strokePath() in GraphicsContext. So just substitute drawPath()
by them. Also fix a build issue by adding a #include line.

No functionalities changed, no new tests.

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintTextFieldOrTextAreaOrSearchField):
(WebCore::RenderThemeBlackBerry::paintButton):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112814 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/blackberry/RenderThemeBlackBerry.cpp

index 37eb2b0..737ff59 100644 (file)
@@ -1,3 +1,20 @@
+2012-04-01  Leo Yang  <leo.yang@torchmobile.com.cn>
+
+        [BlackBerry] Use GraphicsContext::fillPath() and strokePath instead of drawPath() in RenderThemeBlackBerry
+        https://bugs.webkit.org/show_bug.cgi?id=81486
+
+        Reviewed by Rob Buis.
+
+        RenderThemeBlackBerry was using GraphicsContext::drawPath() that's added for BlackBerry internally.
+        But we already have fillPath() and strokePath() in GraphicsContext. So just substitute drawPath()
+        by them. Also fix a build issue by adding a #include line.
+
+        No functionalities changed, no new tests.
+
+        * platform/blackberry/RenderThemeBlackBerry.cpp:
+        (WebCore::RenderThemeBlackBerry::paintTextFieldOrTextAreaOrSearchField):
+        (WebCore::RenderThemeBlackBerry::paintButton):
+
 2012-04-01  Nikolas Zimmermann  <nzimmermann@rim.com>
 
         Enable animVal support for SVGAnimatedEnumeration
index c57813f..c64b96e 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "CSSValueKeywords.h"
 #include "Frame.h"
+#include "HTMLMediaElement.h"
 #include "MediaControlElements.h"
 #include "MediaPlayerPrivateBlackBerry.h"
 #include "PaintInfo.h"
@@ -256,7 +257,8 @@ bool RenderThemeBlackBerry::paintTextFieldOrTextAreaOrSearchField(RenderObject*
     if (object->style()->appearance() == SearchFieldPart) {
         // We force the fill color to White so as to match the background color of the search cancel button graphic.
         context->setFillColor(Color::white, ColorSpaceDeviceRGB);
-        context->drawPath(textFieldRoundedRectangle);
+        context->fillPath(textFieldRoundedRectangle);
+        context->strokePath(textFieldRoundedRectangle);
     } else
         context->strokePath(textFieldRoundedRectangle);
     context->restore();
@@ -405,7 +407,8 @@ bool RenderThemeBlackBerry::paintButton(RenderObject* object, const PaintInfo& i
         FloatSize smallCorner(smallRadius, smallRadius);
         Path path;
         path.addRoundedRect(rect, smallCorner);
-        info.context->drawPath(path);
+        info.context->fillPath(path);
+        info.context->strokePath(path);
 
         if (isChecked(object)) {
             Path checkPath;
@@ -417,7 +420,8 @@ bool RenderThemeBlackBerry::paintButton(RenderObject* object, const PaintInfo& i
             info.context->setLineCap(RoundCap);
             info.context->setStrokeColor(blackPen, ColorSpaceDeviceRGB);
             info.context->setStrokeThickness(rect2.width() / checkboxStrokeThickness);
-            info.context->drawPath(checkPath);
+            info.context->fillPath(checkPath);
+            info.context->strokePath(checkPath);
         }
         break;
     }
@@ -436,13 +440,15 @@ bool RenderThemeBlackBerry::paintButton(RenderObject* object, const PaintInfo& i
         FloatSize largeCorner(largeRadius, largeRadius);
         Path path;
         path.addRoundedRect(rect, largeCorner);
-        info.context->drawPath(path);
+        info.context->fillPath(path);
+        info.context->strokePath(path);
         break;
     }
     case SquareButtonPart: {
         Path path;
         path.addRect(rect);
-        info.context->drawPath(path);
+        info.context->fillPath(path);
+        info.context->strokePath(path);
         break;
     }
     default: