Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af2af4e5 authored by Nicolas Roard's avatar Nicolas Roard
Browse files

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
parent 021b7b44
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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,