Skip to content

Commit 41d6bfb

Browse files
jreckAndroid (Google) Code Review
authored andcommitted
Merge "DO NOT MERGE Fix text selection drawing on SW" into ics-factoryrom
2 parents 3d5759b + e668b03 commit 41d6bfb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

core/java/android/webkit/WebView.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4441,6 +4441,7 @@ private void drawCoreAndCursorRing(Canvas canvas, int color,
44414441
mHeldMotionless = MOTIONLESS_PENDING;
44424442
}
44434443
}
4444+
int saveCount = canvas.save();
44444445
if (animateZoom) {
44454446
mZoomManager.animateZoom(canvas);
44464447
} else if (!canvas.isHardwareAccelerated()) {
@@ -4491,10 +4492,6 @@ private void drawCoreAndCursorRing(Canvas canvas, int color,
44914492
nativeUseHardwareAccelSkia(mHardwareAccelSkia);
44924493
}
44934494

4494-
if (mSelectingText && USE_JAVA_TEXT_SELECTION) {
4495-
drawTextSelectionHandles(canvas);
4496-
}
4497-
44984495
} else {
44994496
DrawFilter df = null;
45004497
if (mZoomManager.isZoomAnimating() || UIAnimationsRunning) {
@@ -4512,6 +4509,11 @@ private void drawCoreAndCursorRing(Canvas canvas, int color,
45124509
}
45134510
}
45144511

4512+
canvas.restoreToCount(saveCount);
4513+
if (mSelectingText && USE_JAVA_TEXT_SELECTION) {
4514+
drawTextSelectionHandles(canvas);
4515+
}
4516+
45154517
if (extras == DRAW_EXTRAS_CURSOR_RING) {
45164518
if (mTouchMode == TOUCH_SHORTPRESS_START_MODE) {
45174519
mTouchMode = TOUCH_SHORTPRESS_MODE;

0 commit comments

Comments
 (0)