am 3f06a9b9: Merge change 26150 into eclair
Merge commit '3f06a9b931f6e3d12215a959f427bc373dacf7cc' into eclair-plus-aosp * commit '3f06a9b931f6e3d12215a959f427bc373dacf7cc': Account for find dialog height in content height
This commit is contained in:
@@ -2001,7 +2001,7 @@ public class WebView extends AbsoluteLayout
|
|||||||
getGlobalVisibleRect(r, p);
|
getGlobalVisibleRect(r, p);
|
||||||
r.offset(-p.x, -p.y);
|
r.offset(-p.x, -p.y);
|
||||||
if (mFindIsUp) {
|
if (mFindIsUp) {
|
||||||
r.bottom -= FIND_HEIGHT;
|
r.bottom -= mFindHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2073,9 +2073,6 @@ public class WebView extends AbsoluteLayout
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure this stays in sync with the actual height of the FindDialog.
|
|
||||||
private static final int FIND_HEIGHT = 79;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int computeVerticalScrollRange() {
|
protected int computeVerticalScrollRange() {
|
||||||
if (mDrawHistory) {
|
if (mDrawHistory) {
|
||||||
@@ -2306,7 +2303,11 @@ public class WebView extends AbsoluteLayout
|
|||||||
* that were found.
|
* that were found.
|
||||||
*/
|
*/
|
||||||
public int findAll(String find) {
|
public int findAll(String find) {
|
||||||
|
if (mFindIsUp == false) {
|
||||||
|
recordNewContentSize(mContentWidth, mContentHeight + mFindHeight,
|
||||||
|
false);
|
||||||
mFindIsUp = true;
|
mFindIsUp = true;
|
||||||
|
}
|
||||||
int result = nativeFindAll(find.toLowerCase(), find.toUpperCase());
|
int result = nativeFindAll(find.toLowerCase(), find.toUpperCase());
|
||||||
invalidate();
|
invalidate();
|
||||||
return result;
|
return result;
|
||||||
@@ -2315,6 +2316,7 @@ public class WebView extends AbsoluteLayout
|
|||||||
// Used to know whether the find dialog is open. Affects whether
|
// Used to know whether the find dialog is open. Affects whether
|
||||||
// or not we draw the highlights for matches.
|
// or not we draw the highlights for matches.
|
||||||
private boolean mFindIsUp;
|
private boolean mFindIsUp;
|
||||||
|
private int mFindHeight;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the first substring consisting of the address of a physical
|
* Return the first substring consisting of the address of a physical
|
||||||
@@ -2370,7 +2372,11 @@ public class WebView extends AbsoluteLayout
|
|||||||
* Clear the highlighting surrounding text matches created by findAll.
|
* Clear the highlighting surrounding text matches created by findAll.
|
||||||
*/
|
*/
|
||||||
public void clearMatches() {
|
public void clearMatches() {
|
||||||
|
if (mFindIsUp) {
|
||||||
|
recordNewContentSize(mContentWidth, mContentHeight - mFindHeight,
|
||||||
|
false);
|
||||||
mFindIsUp = false;
|
mFindIsUp = false;
|
||||||
|
}
|
||||||
nativeSetFindIsDown();
|
nativeSetFindIsDown();
|
||||||
// Now that the dialog has been removed, ensure that we scroll to a
|
// Now that the dialog has been removed, ensure that we scroll to a
|
||||||
// location that is not beyond the end of the page.
|
// location that is not beyond the end of the page.
|
||||||
@@ -2378,6 +2384,16 @@ public class WebView extends AbsoluteLayout
|
|||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public void setFindDialogHeight(int height) {
|
||||||
|
if (DebugFlags.WEB_VIEW) {
|
||||||
|
Log.v(LOGTAG, "setFindDialogHeight height=" + height);
|
||||||
|
}
|
||||||
|
mFindHeight = height;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query the document to see if it contains any image references. The
|
* Query the document to see if it contains any image references. The
|
||||||
* message object will be dispatched with arg1 being set to 1 if images
|
* message object will be dispatched with arg1 being set to 1 if images
|
||||||
@@ -4869,7 +4885,8 @@ public class WebView extends AbsoluteLayout
|
|||||||
final boolean updateLayout = viewSize.x == mLastWidthSent
|
final boolean updateLayout = viewSize.x == mLastWidthSent
|
||||||
&& viewSize.y == mLastHeightSent;
|
&& viewSize.y == mLastHeightSent;
|
||||||
recordNewContentSize(draw.mWidthHeight.x,
|
recordNewContentSize(draw.mWidthHeight.x,
|
||||||
draw.mWidthHeight.y, updateLayout);
|
draw.mWidthHeight.y
|
||||||
|
+ (mFindIsUp ? mFindHeight : 0), updateLayout);
|
||||||
if (DebugFlags.WEB_VIEW) {
|
if (DebugFlags.WEB_VIEW) {
|
||||||
Rect b = draw.mInvalRegion.getBounds();
|
Rect b = draw.mInvalRegion.getBounds();
|
||||||
Log.v(LOGTAG, "NEW_PICTURE_MSG_ID {" +
|
Log.v(LOGTAG, "NEW_PICTURE_MSG_ID {" +
|
||||||
|
|||||||
Reference in New Issue
Block a user