summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/nav/WebView.cpp
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2012-03-30 16:04:36 -0700
committerGeorge Mount <mount@google.com>2012-04-10 12:22:41 -0700
commit76a09fb547aa97b2f0e9cbb1e4a800d61b30a477 (patch)
tree62c6403e0b6422bb2f248d01c377fd3a18eb51c5 /Source/WebKit/android/nav/WebView.cpp
parent55395a33cb848de5b522b7309a337ca7625a2523 (diff)
downloadexternal_webkit-76a09fb547aa97b2f0e9cbb1e4a800d61b30a477.zip
external_webkit-76a09fb547aa97b2f0e9cbb1e4a800d61b30a477.tar.gz
external_webkit-76a09fb547aa97b2f0e9cbb1e4a800d61b30a477.tar.bz2
Keep selection handles in edit fields.
Bug 6264769 Framework Change: I9ee89f8b1d4e6954092b8c4d677fb75b79354b36 Change-Id: Ie937a8c55da0f8aef66cfcee11beb961669b7168
Diffstat (limited to 'Source/WebKit/android/nav/WebView.cpp')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index a4381e6..3bd0bdc 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -602,8 +602,8 @@ int getHandleLayerId(SelectText::HandleId handleId, SkIPoint& cursorPoint,
IntRect textRect = selectText->textRect(handleId);
// Rects exclude the last pixel on right/bottom. We want only included pixels.
cursorPoint.set(cursorRect.x(), cursorRect.maxY() - 1);
- textRect.setHeight(textRect.height() - 1);
- textRect.setWidth(textRect.width() - 1);
+ textRect.setHeight(std::max(1, textRect.height() - 1));
+ textRect.setWidth(std::max(1, textRect.width() - 1));
textBounds = FloatQuad(textRect);
if (layerId != -1) {