summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-03-24 14:18:50 -0400
committerPatrick Scott <phanna@android.com>2010-03-24 14:18:50 -0400
commit1c95c29b31ed45a394643094162e01796c0c5122 (patch)
tree368245e9efb8c485d3cb9019bf448445e5a95963
parent03f19ba76488b3a62011e106d1fd65e076e52837 (diff)
downloadexternal_webkit-1c95c29b31ed45a394643094162e01796c0c5122.zip
external_webkit-1c95c29b31ed45a394643094162e01796c0c5122.tar.gz
external_webkit-1c95c29b31ed45a394643094162e01796c0c5122.tar.bz2
Fix the background of the placeholder.
Draw a light gray 1 pixel border instead of using an asset. Bug: 2411524 Change-Id: Ibc95148e2bf13e0dcc58d747e3733cc6993dddf6
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
index 677f0da..b0b9b35 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
@@ -1027,10 +1027,8 @@ public:
// with slight modification.
static RefPtr<Image> image;
- static RefPtr<Image> bg;
- if (!image || !bg) {
+ if (!image) {
image = Image::loadPlatformResource("togglePlugin");
- bg = Image::loadPlatformResource("togglePluginBg");
}
IntRect imageRect(x(), y(), image->width(), image->height());
@@ -1050,8 +1048,13 @@ public:
ctx->save();
ctx->clip(frameRect());
- ctx->drawTiledImage(bg.get(), DeviceColorSpace, frameRect(),
- IntPoint(), IntSize(bg->width(), bg->height()));
+
+ // Draw a 1 pixel light gray border
+ ctx->setFillColor(Color::white, DeviceColorSpace);
+ ctx->setStrokeColor(Color::lightGray, DeviceColorSpace);
+ ctx->drawRect(frameRect());
+
+ // Draw the image in the center
ctx->drawImage(image.get(), DeviceColorSpace, imageRect.location());
ctx->restore();
}