diff options
author | George Mount <mount@google.com> | 2012-04-10 14:23:27 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-04-10 14:23:27 -0700 |
commit | a03cddf4df7ce0e81f13ecedabf56471b805f843 (patch) | |
tree | c8a281a46b107414a28c11f372f44a701d5000a8 /Source/WebKit/android/nav | |
parent | 22ad8c581dc11ba2311ca76a17ec046f72f53fcf (diff) | |
parent | 7f1e5ac384d6c663e2cb6b6bb7a58a300d16e1be (diff) | |
download | external_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.cpp | 4 |
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) { |