Merge "Update insertion handler for WebTextView." into gingerbread
This commit is contained in:
committed by
Android (Google) Code Review
commit
3073646f61
@@ -334,6 +334,10 @@ import java.util.ArrayList;
|
||||
}
|
||||
}
|
||||
|
||||
public void onDrawSubstitute() {
|
||||
updateCursorControllerPositions();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEditorAction(int actionCode) {
|
||||
switch (actionCode) {
|
||||
|
||||
@@ -3531,6 +3531,9 @@ public class WebView extends AbsoluteLayout
|
||||
if (AUTO_REDRAW_HACK && mAutoRedraw) {
|
||||
invalidate();
|
||||
}
|
||||
if (inEditingMode()) {
|
||||
mWebTextView.onDrawSubstitute();
|
||||
}
|
||||
mWebViewCore.signalRepaintDone();
|
||||
}
|
||||
|
||||
|
||||
@@ -4162,6 +4162,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
|
||||
canvas.restore();
|
||||
|
||||
updateCursorControllerPositions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the positions of the CursorControllers. Needed by WebTextView,
|
||||
* which does not draw.
|
||||
* @hide
|
||||
*/
|
||||
protected void updateCursorControllerPositions() {
|
||||
if (mInsertionPointCursorController != null &&
|
||||
mInsertionPointCursorController.isShowing()) {
|
||||
mInsertionPointCursorController.updatePosition();
|
||||
|
||||
Reference in New Issue
Block a user