From 78d0003d44a4fa393275929d92c8e4929e70c7fa Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Tue, 8 May 2012 18:10:32 -0700 Subject: Better fix for crash workaround bug:6431194 Change-Id: I444b1efb7ab12a18994c8b0553fa80f2ce09d386 --- Source/WebKit/android/nav/WebView.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'Source/WebKit/android/nav') 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); -- cgit v1.1