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

Commit 25d888b5 authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Fix calc visible to account for action bar"

parents cf6bc99b fffce6fe
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -22,16 +22,14 @@ import android.text.Editable;
import android.text.Selection;
import android.text.Spannable;
import android.text.TextWatcher;
import android.webkit.WebView;
import android.widget.EditText;
import android.widget.TextView;
import android.view.ActionMode;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.TextView;

class FindActionModeCallback implements ActionMode.Callback, TextWatcher,
        View.OnLongClickListener, View.OnClickListener {
@@ -203,6 +201,7 @@ class FindActionModeCallback implements ActionMode.Callback, TextWatcher,

    @Override
    public void onDestroyActionMode(ActionMode mode) {
        mActionMode = null;
        mWebView.notifyFindDialogDismissed();
        mInput.hideSoftInputFromWindow(mWebView.getWindowToken(), 0);
    }
@@ -255,4 +254,13 @@ class FindActionModeCallback implements ActionMode.Callback, TextWatcher,
        // Does nothing.  Needed to implement TextWatcher.
    }

    public int getActionModeHeight() {
        if (mActionMode == null) {
            return 0;
        }
        View parent = (View) mCustomView.getParent();
        return parent != null ? parent.getMeasuredHeight()
                : mCustomView.getMeasuredHeight();
    }

}
+2 −1
Original line number Diff line number Diff line
@@ -1483,7 +1483,8 @@ public class WebView extends AbsoluteLayout

    private int getVisibleTitleHeightImpl() {
        // need to restrict mScrollY due to over scroll
        return Math.max(getTitleHeight() - Math.max(0, mScrollY), 0);
        return Math.max(getTitleHeight() - Math.max(0, mScrollY),
                mFindCallback != null ? mFindCallback.getActionModeHeight() : 0);
    }

    /*