diff options
author | Nicolas Roard <nicolasroard@google.com> | 2012-05-08 18:10:32 -0700 |
---|---|---|
committer | Nicolas Roard <nicolasroard@google.com> | 2012-05-08 18:10:32 -0700 |
commit | 78d0003d44a4fa393275929d92c8e4929e70c7fa (patch) | |
tree | c377c0351e736b8f3a8cee057763382d8805b6af /Source/WebKit/android | |
parent | 576098317db607e1d3b32a0e53d2551ea0e7ef21 (diff) | |
download | external_webkit-78d0003d44a4fa393275929d92c8e4929e70c7fa.zip external_webkit-78d0003d44a4fa393275929d92c8e4929e70c7fa.tar.gz external_webkit-78d0003d44a4fa393275929d92c8e4929e70c7fa.tar.bz2 |
Better fix for crash workaround
bug:6431194
Change-Id: I444b1efb7ab12a18994c8b0553fa80f2ce09d386
Diffstat (limited to 'Source/WebKit/android')
-rw-r--r-- | Source/WebKit/android/nav/WebView.cpp | 8 |
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); |