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

Commit 43bde929 authored by Derek Sollenberger's avatar Derek Sollenberger Committed by Android (Google) Code Review
Browse files

Merge "Plugin surfaces will be limited to 270% of the devices screen size."

parents 9f4c8e9a d222a162
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ class ViewManager {
    private boolean mReadyToDraw;

    // Threshold at which a surface is prevented from further increasing in size
    private static final int MAX_SURFACE_THRESHOLD = 1000000;
    private final int MAX_SURFACE_THRESHOLD;

    class ChildView {
        int x;
@@ -103,6 +103,14 @@ class ViewManager {

    ViewManager(WebView w) {
        mWebView = w;

        int pixelArea = w.getResources().getDisplayMetrics().widthPixels *
                        w.getResources().getDisplayMetrics().heightPixels;
        /* set the threshold to be 275% larger than the screen size. The
           percentage is simply an estimation and is not based on anything but
           basic trial-and-error tests run on multiple devices.
         */
        MAX_SURFACE_THRESHOLD = (int)(pixelArea * 2.75);
    }

    ChildView createView() {