[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

ap at apple.com ap at apple.com
Wed Dec 22 15:34:41 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit c27a2a75a60805cdc2773009b18772bf0df8aeeb
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 8 18:23:55 2010 +0000

            Reviewed by Darin Adler.
    
            https://bugs.webkit.org/show_bug.cgi?id=48685
            Notify UI process about focused frame
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71541 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a2ff6ad..0b82beb 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-11-08  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48685
+        Notify UI process about focused frame
+
+        * WebCore.xcodeproj/project.pbxproj: Adding developmentRegion back.
+
+        * loader/EmptyClients.h: (WebCore::EmptyChromeClient::focusedFrameChanged):
+        * page/Chrome.cpp: (WebCore::Chrome::focusedFrameChanged):
+        * page/Chrome.h:
+        * page/ChromeClient.h:
+        Added a new Chrome client notification.
+
+        * page/FocusController.cpp: (WebCore::FocusController::setFocusedFrame): Notify chrome.
+
 2010-11-08  Anders Carlsson  <andersca at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 028e9d8..b7e5d48 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -21386,6 +21386,7 @@
 			isa = PBXProject;
 			buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
 			compatibilityVersion = "Xcode 2.4";
+			developmentRegion = English;
 			hasScannedForEncodings = 1;
 			knownRegions = (
 				English,
diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h
index cf98f29..a15cee5 100644
--- a/WebCore/loader/EmptyClients.h
+++ b/WebCore/loader/EmptyClients.h
@@ -102,6 +102,7 @@ public:
     virtual void takeFocus(FocusDirection) { }
 
     virtual void focusedNodeChanged(Node*) { }
+    virtual void focusedFrameChanged(Frame*) { }
 
     virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&) { return 0; }
     virtual void show() { }
diff --git a/WebCore/page/Chrome.cpp b/WebCore/page/Chrome.cpp
index 572abd1..83d0f85 100644
--- a/WebCore/page/Chrome.cpp
+++ b/WebCore/page/Chrome.cpp
@@ -170,6 +170,11 @@ void Chrome::focusedNodeChanged(Node* node) const
     m_client->focusedNodeChanged(node);
 }
 
+void Chrome::focusedFrameChanged(Frame* frame) const
+{
+    m_client->focusedFrameChanged(frame);
+}
+
 Page* Chrome::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& features, const NavigationAction& action) const
 {
     Page* newPage = m_client->createWindow(frame, request, features, action);
diff --git a/WebCore/page/Chrome.h b/WebCore/page/Chrome.h
index 0446488..f2c5db4 100644
--- a/WebCore/page/Chrome.h
+++ b/WebCore/page/Chrome.h
@@ -97,6 +97,7 @@ namespace WebCore {
         void takeFocus(FocusDirection) const;
 
         void focusedNodeChanged(Node*) const;
+        void focusedFrameChanged(Frame*) const;
 
         Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&) const;
         void show() const;
diff --git a/WebCore/page/ChromeClient.h b/WebCore/page/ChromeClient.h
index cc35b04..39f6853 100644
--- a/WebCore/page/ChromeClient.h
+++ b/WebCore/page/ChromeClient.h
@@ -94,6 +94,7 @@ namespace WebCore {
         virtual void takeFocus(FocusDirection) = 0;
 
         virtual void focusedNodeChanged(Node*) = 0;
+        virtual void focusedFrameChanged(Frame*) = 0;
 
         // The Frame pointer provides the ChromeClient with context about which
         // Frame wants to create the new Page.  Also, the newly created window
diff --git a/WebCore/page/FocusController.cpp b/WebCore/page/FocusController.cpp
index 622bf39..8ee5dff 100644
--- a/WebCore/page/FocusController.cpp
+++ b/WebCore/page/FocusController.cpp
@@ -86,6 +86,7 @@ FocusController::FocusController(Page* page)
 
 void FocusController::setFocusedFrame(PassRefPtr<Frame> frame)
 {
+    ASSERT(!frame || frame->page() == m_page);
     if (m_focusedFrame == frame || m_isChangingFocusedFrame)
         return;
 
@@ -107,6 +108,8 @@ void FocusController::setFocusedFrame(PassRefPtr<Frame> frame)
         newFrame->document()->dispatchWindowEvent(Event::create(eventNames().focusEvent, false, false));
     }
 
+    m_page->chrome()->focusedFrameChanged(newFrame.get());
+
     m_isChangingFocusedFrame = false;
 }
 
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index b1a4baa..6867714 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-08  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48685
+        Notify UI process about focused frame
+
+        Added an empty implementation of the new ChromeClient method.
+
+        * src/ChromeClientImpl.cpp:
+        (WebKit::ChromeClientImpl::focusedFrameChanged):
+        * src/ChromeClientImpl.h:
+
 2010-11-08  Andrey Kosyakov  <caseq at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index df13b29..18f7a02 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -252,6 +252,10 @@ void ChromeClientImpl::focusedNodeChanged(Node* node)
     m_webView->client()->setKeyboardFocusURL(focusURL);
 }
 
