Changeset 107992 in webkit
- Timestamp:
- Feb 16, 2012 4:04:35 PM (12 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/ChangeLog
r107991 r107992 1 2012-02-16 Antonio Gomes <agomes@rim.com> 2 3 [BlackBerry] Implemented a way to defer client navigation change client notifications 4 https://bugs.webkit.org/show_bug.cgi?id=78848 5 6 Reviewed by Rob Buis. 7 8 Currently we postpone touch_down till touch_up if user touches 9 the screen and an input field has the WebKit focus. This is done 10 so we can scroll the page without hidding the vkb needlessly. 11 12 However, it breaks the conversion of touch to mouse events 13 if an input field has the focus in the following scenario: 14 an <input type=text> is focused and an user grab and-drag 15 a <input type=range> knob/slide. It does not work until the 16 user unfocuses the currently focused edit field. 17 18 Patch introduces a way to unfocus a currently focused input field, 19 without requesting the client to show or hide the virtual keyboard 20 right way. Instead it gets a delayed notification of the vkb mode requested 21 at either touch_released/mouse_up or touch_cancel time. 22 23 For now, due to content side issues with major web sites, 24 only delay navigation mode notification changes if we are not dealing with 25 input modes. 26 27 * WebKitSupport/InputHandler.cpp: 28 (BlackBerry::WebKit::InputHandler::InputHandler): 29 (BlackBerry::WebKit::InputHandler::nodeFocused): 30 (BlackBerry::WebKit::InputHandler::setElementFocused): 31 (BlackBerry::WebKit::InputHandler::setNavigationMode): 32 (WebKit): 33 (BlackBerry::WebKit::InputHandler::setDelayClientNotificationOfNavigationModeChange): 34 (BlackBerry::WebKit::InputHandler::processPendingClientNavigationModeChangeNotification): 35 (BlackBerry::WebKit::InputHandler::notifyClientOfNavigationModeChange): 36 (BlackBerry::WebKit::InputHandler::willOpenPopupForNode): 37 (BlackBerry::WebKit::InputHandler::setPopupListIndexes): 38 (BlackBerry::WebKit::InputHandler::spannableTextInRange): 39 (BlackBerry::WebKit::InputHandler::removeComposedText): 40 (BlackBerry::WebKit::InputHandler::firstSpanInString): 41 (BlackBerry::WebKit::InputHandler::setText): 42 (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition): 43 * WebKitSupport/InputHandler.h: 44 (InputHandler): 45 1 46 2012-02-16 Antonio Gomes <agomes@rim.com> 2 47 -
trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
r107471 r107992 117 117 , m_composingTextStart(0) 118 118 , m_composingTextEnd(0) 119 , m_pendingKeyboardStateChange(NoChange) 120 , m_delayClientNotificationOfNavigationModeChange(false) 119 121 { 120 122 } … … 475 477 FocusLog(BlackBerry::Platform::LogLevelInfo, "InputHandler::setElementFocused, Type=%d, Style=%d", type, m_currentFocusElementTextEditMask); 476 478 477 m_webPage->m_client->inputFocusGained(type, m_currentFocusElementTextEditMask); 479 m_webPage->m_client->inputFocusGained(type, 480 m_currentFocusElementTextEditMask, 481 m_delayClientNotificationOfNavigationModeChange /* wait an explicit keyboard show call */); 478 482 m_navigationMode = true; 479 483 … … 749 753 750 754 if (sendMessage) 755 notifyClientOfNavigationModeChange(active); 756 } 757 758 void InputHandler::setDelayClientNotificationOfNavigationModeChange(bool value) 759 { 760 m_delayClientNotificationOfNavigationModeChange = value; 761 m_pendingKeyboardStateChange = NoChange; 762 } 763 764 void InputHandler::processPendingClientNavigationModeChangeNotification() 765 { 766 if (!m_delayClientNotificationOfNavigationModeChange) { 767 ASSERT(m_pendingKeyboardStateChange == NoChange); 768 return; 769 } 770 771 m_delayClientNotificationOfNavigationModeChange = false; 772 773 if (m_pendingKeyboardStateChange == NoChange) 774 return; 775 776 notifyClientOfNavigationModeChange(m_pendingKeyboardStateChange == Visible); 777 m_pendingKeyboardStateChange = NoChange; 778 } 779 780 void InputHandler::notifyClientOfNavigationModeChange(bool active) 781 { 782 if (!m_delayClientNotificationOfNavigationModeChange) { 751 783 m_webPage->m_client->inputSetNavigationMode(active); 784 return; 785 } 786 787 m_pendingKeyboardStateChange = active ? Visible : NotVisible; 752 788 } 753 789 -
trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.h
r107449 r107992 78 78 void setInputValue(const WTF::String&); 79 79 80 void setDelayClientNotificationOfNavigationModeChange(bool value); 81 void processPendingClientNavigationModeChangeNotification(); 82 83 void notifyClientOfNavigationModeChange(bool active); 84 80 85 bool isInputMode() const { return isActiveTextEdit(); } 81 86 bool isMultilineInputMode() const { return isActiveTextEdit() && elementType(m_currentFocusElement.get()) == BlackBerry::Platform::InputTypeTextArea; } … … 118 123 119 124 private: 125 enum PendingKeyboardStateChange { NoChange, Visible, NotVisible }; 126 120 127 void setElementFocused(WebCore::Element*); 121 128 void setPluginFocused(WebCore::Element*); … … 184 191 int m_composingTextStart; 185 192 int m_composingTextEnd; 193 194 PendingKeyboardStateChange m_pendingKeyboardStateChange; 195 bool m_delayClientNotificationOfNavigationModeChange; 186 196 }; 187 197
Note: See TracChangeset
for help on using the changeset viewer.