summaryrefslogtreecommitdiffstats
path: root/Source/WebKit
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2012-05-09 10:13:14 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-05-09 10:13:14 -0700
commit0b35e7fd30ee9f94c1097a8af5dfe9645b918402 (patch)
tree390d1892ff1a384dea114189707893f14c413302 /Source/WebKit
parent4af8d3e6a11bf251020a9733fc0eaff7a37daa97 (diff)
parent78d0003d44a4fa393275929d92c8e4929e70c7fa (diff)
downloadexternal_webkit-0b35e7fd30ee9f94c1097a8af5dfe9645b918402.zip
external_webkit-0b35e7fd30ee9f94c1097a8af5dfe9645b918402.tar.gz
external_webkit-0b35e7fd30ee9f94c1097a8af5dfe9645b918402.tar.bz2
am 78d0003d: Better fix for crash workaround
* commit '78d0003d44a4fa393275929d92c8e4929e70c7fa': Better fix for crash workaround
Diffstat (limited to 'Source/WebKit')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 1e84a12..a78392b 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -306,14 +306,10 @@ void draw(SkCanvas* canvas, SkColor bgColor, DrawExtras extras)
// draw the content of the base layer first
LayerContent* content = m_baseLayer->content();
int sc = canvas->save(SkCanvas::kClip_SaveFlag);
- int contentWidth = 0;
- int contentHeight = 0;
if (content) {
- contentWidth = content->width();
- contentHeight = content->height();
+ canvas->clipRect(SkRect::MakeLTRB(0, 0, content->width(), content->height()),
+ SkRegion::kDifference_Op);
}
- canvas->clipRect(SkRect::MakeLTRB(0, 0, contentWidth, contentHeight),
- SkRegion::kDifference_Op);
Color c = m_baseLayer->getBackgroundColor();
canvas->drawColor(SkColorSetARGBInline(c.alpha(), c.red(), c.green(), c.blue()));
canvas->restoreToCount(sc);