Title: [114282] trunk/Source/WebKit/blackberry
Revision
114282
Author
commit-qu...@webkit.org
Date
2012-04-16 11:27:42 -0700 (Mon, 16 Apr 2012)

Log Message

[BlackBerry] Increase padding for text element
https://bugs.webkit.org/show_bug.cgi?id=83903

Patch by Yongxin Dai <yo...@rim.com> on 2012-04-16
Reviewed by Antonio Gomes.

PR 125888

Increase the padding value for focused text element to make selection handle
at least partially visible when the user is dragging at edge of viewport
in in-region scoll mode.

Reviewed internally by Mike Fenton.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (114281 => 114282)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-04-16 18:27:03 UTC (rev 114281)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-04-16 18:27:42 UTC (rev 114282)
@@ -1,3 +1,21 @@
+2012-04-16  Yongxin Dai  <yo...@rim.com>
+
+        [BlackBerry] Increase padding for text element
+        https://bugs.webkit.org/show_bug.cgi?id=83903
+
+        Reviewed by Antonio Gomes.
+        
+        PR 125888
+        
+        Increase the padding value for focused text element to make selection handle
+        at least partially visible when the user is dragging at edge of viewport
+        in in-region scoll mode.
+ 
+        Reviewed internally by Mike Fenton.
+
+        * WebKitSupport/InputHandler.cpp:
+        (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
+
 2012-04-16  Jonathan Dong  <jonathan.d...@torchmobile.com.cn>
 
         [BlackBerry] Add ability for DRT to handle HTTP authentication challenges.

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp (114281 => 114282)


--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp	2012-04-16 18:27:03 UTC (rev 114281)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp	2012-04-16 18:27:42 UTC (rev 114282)
@@ -623,7 +623,13 @@
             }
 
             // Pad the rect to improve the visual appearance.
-            selectionFocusRect.inflate(4 /* padding in pixels */);
+            // Padding must be large enough to expose the selection / FCC should they exist. Dragging the handle offscreen and releasing
+            // will not trigger an automatic scroll. Using a padding of 40 will fully exposing the width of the current handle and half of
+            // the height making it usable.
+            // FIXME: This will need to be updated when the graphics change.
+            // FIXME: The value of 40 should be calculated as a unit of measure using Graphics::Screen::primaryScreen()->heightInMMToPixels
+            // using a relative value to the size of the handle. We should also consider expanding different amounts horizontally vs vertically.
+            selectionFocusRect.inflate(40 /* padding in pixels */);
             WebCore::IntRect revealRect = layer->getRectToExpose(actualScreenRect, selectionFocusRect,
                                                                  horizontalScrollAlignment,
                                                                  verticalScrollAlignment);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to