summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav/WebView.cpp
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2009-06-05 08:27:33 -0400
committerMike Reed <reed@google.com>2009-06-05 13:20:25 -0400
commitbc34c827fb04edf4fb309ff7e0fc4fceb474809e (patch)
tree36c7322533d3923600d4c9ad870d2e5981f38bc8 /WebKit/android/nav/WebView.cpp
parentbf22f208d6fb755dd4ddebbde1a1a3b23e597990 (diff)
downloadexternal_webkit-bc34c827fb04edf4fb309ff7e0fc4fceb474809e.zip
external_webkit-bc34c827fb04edf4fb309ff7e0fc4fceb474809e.tar.gz
external_webkit-bc34c827fb04edf4fb309ff7e0fc4fceb474809e.tar.bz2
use full pictureset when recording displaytree
Diffstat (limited to 'WebKit/android/nav/WebView.cpp')
-rw-r--r--WebKit/android/nav/WebView.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp
index fcc062a..e0cdd3b 100644
--- a/WebKit/android/nav/WebView.cpp
+++ b/WebKit/android/nav/WebView.cpp
@@ -178,6 +178,10 @@ WebView(JNIEnv* env, jobject javaWebView, int viewImpl)
delete m_matches;
}
+WebViewCore* getWebViewCore() const {
+ return m_viewImpl;
+}
+
void clearCursor(int x, int y, bool inval)
{
DBG_NAV_LOGD("x=%d y=%d inval=%s", x, y, inval ? "true" : "false");
@@ -1727,29 +1731,25 @@ static void nativeDumpDisplayTree(JNIEnv* env, jobject jwebview, jstring jurl)
WebView* view = GET_NATIVE_VIEW(env, jwebview);
LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
- CachedRoot* root = view->getFrameCache(WebView::DontAllowNewer);
- if (root) {
- SkPicture* picture = root->getPicture();
- if (picture) {
- FILE* file = fopen(DISPLAY_TREE_LOG_FILE, "w");
- if (file) {
- SkFormatDumper dumper(dumpToFile, file);
- // dump the URL
- if (jurl) {
- const char* str = env->GetStringUTFChars(jurl, 0);
- SkDebugf("Dumping %s to %s\n", str, DISPLAY_TREE_LOG_FILE);
- dumpToFile(str, file);
- env->ReleaseStringUTFChars(jurl, str);
- }
- // now dump the display tree
- SkDumpCanvas canvas(&dumper);
- // this will playback the picture into the canvas, which will
- // spew its contents to the dumper
- picture->draw(&canvas);
- // we're done with the file now
- fwrite("\n", 1, 1, file);
- fclose(file);
+ if (view && view->getWebViewCore()) {
+ FILE* file = fopen(DISPLAY_TREE_LOG_FILE, "w");
+ if (file) {
+ SkFormatDumper dumper(dumpToFile, file);
+ // dump the URL
+ if (jurl) {
+ const char* str = env->GetStringUTFChars(jurl, 0);
+ SkDebugf("Dumping %s to %s\n", str, DISPLAY_TREE_LOG_FILE);
+ dumpToFile(str, file);
+ env->ReleaseStringUTFChars(jurl, str);
}
+ // now dump the display tree
+ SkDumpCanvas canvas(&dumper);
+ // this will playback the picture into the canvas, which will
+ // spew its contents to the dumper
+ view->getWebViewCore()->drawContent(&canvas, 0);
+ // we're done with the file now
+ fwrite("\n", 1, 1, file);
+ fclose(file);
}
}
#endif