summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorNicolas Roard <nicolas@android.com>2010-03-24 10:22:54 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-03-24 10:22:54 -0700
commitfef9ddedbf313d5afeda1938c57b4e90cef118f7 (patch)
tree3f53639fce650b56801ac0ddc1ee555a14915dfd /WebKit
parentf86335742d7a6c314d5fd438b40cf3e045a9e1f6 (diff)
parente93f34788b1f644f8be61a1daf6505c387e6fc3b (diff)
downloadexternal_webkit-fef9ddedbf313d5afeda1938c57b4e90cef118f7.zip
external_webkit-fef9ddedbf313d5afeda1938c57b4e90cef118f7.tar.gz
external_webkit-fef9ddedbf313d5afeda1938c57b4e90cef118f7.tar.bz2
Merge "Renders fixed layers with the root canvas matrix. Fix some positioning issues."
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/nav/WebView.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp
index 1155ea2..c83ceea 100644
--- a/WebKit/android/nav/WebView.cpp
+++ b/WebKit/android/nav/WebView.cpp
@@ -424,6 +424,11 @@ void drawExtras(SkCanvas* canvas, int extras)
// before we actually draw
m_rootLayer->updateFixedLayersPositions(visible);
m_rootLayer->updatePositions();
+ // We have to set the canvas' matrix on the root layer
+ // (to have fixed layers work as intended)
+ SkAutoCanvasRestore restore(canvas, true);
+ m_rootLayer->setMatrix(canvas->getTotalMatrix());
+ canvas->resetMatrix();
m_rootLayer->draw(canvas);
#endif
}
@@ -1836,8 +1841,14 @@ static void nativeDumpDisplayTree(JNIEnv* env, jobject jwebview, jstring jurl)
#if USE(ACCELERATED_COMPOSITING)
if (true) {
LayerAndroid* rootLayer = view->rootLayer();
- if (rootLayer)
+ if (rootLayer) {
+ // We have to set the canvas' matrix on the root layer
+ // (to have fixed layers work as intended)
+ SkAutoCanvasRestore restore(&canvas, true);
+ rootLayer->setMatrix(canvas.getTotalMatrix());
+ canvas.resetMatrix();
rootLayer->draw(&canvas);
+ }
}
#endif
// we're done with the file now