Title: [136633] trunk/Source/WebKit/blackberry
- Revision
- 136633
- Author
- [email protected]
- Date
- 2012-12-04 21:11:12 -0800 (Tue, 04 Dec 2012)
Log Message
[BlackBerry] VKB flickers in and out when tapping on webview after text selection on URL bar
https://bugs.webkit.org/show_bug.cgi?id=103874
PR245678
Patch by Sean Wang <[email protected]> on 2012-12-04
Reviewed by Rob Buis.
Internally reviewed by Mike Fenton.
When the virtual keyboard is hiding, the viewport is changed and the page needs
to relayout.At the same time, the user interface thread is executing compositeLayers
and it will dispatch the updateDelegatedOverlays() to webkit thread which will trigger
the selectionPositionChanged() in webkit thread.
When the selectionPositionChanged() calls frame->selection()->selection().
visibleStart() and frame->selection()->selection().visibleEnd(), it will
trigger page relayout and return the relayouted selection start and end position.
These positions are out of the range which is recorded before its relayout.
As a result it think the selection start and end are all clipped out and it send
out an "empty selection"(not selected) changing event.
When the WebPageClient receives the empty selection changing event, it will consider
the selection process aborted and might cancel selection-related user interaction.
This is not what we intend to happen.
This patch stops the changing handling process and returns when the page needs relayout,
and the selection will be updated again when the page finishs relayout.
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/ChangeLog (136632 => 136633)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-12-05 05:02:21 UTC (rev 136632)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-12-05 05:11:12 UTC (rev 136633)
@@ -1,3 +1,33 @@
+2012-12-04 Sean Wang <[email protected]>
+ [BlackBerry] VKB flickers in and out when tapping on webview after text selection on URL bar
+ https://bugs.webkit.org/show_bug.cgi?id=103874
+ PR245678
+
+ Reviewed by Rob Buis.
+ Internally reviewed by Mike Fenton.
+
+ When the virtual keyboard is hiding, the viewport is changed and the page needs
+ to relayout.At the same time, the user interface thread is executing compositeLayers
+ and it will dispatch the updateDelegatedOverlays() to webkit thread which will trigger
+ the selectionPositionChanged() in webkit thread.
+
+ When the selectionPositionChanged() calls frame->selection()->selection().
+ visibleStart() and frame->selection()->selection().visibleEnd(), it will
+ trigger page relayout and return the relayouted selection start and end position.
+ These positions are out of the range which is recorded before its relayout.
+ As a result it think the selection start and end are all clipped out and it send
+ out an "empty selection"(not selected) changing event.
+
+ When the WebPageClient receives the empty selection changing event, it will consider
+ the selection process aborted and might cancel selection-related user interaction.
+ This is not what we intend to happen.
+
+ This patch stops the changing handling process and returns when the page needs relayout,
+ and the selection will be updated again when the page finishs relayout.
+
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
+
2012-12-04 Andrew Lo <[email protected]>
[BlackBerry] Scroll adjustments while typing scroll off page, then bounce back.
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp (136632 => 136633)
--- trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp 2012-12-05 05:02:21 UTC (rev 136632)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp 2012-12-05 05:11:12 UTC (rev 136633)
@@ -884,6 +884,10 @@
// Enter selection mode if selection type is RangeSelection, and disable selection if
// selection is active and becomes caret selection.
Frame* frame = m_webPage->focusedOrMainFrame();
+
+ if (frame->view()->needsLayout())
+ return;
+
WebCore::IntPoint framePos = m_webPage->frameOffset(frame);
if (m_selectionActive && (m_caretActive || frame->selection()->isNone()))
m_selectionActive = false;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes