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

Commit 1e3ef860 authored by Teng-Hui Zhu's avatar Teng-Hui Zhu Committed by Android Git Automerger
Browse files

am 85973212: Merge "DO NOT MERGE:The visiblerect calculation should take...

am 85973212: Merge "DO NOT MERGE:The visiblerect calculation should take view\'s scaling into consideration" into jb-dev

* commit '85973212':
  DO NOT MERGE:The visiblerect calculation should take view's scaling into consideration
parents 0e7cfa94 85973212
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -3040,14 +3040,14 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
    // the scale factor is not 1)
    private void calcOurContentVisibleRectF(RectF r) {
        calcOurVisibleRect(mContentVisibleRect);
        r.left = viewToContentXf(mContentVisibleRect.left);
        r.left = viewToContentXf(mContentVisibleRect.left) / mWebView.getScaleX();
        // viewToContentY will remove the total height of the title bar.  Add
        // the visible height back in to account for the fact that if the title
        // bar is partially visible, the part of the visible rect which is
        // displaying our content is displaced by that amount.
        r.top = viewToContentYf(mContentVisibleRect.top + getVisibleTitleHeightImpl());
        r.right = viewToContentXf(mContentVisibleRect.right);
        r.bottom = viewToContentYf(mContentVisibleRect.bottom);
        r.top = viewToContentYf(mContentVisibleRect.top + getVisibleTitleHeightImpl()) / mWebView.getScaleY();
        r.right = viewToContentXf(mContentVisibleRect.right) / mWebView.getScaleX();
        r.bottom = viewToContentYf(mContentVisibleRect.bottom) / mWebView.getScaleY();
    }

    static class ViewSizeData {