summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2010-05-17 11:50:45 -0400
committerCary Clark <cary@android.com>2010-05-17 13:48:37 -0400
commit330e608aa0a04d09cbb92a754420c115fb16d993 (patch)
tree296d0a6ae250fab6efaae6f2a5023f67d10941a8 /WebCore
parentb375a10fb2e6393e442bc345648ac46ee0468e5f (diff)
downloadexternal_webkit-330e608aa0a04d09cbb92a754420c115fb16d993.zip
external_webkit-330e608aa0a04d09cbb92a754420c115fb16d993.tar.gz
external_webkit-330e608aa0a04d09cbb92a754420c115fb16d993.tar.bz2
ignore offscreen drawing in SVG
Drawing outside of the visible window is recorded so that future scrolls have the correct picture data. When SVG triggers this code path on its way to drawing to an offscreen bitmap, it has not instantiated a WebViewCore object. Since in SVG's case, there's no reason to record drawing outside if the offscreen bitmap, it's correct to do nothing. Offscreen bitmaps do not work with SVG; but that problem is independent of this bug fix. Change-Id: I0b9c6d5506b6a35b2992abfa6bcb1db6cb872fd0 http://b/2682606
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/android/ScrollViewAndroid.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/WebCore/platform/android/ScrollViewAndroid.cpp b/WebCore/platform/android/ScrollViewAndroid.cpp
index e45df53..f9e4285 100644
--- a/WebCore/platform/android/ScrollViewAndroid.cpp
+++ b/WebCore/platform/android/ScrollViewAndroid.cpp
@@ -97,12 +97,15 @@ void ScrollView::platformRepaintContentRectangle(const IntRect &rect, bool now)
// vis from rect. This can compute up to four rectangular slices.
void ScrollView::platformOffscreenContentRectangle(const IntRect& vis, const IntRect& rect)
{
+ android::WebViewCore* core = android::WebViewCore::getWebViewCore(this);
+ if (!core) // SVG does not instantiate webviewcore
+ return; // and doesn't need to record drawing offscreen
SkRegion rectRgn = SkRegion(rect);
rectRgn.op(vis, SkRegion::kDifference_Op);
SkRegion::Iterator iter(rectRgn);
for (; !iter.done(); iter.next()) {
const SkIRect& diff = iter.rect();
- android::WebViewCore::getWebViewCore(this)->offInvalidate(diff);
+ core->offInvalidate(diff);
}
}
#endif