summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/nav
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2012-04-10 14:23:27 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-10 14:23:27 -0700
commita03cddf4df7ce0e81f13ecedabf56471b805f843 (patch)
treec8a281a46b107414a28c11f372f44a701d5000a8 /Source/WebKit/android/nav
parent22ad8c581dc11ba2311ca76a17ec046f72f53fcf (diff)
parent7f1e5ac384d6c663e2cb6b6bb7a58a300d16e1be (diff)
downloadexternal_webkit-a03cddf4df7ce0e81f13ecedabf56471b805f843.zip
external_webkit-a03cddf4df7ce0e81f13ecedabf56471b805f843.tar.gz
external_webkit-a03cddf4df7ce0e81f13ecedabf56471b805f843.tar.bz2
Merge "Revert "Revert "Keep selection handles in edit fields."""
Diffstat (limited to 'Source/WebKit/android/nav')
-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 05666bb..0fcede5 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -603,8 +603,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) {