Title: [141623] trunk/Source/WebKit/blackberry
Revision
141623
Author
[email protected]
Date
2013-02-01 12:11:15 -0800 (Fri, 01 Feb 2013)

Log Message

[BlackBerry] InputHandler status is not restored when page history goes back
https://bugs.webkit.org/show_bug.cgi?id=108448

Patch by Sean Wang <[email protected]> on 2013-02-01
Reviewed by Yong Li.

PR288406 Internally reviewed by Mike Fenton

When webpage goes back, it restores the old frame's selection and focused node,
but we don't save the InputHandler's status, it becomes non-input mode when page
goes back. When it restores the focus, since the new focus node is same as the old
document focused node, webcore will not notify client to update the input handler.

This patch updates the input handler's status by notifying it focus node changed.

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::restoreViewState):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::restoreViewState):
(WebKit):
* WebKitSupport/InputHandler.h:
(InputHandler):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (141622 => 141623)


--- trunk/Source/WebKit/blackberry/ChangeLog	2013-02-01 20:06:55 UTC (rev 141622)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2013-02-01 20:11:15 UTC (rev 141623)
@@ -1,3 +1,28 @@
+2013-02-01  Sean Wang  <[email protected]>
+
+        [BlackBerry] InputHandler status is not restored when page history goes back
+        https://bugs.webkit.org/show_bug.cgi?id=108448
+
+        Reviewed by Yong Li.
+
+        PR288406 Internally reviewed by Mike Fenton
+
+        When webpage goes back, it restores the old frame's selection and focused node,
+        but we don't save the InputHandler's status, it becomes non-input mode when page
+        goes back. When it restores the focus, since the new focus node is same as the old
+        document focused node, webcore will not notify client to update the input handler.
+
+        This patch updates the input handler's status by notifying it focus node changed.
+
+
+        * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+        (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
+        * WebKitSupport/InputHandler.cpp:
+        (BlackBerry::WebKit::InputHandler::restoreViewState):
+        (WebKit):
+        * WebKitSupport/InputHandler.h:
+        (InputHandler):
+
 2013-01-31  Jacky Jiang  <[email protected]>
 
         [BlackBerry] Bing Images viewport causes layout "fun"

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp (141622 => 141623)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp	2013-02-01 20:06:55 UTC (rev 141622)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp	2013-02-01 20:11:15 UTC (rev 141623)
@@ -1138,6 +1138,8 @@
     bool reflowChanged = shouldReflowBlock != m_webPagePrivate->m_shouldReflowBlock;
     bool orientationChanged = viewState.orientation % 180 != m_webPagePrivate->mainFrame()->orientation() % 180;
 
+    m_webPagePrivate->m_inputHandler->restoreViewState();
+
     if (!scrollChanged && !scaleChanged && !reflowChanged && !orientationChanged)
         return;
 

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp (141622 => 141623)


--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp	2013-02-01 20:06:55 UTC (rev 141622)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp	2013-02-01 20:11:15 UTC (rev 141623)
@@ -2399,5 +2399,11 @@
     return setSpannableTextAndRelativeCursor(spannableString, relativeCursorPosition, false /* markTextAsComposing */) ? 0 : -1;
 }
 
+void InputHandler::restoreViewState()
+{
+    setInputModeEnabled();
+    focusedNodeChanged();
 }
+
 }
+}

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.h (141622 => 141623)


--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.h	2013-02-01 20:06:55 UTC (rev 141622)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.h	2013-02-01 20:11:15 UTC (rev 141623)
@@ -154,6 +154,8 @@
     void callRequestCheckingFor(PassRefPtr<WebCore::SpellCheckRequest>);
     void setSystemSpellCheckStatus(bool enabled) { m_spellCheckStatusConfirmed = true; m_globalSpellCheckStatus = enabled; }
 
+    void restoreViewState();
+
 private:
     enum PendingKeyboardStateChange { NoChange, Visible, NotVisible };
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to