+void ChromeClientImpl::focusedFrameChanged(Frame*)
+{
+}
+
 Page* ChromeClientImpl::createWindow(
     Frame* frame, const FrameLoadRequest& r, const WindowFeatures& features, const NavigationAction&)
 {
diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h
index fbebf62..87c1653 100644
--- a/WebKit/chromium/src/ChromeClientImpl.h
+++ b/WebKit/chromium/src/ChromeClientImpl.h
@@ -70,6 +70,7 @@ public:
     virtual bool canTakeFocus(WebCore::FocusDirection);
     virtual void takeFocus(WebCore::FocusDirection);
     virtual void focusedNodeChanged(WebCore::Node*);
+    virtual void focusedFrameChanged(WebCore::Frame*);
     virtual WebCore::Page* createWindow(
         WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
     virtual void show();
diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
index 9937de4..b436e58 100644
--- a/WebKit/efl/ChangeLog
+++ b/WebKit/efl/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-08  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48685
+        Notify UI process about focused frame
+
+        Added an empty implementation of the new ChromeClient method.
+
+        * WebCoreSupport/ChromeClientEfl.cpp:
+        (WebCore::ChromeClientEfl::focusedFrameChanged):
+        * WebCoreSupport/ChromeClientEfl.h:
+
 2010-11-05  Patrick Gansterer  <paroga at webkit.org>
 
         Reviewed by David Kilzer.
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
index d99f0bc..1aac4ff 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
@@ -91,6 +91,10 @@ void ChromeClientEfl::focusedNodeChanged(Node*)
     notImplemented();
 }
 
+void ChromeClientEfl::focusedFrameChanged(Frame*)
+{
+}
+
 FloatRect ChromeClientEfl::windowRect()
 {
     Ecore_Evas* ee = 0;
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
index 53cac59..c6c82d4 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
@@ -53,6 +53,7 @@ public:
     virtual void takeFocus(FocusDirection);
 
     virtual void focusedNodeChanged(Node*);
+    virtual void focusedFrameChanged(Frame*);
 
     virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&);
     virtual void show();
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 28a5c0f..3a7e381 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-08  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48685
+        Notify UI process about focused frame
+
+        Added an empty implementation of the new ChromeClient method.
+
+        * WebCoreSupport/ChromeClientGtk.cpp:
+        (WebKit::ChromeClient::focusedFrameChanged):
+        * WebCoreSupport/ChromeClientGtk.h:
+
 2010-11-08  Martin Robinson  <mrobinson at igalia.com>
 
         Reviewed by Andreas Kling.
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index e864ea7..d4ab7ab 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -275,6 +275,10 @@ void ChromeClient::focusedNodeChanged(Node*)
 {
 }
 
+void ChromeClient::focusedFrameChanged(Frame*)
+{
+}
+
 bool ChromeClient::canRunBeforeUnloadConfirmPanel()
 {
     return true;
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
index 87f1dab..8252f06 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
@@ -55,6 +55,7 @@ namespace WebKit {
         virtual void takeFocus(WebCore::FocusDirection);
 
         virtual void focusedNodeChanged(WebCore::Node*);
+        virtual void focusedFrameChanged(WebCore::Frame*);
 
         virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
         virtual void show();
diff --git a/WebKit/haiku/ChangeLog b/WebKit/haiku/ChangeLog
index 6d43561..723c957 100644
--- a/WebKit/haiku/ChangeLog
+++ b/WebKit/haiku/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-08  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48685
+        Notify UI process about focused frame
+
+        Added an empty implementation of the new ChromeClient method. Also, added missing "virtual"
+        keywords all over the place.
+
+        * WebCoreSupport/ChromeClientHaiku.cpp:
+        (WebCore::ChromeClientHaiku::focusedFrameChanged):
+        * WebCoreSupport/ChromeClientHaiku.h:
+        (WebCore::ChromeClientHaiku::scrollbarsModeDidChange):
+        (WebCore::ChromeClientHaiku::cancelGeolocationPermissionRequestForFrame):
+
 2010-11-01  Brady Eidson  <beidson at apple.com>
 
         Reviewed by Anders Carlsson.
diff --git a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
index 134cabe..01b9c1d 100644
--- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
+++ b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
@@ -108,6 +108,10 @@ void ChromeClientHaiku::focusedNodeChanged(Node*)
 {
 }
 
+void ChromeClientHaiku::focusedFrameChanged(Frame*)
+{
+}
+
 Page* ChromeClientHaiku::createWindow(Frame*, const FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&)
 {
     notImplemented();
diff --git a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
index e8f488e..deb3678 100644
--- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
+++ b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
@@ -43,83 +43,84 @@ namespace WebCore {
     public:
         ChromeClientHaiku();
         virtual ~ChromeClientHaiku();
-        void chromeDestroyed();
+        virtual void chromeDestroyed();
 
-        void setWindowRect(const FloatRect&);
-        FloatRect windowRect();
+        virtual void setWindowRect(const FloatRect&);
+        virtual FloatRect windowRect();
 
-        FloatRect pageRect();
+        virtual FloatRect pageRect();
 
-        float scaleFactor();
+        virtual float scaleFactor();
 
-        void focus();
-        void unfocus();
+        virtual void focus();
+        virtual void unfocus();
 
-        bool canTakeFocus(FocusDirection);
-        void takeFocus(FocusDirection);
+        virtual bool canTakeFocus(FocusDirection);
+        virtual void takeFocus(FocusDirection);
 
-        void focusedNodeChanged(Node*);
+        virtual void focusedNodeChanged(Node*);
+        virtual void focusedFrameChanged(Frame*);
 
-        Page* createWindow(Frame*, const FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
-        Page* createModalDialog(Frame*, const FrameLoadRequest&);
-        void show();
+        virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
+        virtual Page* createModalDialog(Frame*, const FrameLoadRequest&);
+        virtual void show();
 
-        bool canRunModal();
-        void runModal();
+        virtual bool canRunModal();
+        virtual void runModal();
 
-        void setToolbarsVisible(bool);
-        bool toolbarsVisible();
+        virtual void setToolbarsVisible(bool);
+        virtual bool toolbarsVisible();
 
-        void setStatusbarVisible(bool);
-        bool statusbarVisible();
+        virtual void setStatusbarVisible(bool);
+        virtual bool statusbarVisible();
 
-        void setScrollbarsVisible(bool);
-        bool scrollbarsVisible();
+        virtual void setScrollbarsVisible(bool);
+        virtual bool scrollbarsVisible();
 
-        void setMenubarVisible(bool);
-        bool menubarVisible();
+        virtual void setMenubarVisible(bool);
+        virtual bool menubarVisible();
 
-        void setResizable(bool);
+        virtual void setResizable(bool);
 
-        void addMessageToConsole(const String& message, unsigned int lineNumber,
+        virtual void addMessageToConsole(const String& message, unsigned int lineNumber,
                                  const String& sourceID);
-        void addMessageToConsole(MessageSource, MessageLevel, const String& message,
+        virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message,
                                  unsigned int lineNumber, const String& sourceID);
-        void addMessageToConsole(MessageSource, MessageType, MessageLevel,
+        virtual void addMessageToConsole(MessageSource, MessageType, MessageLevel,
                                  const String&, unsigned int, const String&);
 
-        bool canRunBeforeUnloadConfirmPanel();
+        virtual bool canRunBeforeUnloadConfirmPanel();
 
-        bool runBeforeUnloadConfirmPanel(const String& message, Frame* frame);
+        virtual bool runBeforeUnloadConfirmPanel(const String& message, Frame* frame);
 
-        void closeWindowSoon();
+        virtual void closeWindowSoon();
 
-        void runJavaScriptAlert(Frame*, const String&);
-        bool runJavaScriptConfirm(Frame*, const String&);
-        bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result);
-        bool shouldInterruptJavaScript();
+        virtual void runJavaScriptAlert(Frame*, const String&);
+        virtual bool runJavaScriptConfirm(Frame*, const String&);
+        virtual bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result);
+        virtual bool shouldInterruptJavaScript();
 
-        void setStatusbarText(const WTF::String&);
-        bool tabsToLinks() const;
-        IntRect windowResizerRect() const;
+        virtual void setStatusbarText(const WTF::String&);
+        virtual bool tabsToLinks() const;
+        virtual IntRect windowResizerRect() const;
 
-        void invalidateWindow(const IntRect&, bool);
-        void invalidateContentsAndWindow(const IntRect&, bool);
-        void invalidateContentsForSlowScroll(const IntRect&, bool);
-        void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect);
+        virtual void invalidateWindow(const IntRect&, bool);
+        virtual void invalidateContentsAndWindow(const IntRect&, bool);
+        virtual void invalidateContentsForSlowScroll(const IntRect&, bool);
+        virtual void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect);
 
-        IntPoint screenToWindow(const IntPoint&) const;
-        IntRect windowToScreen(const IntRect&) const;
-        PlatformPageClient platformPageClient() const;
-        void contentsSizeChanged(Frame*, const IntSize&) const;
-        void scrollRectIntoView(const IntRect&, const ScrollView*) const;
+        virtual IntPoint screenToWindow(const IntPoint&) const;
+        virtual IntRect windowToScreen(const IntRect&) const;
+        virtual PlatformPageClient platformPageClient() const;
+        virtual void contentsSizeChanged(Frame*, const IntSize&) const;
+        virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const;
 
         void addToDirtyRegion(const IntRect&);
         void scrollBackingStore(int, int, const IntRect&, const IntRect&);
         void updateBackingStore();
 
-        void scrollbarsModeDidChange() const { }
-        void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
+        virtual void scrollbarsModeDidChange() const { }
+        virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
 
         void setToolTip(const String&);
 
@@ -127,7 +128,9 @@ namespace WebCore {
 
         void print(Frame*);
 
-        void exceededDatabaseQuota(Frame*, const String& databaseName);
+#if ENABLE(DATABASE)
+        virtual void exceededDatabaseQuota(Frame*, const String& databaseName);
+#endif
 
         virtual bool selectItemWritingDirectionIsNatural();
         virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
@@ -143,19 +146,19 @@ namespace WebCore {
 
         // This is an asynchronous call. The ChromeClient can display UI asking the user for permission
         // to use Geolococation.
-        void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
-        void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { }
+        virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
+        virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { }
 
-        void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
-        void chooseIconForFiles(const Vector<String>&, FileChooser*);
+        virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
+        virtual void chooseIconForFiles(const Vector<String>&, FileChooser*);
 
-        void setCursor(const Cursor&);
+        virtual void setCursor(const Cursor&);
 
         // Notification that the given form element has changed. This function
         // will be called frequently, so handling should be very fast.
-        void formStateDidChange(const Node*);
+        virtual void formStateDidChange(const Node*);
 
-        PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks();
+        virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks();
     };
 
 } // namespace WebCore
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 7582286..b7149db 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-08  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48685
+        Notify UI process about focused frame
+
+        Added an empty implementation of the new ChromeClient method.
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::focusedFrameChanged):
+
 2010-11-08  Anders Carlsson  <andersca at apple.com>
 
         Build fix.
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h
index 890637e..a5f49e3 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -54,6 +54,7 @@ public:
     virtual void takeFocus(WebCore::FocusDirection);
 
     virtual void focusedNodeChanged(WebCore::Node*);
+    virtual void focusedFrameChanged(WebCore::Frame*);
 
     virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
     virtual void show();
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index 3610896..fe95989 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -200,6 +200,10 @@ void WebChromeClient::focusedNodeChanged(Node*)
 {
 }
 
+void WebChromeClient::focusedFrameChanged(Frame*)
+{
+}
+
 Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& features, const NavigationAction&)
 {
     NSURLRequest *URLRequest = nil;
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 8ba9a5c..fdfa41f 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-08  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48685
+        Notify UI process about focused frame
+
+        Added an empty implementation of the new ChromeClient method.
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::focusedNodeChanged): Removed unneeded namespace prefix.
+        (WebCore::ChromeClientQt::focusedFrameChanged):
+        * WebCoreSupport/ChromeClientQt.h:
+
 2010-11-08  Noam Rosenthal  <noam.rosenthal at nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 92235ed..3fec1d3 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -165,10 +165,13 @@ void ChromeClientQt::takeFocus(FocusDirection)
 }
 
 
-void ChromeClientQt::focusedNodeChanged(WebCore::Node*)
+void ChromeClientQt::focusedNodeChanged(Node*)
 {
 }
 
+void ChromeClientQt::focusedFrameChanged(Frame*)
+{
+}
 
 Page* ChromeClientQt::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features, const NavigationAction&)
 {
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index cbf62b3..b8bc72d 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -72,6 +72,7 @@ namespace WebCore {
         virtual void takeFocus(FocusDirection);
 
         virtual void focusedNodeChanged(Node*);
+        virtual void focusedFrameChanged(Frame*);
 
         virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&);
         virtual void show();
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 9ce52ac..cf94018 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-08  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48685
+        Notify UI process about focused frame
+
+        Added an empty implementation of the new ChromeClient method.
+
+        * WebCoreSupport/WebChromeClient.cpp:
+        (WebChromeClient::focusedFrameChanged):
+        * WebCoreSupport/WebChromeClient.h:
+
 2010-11-07  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
index ebea786..d046c21 100644
--- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
@@ -172,6 +172,10 @@ void WebChromeClient::focusedNodeChanged(Node*)
 {
 }
 
+void WebChromeClient::focusedFrameChanged(Frame*)
+{
+}
+
 static COMPtr<IPropertyBag> createWindowFeaturesPropertyBag(const WindowFeatures& features)
 {
     HashMap<String, COMVariant> map;
diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.h b/WebKit/win/WebCoreSupport/WebChromeClient.h
index bfa3c80..55bc572 100644
--- a/WebKit/win/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/win/WebCoreSupport/WebChromeClient.h
@@ -57,6 +57,7 @@ public:
     virtual void takeFocus(WebCore::FocusDirection);
 
     virtual void focusedNodeChanged(WebCore::Node*);
+    virtual void focusedFrameChanged(Frame*);
 
     virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&);
     virtual void show();
diff --git a/WebKit/wince/ChangeLog b/WebKit/wince/ChangeLog
index d3b4ea6..0cbd925 100644
--- a/WebKit/wince/ChangeLog
+++ b/WebKit/wince/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-08  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48685
+        Notify UI process about focused frame
+
+        Added an empty implementation of the new ChromeClient method.
+
+        * WebCoreSupport/ChromeClientWinCE.cpp:
+        (WebKit::ChromeClientWinCE::focusedFrameChanged):
+        * WebCoreSupport/ChromeClientWinCE.h:
+
 2010-11-02  Patrick Gansterer  <paroga at webkit.org>
 
         Unreviewed, build fix after r71041.
diff --git a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
index c99635a..e19d6ad 100644
--- a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
+++ b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
@@ -174,6 +174,10 @@ void ChromeClientWinCE::focusedNodeChanged(Node*)
     notImplemented();
 }
 
+void ChromeClientWinCE::focusedFrameChanged(Frame*)
+{
+}
+
 bool ChromeClientWinCE::canRunBeforeUnloadConfirmPanel()
 {
     return true;
diff --git a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
index fca2e1e..7219934 100644
--- a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
+++ b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
@@ -51,6 +51,7 @@ public:
     virtual void takeFocus(WebCore::FocusDirection);
 
     virtual void focusedNodeChanged(WebCore::Node*);
+    virtual void focusedFrameChanged(Frame*);
 
     // The Frame pointer provides the ChromeClient with context about which
     // Frame wants to create the new Page.  Also, the newly created window
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index ee4e773..e0f0cd1 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-08  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48685
+        Notify UI process about focused frame
+
+        Added an empty implementation of the new ChromeClient method.
+
+        * WebKitSupport/ChromeClientWx.cpp:
+        (WebCore::ChromeClientWx::focusedFrameChanged):
+        * WebKitSupport/ChromeClientWx.h:
+
 2010-11-07  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
index 97b98cf..65f0eea 100644
--- a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
@@ -137,6 +137,10 @@ void ChromeClientWx::focusedNodeChanged(Node*)
 {
 }
 
+void ChromeClientWx::focusedFrameChanged(Frame*)
+{
+}
+
 Page* ChromeClientWx::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features, const NavigationAction&)
 {
     Page* myPage = 0;
diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.h b/WebKit/wx/WebKitSupport/ChromeClientWx.h
index 3ca763e..2ccad43 100644
--- a/WebKit/wx/WebKitSupport/ChromeClientWx.h
+++ b/WebKit/wx/WebKitSupport/ChromeClientWx.h
@@ -56,6 +56,7 @@ public:
     virtual void takeFocus(FocusDirection);
 
     virtual void focusedNodeChanged(Node*);
+    virtual void focusedFrameChanged(Frame*);
 
     virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&);
     virtual Page* createModalDialog(Frame*, const FrameLoadRequest&);
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 031fc26..ae72efc 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,24 @@
+2010-11-08  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48685
+        Notify UI process about focused frame
+
+        Handle notifications, store the current one in WebPageProxy in UI process.
+
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageGetFocusedFrame):
+        * UIProcess/API/C/WKPage.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::focusedFrameChanged):
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::focusedFrame):
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::focusedFrameChanged):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+
 2010-11-07  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKit2/UIProcess/API/C/WKPage.cpp b/WebKit2/UIProcess/API/C/WKPage.cpp
index 6446a12..4b014cd 100644
--- a/WebKit2/UIProcess/API/C/WKPage.cpp
+++ b/WebKit2/UIProcess/API/C/WKPage.cpp
@@ -142,6 +142,11 @@ WKFrameRef WKPageGetMainFrame(WKPageRef pageRef)
     return toAPI(toImpl(pageRef)->mainFrame());
 }
 
+WKFrameRef WKPageGetFocusedFrame(WKPageRef pageRef)
+{
+    return toAPI(toImpl(pageRef)->focusedFrame());
+}
+
 WKInspectorRef WKPageGetInspector(WKPageRef pageRef)
 {
     return toAPI(toImpl(pageRef)->inspector());
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index 25bf5a9..86e58fe 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -231,6 +231,7 @@ WK_EXPORT WKBackForwardListRef WKPageGetBackForwardList(WKPageRef page);
 WK_EXPORT WKStringRef WKPageCopyTitle(WKPageRef page);
 
 WK_EXPORT WKFrameRef WKPageGetMainFrame(WKPageRef page);
+WK_EXPORT WKFrameRef WKPageGetFocusedFrame(WKPageRef page); // The focused frame may be inactive.
 WK_EXPORT double WKPageGetEstimatedProgress(WKPageRef page);
 
 WK_EXPORT WKInspectorRef WKPageGetInspector(WKPageRef page);
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index 8a33490..e5cebf1 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -1259,6 +1259,10 @@ void WebPageProxy::didGetSourceForFrame(const String& resultString, uint64_t cal
     callback->performCallbackWithReturnValue(resultString.impl());
 }
 
+void WebPageProxy::focusedFrameChanged(uint64_t frameID)
+{
+    m_focusedFrame = process()->webFrame(frameID);
+}
 
 #if USE(ACCELERATED_COMPOSITING)
 void WebPageProxy::didChangeAcceleratedCompositing(bool compositing, DrawingAreaBase::DrawingAreaInfo& drawingAreaInfo)
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index 3aa811d..b88c301 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -107,6 +107,7 @@ public:
     uint64_t pageID() const { return m_pageID; }
 
     WebFrameProxy* mainFrame() const { return m_mainFrame.get(); }
+    WebFrameProxy* focusedFrame() const { return m_focusedFrame.get(); }
 
     DrawingAreaProxy* drawingArea() { return m_drawingArea.get(); }
     void setDrawingArea(PassOwnPtr<DrawingAreaProxy>);
@@ -340,6 +341,8 @@ private:
     void didGetRenderTreeExternalRepresentation(const String&, uint64_t);
     void didGetSourceForFrame(const String&, uint64_t);
 
+    void focusedFrameChanged(uint64_t frameID);
+
     WebPageCreationParameters creationParameters(const WebCore::IntSize&) const;
 
 #if USE(ACCELERATED_COMPOSITING)
@@ -356,6 +359,7 @@ private:
     OwnPtr<DrawingAreaProxy> m_drawingArea;
     RefPtr<WebPageNamespace> m_pageNamespace;
     RefPtr<WebFrameProxy> m_mainFrame;
+    RefPtr<WebFrameProxy> m_focusedFrame;
     String m_pageTitle;
 
     String m_customUserAgent;
diff --git a/WebKit2/UIProcess/WebPageProxy.messages.in b/WebKit2/UIProcess/WebPageProxy.messages.in
index 7fc3363..6207103 100644
--- a/WebKit2/UIProcess/WebPageProxy.messages.in
+++ b/WebKit2/UIProcess/WebPageProxy.messages.in
@@ -36,6 +36,7 @@ messages -> WebPageProxy {
     SetStatusText(WTF::String statusText)
     SetToolTip(WTF::String toolTip)
     TakeFocus(bool direction)
+    FocusedFrameChanged(uint64_t frameID)
     SetToolbarsAreVisible(bool toolbarsAreVisible)
     GetToolbarsAreVisible() -> (bool toolbarsAreVisible)
     SetMenuBarIsVisible(bool menuBarIsVisible);
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
index 494774a..3859fa6 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
@@ -111,6 +111,13 @@ void WebChromeClient::focusedNodeChanged(Node*)
     notImplemented();
 }
 
+void WebChromeClient::focusedFrameChanged(Frame* frame)
+{
+    WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
+
+    WebProcess::shared().connection()->send(Messages::WebPageProxy::FocusedFrameChanged(webFrame->frameID()), m_page->pageID());
+}
+
 Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures& windowFeatures, const NavigationAction& navigationAction)
 {
     uint32_t modifiers = modifiersForNavigationAction(navigationAction);
@@ -221,7 +228,7 @@ bool WebChromeClient::canRunBeforeUnloadConfirmPanel()
 
 bool WebChromeClient::runBeforeUnloadConfirmPanel(const String& message, Frame* frame)
 {
-    WebFrame* webFrame =  static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
+    WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
 
     bool shouldClose = false;
     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::RunBeforeUnloadConfirmPanel(message, webFrame->frameID()), Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::Reply(shouldClose), m_page->pageID()))
@@ -251,7 +258,7 @@ void WebChromeClient::closeWindowSoon()
 
 void WebChromeClient::runJavaScriptAlert(Frame* frame, const String& alertText)
 {
-    WebFrame* webFrame =  static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
+    WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
 
     // Notify the bundle client.
     m_page->injectedBundleUIClient().willRunJavaScriptAlert(m_page, alertText, webFrame);
@@ -261,7 +268,7 @@ void WebChromeClient::runJavaScriptAlert(Frame* frame, const String& alertText)
 
 bool WebChromeClient::runJavaScriptConfirm(Frame* frame, const String& message)
 {
-    WebFrame* webFrame =  static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
+    WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
 
     // Notify the bundle client.
     m_page->injectedBundleUIClient().willRunJavaScriptConfirm(m_page, message, webFrame);
@@ -275,7 +282,7 @@ bool WebChromeClient::runJavaScriptConfirm(Frame* frame, const String& message)
 
 bool WebChromeClient::runJavaScriptPrompt(Frame* frame, const String& message, const String& defaultValue, String& result)
 {
-    WebFrame* webFrame =  static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
+    WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
 
     // Notify the bundle client.
     m_page->injectedBundleUIClient().willRunJavaScriptPrompt(m_page, message, defaultValue, webFrame);
@@ -361,7 +368,7 @@ PlatformPageClient WebChromeClient::platformPageClient() const
 void WebChromeClient::contentsSizeChanged(Frame* frame, const IntSize& size) const
 {
 #if PLATFORM(QT)
-    WebFrame* webFrame =  static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
+    WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
 
     if (!m_page->mainFrame() || m_page->mainFrame() != webFrame)
         return;
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
index 8479d27..8e97ff2 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
+++ b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
@@ -60,6 +60,7 @@ private:
     virtual void takeFocus(WebCore::FocusDirection);
 
     virtual void focusedNodeChanged(WebCore::Node*);
+    virtual void focusedFrameChanged(WebCore::Frame*);
 
     // The Frame pointer provides the ChromeClient with context about which
     // Frame wants to create the new Page.  Also, the newly created window

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list