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

Commit de0205f3 authored by Grace Kloba's avatar Grace Kloba Committed by Android Git Automerger
Browse files

am 70b942d3: Post a Runnable to execute setNewZoomScale when WebView\'s...

am 70b942d3: Post a Runnable to execute setNewZoomScale when WebView\'s onSizeChanged is called. This will ensure requestLayout of the Child View works.

Merge commit '70b942d3' into eclair-mr2-plus-aosp

* commit '70b942d3':
  Post a Runnable to execute setNewZoomScale when
parents 28fdcf93 70b942d3
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -3798,10 +3798,18 @@ public class WebView extends AbsoluteLayout
            }
        }

        // we always force, in case our height changed, in which case we still
        // want to send the notification over to webkit
        // onSizeChanged() is called during WebView layout. And any
        // requestLayout() is blocked during layout. As setNewZoomScale() will
        // call its child View to reposition itself through ViewManager's
        // scaleAll(), we need to post a Runnable to ensure requestLayout().
        post(new Runnable() {
            public void run() {
                // we always force, in case our height changed, in which case we
                // still want to send the notification over to webkit
                setNewZoomScale(mActualScale, true);
            }
        });
    }

    @Override
    protected void onScrollChanged(int l, int t, int oldl, int oldt) {