Title: [129024] trunk/Source/WebCore
- Revision
- 129024
- Author
- rwlb...@webkit.org
- Date
- 2012-09-19 11:03:48 -0700 (Wed, 19 Sep 2012)
Log Message
[BlackBerry] Remove custom painting code for searchCancel
https://bugs.webkit.org/show_bug.cgi?id=97119
Reviewed by Antonio Gomes.
Remove the dynamic painting code for searchCancel, we use a png file now.
* platform/graphics/blackberry/ImageBlackBerry.cpp:
(WebCore::Image::loadPlatformResource):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (129023 => 129024)
--- trunk/Source/WebCore/ChangeLog 2012-09-19 17:58:04 UTC (rev 129023)
+++ trunk/Source/WebCore/ChangeLog 2012-09-19 18:03:48 UTC (rev 129024)
@@ -1,3 +1,15 @@
+2012-09-19 Rob Buis <rb...@rim.com>
+
+ [BlackBerry] Remove custom painting code for searchCancel
+ https://bugs.webkit.org/show_bug.cgi?id=97119
+
+ Reviewed by Antonio Gomes.
+
+ Remove the dynamic painting code for searchCancel, we use a png file now.
+
+ * platform/graphics/blackberry/ImageBlackBerry.cpp:
+ (WebCore::Image::loadPlatformResource):
+
2012-09-19 Mark Pilgrim <pilg...@chromium.org>
[Chromium] Move notifyJSOutOfMemory out of PlatformSupport
Modified: trunk/Source/WebCore/platform/graphics/blackberry/ImageBlackBerry.cpp (129023 => 129024)
--- trunk/Source/WebCore/platform/graphics/blackberry/ImageBlackBerry.cpp 2012-09-19 17:58:04 UTC (rev 129023)
+++ trunk/Source/WebCore/platform/graphics/blackberry/ImageBlackBerry.cpp 2012-09-19 18:03:48 UTC (rev 129024)
@@ -27,40 +27,11 @@
PassRefPtr<Image> Image::loadPlatformResource(const char *name)
{
- if (!strcmp(name, "searchCancel") || !strcmp(name, "searchCancelPressed")) {
- OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(IntSize(16, 16));
- if (!imageBuffer)
- return 0;
-
- // Draw a more subtle, gray x-shaped icon.
- GraphicsContext* context = imageBuffer->context();
- context->save();
-
- context->fillRect(FloatRect(0, 0, 16, 16), Color::white, ColorSpaceDeviceRGB);
-
- if (!strcmp(name, "searchCancel"))
- context->setFillColor(Color(128, 128, 128), ColorSpaceDeviceRGB);
- else
- context->setFillColor(Color(64, 64, 64), ColorSpaceDeviceRGB);
-
- context->translate(8, 8);
-
- context->rotate(piDouble / 4.0);
- context->fillRect(FloatRect(-1, -7, 2, 14));
-
- context->rotate(-piDouble / 2.0);
- context->fillRect(FloatRect(-1, -7, 2, 14));
-
- context->restore();
- return imageBuffer->copyImage();
- }
-
// RESOURCE_PATH is set by CMake in OptionsBlackBerry.cmake
String fullPath(RESOURCE_PATH);
String extension(".png");
- fullPath += name;
- fullPath += extension;
+ fullPath = fullPath + name + extension;
RefPtr<SharedBuffer> buffer = SharedBuffer::createWithContentsOfFile(fullPath);
if (!buffer)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes