From 76a09fb547aa97b2f0e9cbb1e4a800d61b30a477 Mon Sep 17 00:00:00 2001 From: George Mount Date: Fri, 30 Mar 2012 16:04:36 -0700 Subject: Keep selection handles in edit fields. Bug 6264769 Framework Change: I9ee89f8b1d4e6954092b8c4d677fb75b79354b36 Change-Id: Ie937a8c55da0f8aef66cfcee11beb961669b7168 --- Source/WebKit/android/nav/WebView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/WebKit/android/nav/WebView.cpp') 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) { -- cgit v1.1