Add proper support for fixed position elements

this is two-part change, see  http://android-git.corp.google.com/g/#change,37091 for the C++ counterpart.
This CL implements fixed position elements (css position: fixed) using layers, supporting pixels and percent lengths.

It addresses http://b/1914365
This commit is contained in:
Nicolas Roard
2010-01-11 13:20:16 +00:00
parent 021b7b443f
commit af2af4e53a

View File

@@ -2998,8 +2998,11 @@ public class WebView extends AbsoluteLayout
private void drawLayers(Canvas canvas) {
if (mRootLayer != 0) {
float scrollY = Math.max(mScrollY - getTitleHeight(), 0);
int scrollY = computeVerticalScrollOffset();
int viewHeight = getHeight() - getVisibleTitleHeight();
nativeDrawLayers(mRootLayer, mScrollX, scrollY,
getWidth(), viewHeight,
mActualScale, canvas);
}
}
@@ -6361,7 +6364,8 @@ public class WebView extends AbsoluteLayout
private native boolean nativeLayersHaveAnimations(int layer);
private native void nativeUpdateLayers(int layer, int updates);
private native void nativeDrawLayers(int layer,
float scrollX, float scrollY,
int scrollX, int scrollY,
int width, int height,
float scale, Canvas canvas);
private native void nativeDrawMatches(Canvas canvas);
private native void nativeDrawSelectionPointer(Canvas content,