summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
index b0b9b35..424617b 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
@@ -1049,10 +1049,17 @@ public:
ctx->save();
ctx->clip(frameRect());
- // Draw a 1 pixel light gray border
ctx->setFillColor(Color::white, DeviceColorSpace);
- ctx->setStrokeColor(Color::lightGray, DeviceColorSpace);
- ctx->drawRect(frameRect());
+ ctx->fillRect(frameRect());
+ if (frameRect().contains(imageRect)) {
+ // Leave a 2 pixel padding.
+ const int pixelWidth = 2;
+ IntRect innerRect = frameRect();
+ innerRect.inflate(-pixelWidth);
+ // Draw a 2 pixel light gray border.
+ ctx->setStrokeColor(Color::lightGray, DeviceColorSpace);
+ ctx->strokeRect(innerRect, pixelWidth);
+ }
// Draw the image in the center
ctx->drawImage(image.get(), DeviceColorSpace, imageRect.location());