[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

yurys at chromium.org yurys at chromium.org
Sun Feb 20 23:48:42 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit d8b7ab361fc767aca7f7cbbbb9481cf32d2c2d1b
Author: yurys at chromium.org <yurys at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 25 16:09:03 2011 +0000

    2011-01-25  Yury Semikhatsky  <yurys at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            Web Inspector: remove "attached" state related methods from InspectorAgent
            https://bugs.webkit.org/show_bug.cgi?id=53086
    
            * WebCore.exp.in:
            * inspector/InspectorAgent.cpp:
            * inspector/InspectorAgent.h:
            * inspector/InspectorFrontendClientLocal.cpp:
            (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
            (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
            * inspector/InspectorSettings.cpp:
            (WebCore::InspectorSettings::InspectorSettings):
            * inspector/InspectorSettings.h:
    2011-01-25  Yury Semikhatsky  <yurys at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            Web Inspector: remove "attached" state related methods from InspectorAgent
            https://bugs.webkit.org/show_bug.cgi?id=53086
    
            * WebCoreSupport/WebInspectorClientCF.cpp:
            (WebInspectorClient::sendMessageToFrontend):
            (WebInspectorClient::inspectorStartsAttached):
            (WebInspectorClient::setInspectorStartsAttached):
            (WebInspectorClient::releaseFrontendPage):
    2011-01-25  Yury Semikhatsky  <yurys at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            Web Inspector: remove "attached" state related methods from InspectorAgent
            https://bugs.webkit.org/show_bug.cgi?id=53086
    
            * WebCoreSupport/WebInspectorClient.h:
            * WebCoreSupport/WebInspectorClient.mm:
            (-[WebInspectorWindowController showWindow:]):
            (-[WebInspectorWindowController attach]):
            (-[WebInspectorWindowController detach]):
    2011-01-25  Yury Semikhatsky  <yurys at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            Web Inspector: remove "attached" state related methods from InspectorAgent
            https://bugs.webkit.org/show_bug.cgi?id=53086
    
            * WebCoreSupport/WebInspectorClient.cpp:
            (WebInspectorFrontendClient::attachWindow):
            (WebInspectorFrontendClient::detachWindow):
            (WebInspectorFrontendClient::showWindowWithoutNotifications):
            * WebCoreSupport/WebInspectorClient.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76594 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 46fe612..f29c7be 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2011-01-25  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: remove "attached" state related methods from InspectorAgent
+        https://bugs.webkit.org/show_bug.cgi?id=53086
+
+        * WebCore.exp.in:
+        * inspector/InspectorAgent.cpp:
+        * inspector/InspectorAgent.h:
+        * inspector/InspectorFrontendClientLocal.cpp:
+        (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
+        (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
+        * inspector/InspectorSettings.cpp:
+        (WebCore::InspectorSettings::InspectorSettings):
+        * inspector/InspectorSettings.h:
+
 2011-01-25  Qi Zhang  <qi.2.zhang at nokia.com>
 
         Reviewed by Laszlo Gombos.
diff --git a/Source/WebCore/WebCore.exp.in b/Source/WebCore/WebCore.exp.in
index 106b8f4..9b2117d 100644
--- a/Source/WebCore/WebCore.exp.in
+++ b/Source/WebCore/WebCore.exp.in
@@ -1369,10 +1369,8 @@ __ZN7WebCore14InspectorAgent18disconnectFrontendEv
 __ZN7WebCore14InspectorAgent20stopTimelineProfilerEv
 __ZN7WebCore14InspectorAgent21showAndEnableDebuggerEv
 __ZN7WebCore14InspectorAgent21startTimelineProfilerEv
-__ZN7WebCore14InspectorAgent23inspectorStartsAttachedEv
 __ZN7WebCore14InspectorAgent25evaluateForTestInFrontendElRKN3WTF6StringE
 __ZN7WebCore14InspectorAgent26setInspectorFrontendClientEN3WTF10PassOwnPtrINS_23InspectorFrontendClientEEE
-__ZN7WebCore14InspectorAgent26setInspectorStartsAttachedEb
 __ZN7WebCore14InspectorAgent26stopUserInitiatedProfilingEv
 __ZN7WebCore14InspectorAgent27startUserInitiatedProfilingEv
 __ZN7WebCore15InspectorClient31doDispatchMessageOnFrontendPageEPNS_4PageERKN3WTF6StringE
diff --git a/Source/WebCore/inspector/InspectorAgent.cpp b/Source/WebCore/inspector/InspectorAgent.cpp
index e5f26cd..4b342c7 100644
--- a/Source/WebCore/inspector/InspectorAgent.cpp
+++ b/Source/WebCore/inspector/InspectorAgent.cpp
@@ -193,26 +193,6 @@ bool InspectorAgent::enabled() const
     return m_inspectedPage->settings()->developerExtrasEnabled();
 }
 
-bool InspectorAgent::inspectorStartsAttached()
-{
-    return m_settings->getBoolean(InspectorSettings::InspectorStartsAttached);
-}
-
-void InspectorAgent::setInspectorStartsAttached(bool attached)
-{
-    m_settings->setBoolean(InspectorSettings::InspectorStartsAttached, attached);
-}
-
-void InspectorAgent::setInspectorAttachedHeight(long height)
-{
-    m_settings->setLong(InspectorSettings::InspectorAttachedHeight, height);
-}
-
-long InspectorAgent::inspectorAttachedHeight() const
-{
-    return m_settings->getLong(InspectorSettings::InspectorAttachedHeight);
-}
-
 bool InspectorAgent::searchingForNodeInPage() const
 {
     return m_state->getBoolean(InspectorState::searchingForNode);
diff --git a/Source/WebCore/inspector/InspectorAgent.h b/Source/WebCore/inspector/InspectorAgent.h
index 3ea1410..362abec 100644
--- a/Source/WebCore/inspector/InspectorAgent.h
+++ b/Source/WebCore/inspector/InspectorAgent.h
@@ -257,11 +257,6 @@ public:
     void removeAllScriptsToEvaluateOnLoad();
     void setInspectorExtensionAPI(const String& source);
 
-    bool inspectorStartsAttached();
-    void setInspectorStartsAttached(bool);
-    void setInspectorAttachedHeight(long);
-    long inspectorAttachedHeight() const;
-
     InspectorState* state() { return m_state.get(); }
     InspectorSettings* settings() { return m_settings.get(); }
 
diff --git a/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp b/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
index 4812b2a..5e9b441 100644
--- a/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
+++ b/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
@@ -38,6 +38,7 @@
 #include "Frame.h"
 #include "FrameView.h"
 #include "InspectorBackendDispatcher.h"
+#include "InspectorClient.h"
 #include "InspectorController.h"
 #include "InspectorFrontendHost.h"
 #include "Page.h"
@@ -47,6 +48,7 @@
 
 namespace WebCore {
 
+static const char* inspectorAttachedHeightSetting = "inspectorAttachedHeight";
 static const unsigned defaultAttachedHeight = 300;
 static const float minimumAttachedHeight = 250.0f;
 static const float maximumAttachedHeightRatio = 0.75f;
@@ -107,7 +109,7 @@ void InspectorFrontendClientLocal::changeAttachedWindowHeight(unsigned height)
 {
     unsigned totalHeight = m_frontendPage->mainFrame()->view()->visibleHeight() + m_inspectorController->inspectedPage()->mainFrame()->view()->visibleHeight();
     unsigned attachedHeight = constrainedAttachedWindowHeight(height, totalHeight);
-    m_inspectorController->setInspectorAttachedHeight(attachedHeight);
+    m_inspectorController->inspectorClient()->storeSetting(inspectorAttachedHeightSetting, String::number(attachedHeight));
     setAttachedWindowHeight(attachedHeight);
 }
 
@@ -133,9 +135,9 @@ void InspectorFrontendClientLocal::setAttachedWindow(bool attached)
 void InspectorFrontendClientLocal::restoreAttachedWindowHeight()
 {
     unsigned inspectedPageHeight = m_inspectorController->inspectedPage()->mainFrame()->view()->visibleHeight();
-    int attachedHeight = m_inspectorController->inspectorAttachedHeight();
-    bool success = true;
-    unsigned preferredHeight = success ? static_cast<unsigned>(attachedHeight) : defaultAttachedHeight;
+    String value;
+    m_inspectorController->inspectorClient()->populateSetting(inspectorAttachedHeightSetting, &value);
+    unsigned preferredHeight = value.isEmpty() ? defaultAttachedHeight : value.toUInt();
     
     // This call might not go through (if the window starts out detached), but if the window is initially created attached,
     // InspectorController::attachWindow is never called, so we need to make sure to set the attachedWindowHeight.
diff --git a/Source/WebCore/inspector/InspectorSettings.cpp b/Source/WebCore/inspector/InspectorSettings.cpp
index 3ebc3ab..08c5645 100644
--- a/Source/WebCore/inspector/InspectorSettings.cpp
+++ b/Source/WebCore/inspector/InspectorSettings.cpp
@@ -39,8 +39,6 @@ namespace WebCore {
 const char* InspectorSettings::MonitoringXHREnabled = "xhrMonitor";
 const char* InspectorSettings::ProfilerAlwaysEnabled = "profilerEnabled";
 const char* InspectorSettings::DebuggerAlwaysEnabled = "debuggerEnabled";
-const char* InspectorSettings::InspectorStartsAttached = "inspectorStartsAttached";
-const char* InspectorSettings::InspectorAttachedHeight = "inspectorAttachedHeight";
 
 InspectorSettings::InspectorSettings(InspectorClient* client)
     : m_client(client)
@@ -48,8 +46,6 @@ InspectorSettings::InspectorSettings(InspectorClient* client)
     registerBoolean(MonitoringXHREnabled, false);
     registerBoolean(ProfilerAlwaysEnabled, false);
     registerBoolean(DebuggerAlwaysEnabled, false);
-    registerBoolean(InspectorStartsAttached, true);
-    registerLong(InspectorAttachedHeight, 300);
 }
 
 bool InspectorSettings::getBoolean(const String& name)
diff --git a/Source/WebCore/inspector/InspectorSettings.h b/Source/WebCore/inspector/InspectorSettings.h
index 717d11f..0d48570 100644
--- a/Source/WebCore/inspector/InspectorSettings.h
+++ b/Source/WebCore/inspector/InspectorSettings.h
@@ -47,8 +47,6 @@ public:
     static const char* MonitoringXHREnabled;
     static const char* ProfilerAlwaysEnabled;
     static const char* DebuggerAlwaysEnabled;
-    static const char* InspectorStartsAttached;
-    static const char* InspectorAttachedHeight;
 
     InspectorSettings(InspectorClient* client);
 
diff --git a/Source/WebKit/cf/ChangeLog b/Source/WebKit/cf/ChangeLog
index f712c97..9812efa 100644
--- a/Source/WebKit/cf/ChangeLog
+++ b/Source/WebKit/cf/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-25  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: remove "attached" state related methods from InspectorAgent
+        https://bugs.webkit.org/show_bug.cgi?id=53086
+
+        * WebCoreSupport/WebInspectorClientCF.cpp:
+        (WebInspectorClient::sendMessageToFrontend):
+        (WebInspectorClient::inspectorStartsAttached):
+        (WebInspectorClient::setInspectorStartsAttached):
+        (WebInspectorClient::releaseFrontendPage):
+
 2011-01-03  Pratik Solanki  <psolanki at apple.com>
 
         Mac build fix. Define WTF_USE_CFNETWORK for Windows build only.
diff --git a/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp b/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
index 9183fa4..cefe544 100644
--- a/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
+++ b/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
@@ -65,6 +65,8 @@
 
 using namespace WebCore;
 
+static const char* inspectorStartsAttachedSetting = "inspectorStartsAttached";
+
 static inline CFStringRef createKeyForPreferences(const String& key)
 {
     RetainPtr<CFStringRef> keyCFString(AdoptCF, key.createCFString());
@@ -98,12 +100,24 @@ void WebInspectorClient::storeSetting(const String& key, const String& setting)
     CFPreferencesSetAppValue(preferencesKey.get(), objectToStore.get(), kCFPreferencesCurrentApplication);
 }
 
-void WebInspectorClient::releaseFrontendPage()
+bool WebInspectorClient::sendMessageToFrontend(const String& message)
 {
-    m_frontendPage = 0;
+    return doDispatchMessageOnFrontendPage(m_frontendPage, message);
 }
 
-bool WebInspectorClient::sendMessageToFrontend(const String& message)
+bool WebInspectorClient::inspectorStartsAttached()
 {
-    return doDispatchMessageOnFrontendPage(m_frontendPage, message);
+    String value;
+    populateSetting(inspectorStartsAttachedSetting, &value);
+    return value == "true";
+}
+
+void WebInspectorClient::setInspectorStartsAttached(bool attached)
+{
+    storeSetting(inspectorStartsAttachedSetting, attached ? "true" : "false");
+}
+
+void WebInspectorClient::releaseFrontendPage()
+{
+    m_frontendPage = 0;
 }
diff --git a/Source/WebKit/mac/ChangeLog b/Source/WebKit/mac/ChangeLog
index 02df835..0e710c7 100644
--- a/Source/WebKit/mac/ChangeLog
+++ b/Source/WebKit/mac/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-25  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: remove "attached" state related methods from InspectorAgent
+        https://bugs.webkit.org/show_bug.cgi?id=53086
+
+        * WebCoreSupport/WebInspectorClient.h:
+        * WebCoreSupport/WebInspectorClient.mm:
+        (-[WebInspectorWindowController showWindow:]):
+        (-[WebInspectorWindowController attach]):
+        (-[WebInspectorWindowController detach]):
+
 2011-01-23  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by John Sullivan.
diff --git a/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h b/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h
index 75a3cc6..cb928e5 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h
+++ b/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h
@@ -64,6 +64,9 @@ public:
 
     virtual bool sendMessageToFrontend(const WTF::String&);
 
+    bool inspectorStartsAttached();
+    void setInspectorStartsAttached(bool);
+
     void releaseFrontendPage();
 
 private:
diff --git a/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
index 5beedcf..18746b3 100644
--- a/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
+++ b/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
@@ -355,9 +355,7 @@ void WebInspectorFrontendClient::updateWindowTitle() const
 
     _visible = YES;
     
-    // If no preference is set - default to an attached window. This is important for inspector LayoutTests.
-    // FIXME: This flag can be fetched directly from the flags storage.
-    _shouldAttach = [_inspectedWebView page]->inspectorController()->inspectorStartsAttached();
+    _shouldAttach = _inspectorClient->inspectorStartsAttached();
     
     if (_shouldAttach && !_frontendClient->canAttachWindow())
         _shouldAttach = NO;
@@ -392,8 +390,7 @@ void WebInspectorFrontendClient::updateWindowTitle() const
     if (_attachedToInspectedWebView)
         return;
 
-    // FIXME: This flag can be saved directly to the flags storage.
-    [_inspectedWebView page]->inspectorController()->setInspectorStartsAttached(true);
+    _inspectorClient->setInspectorStartsAttached(true);
 
     [self close];
     [self showWindow:nil];
@@ -404,8 +401,7 @@ void WebInspectorFrontendClient::updateWindowTitle() const
     if (!_attachedToInspectedWebView)
         return;
 
-    // FIXME: This flag can be saved to the flags storage directly.
-    [_inspectedWebView page]->inspectorController()->setInspectorStartsAttached(false);
+    _inspectorClient->setInspectorStartsAttached(false);
 
     [self close];
     [self showWindow:nil];
diff --git a/Source/WebKit/win/ChangeLog b/Source/WebKit/win/ChangeLog
index cefedc7..d529ded 100644
--- a/Source/WebKit/win/ChangeLog
+++ b/Source/WebKit/win/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-25  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: remove "attached" state related methods from InspectorAgent
+        https://bugs.webkit.org/show_bug.cgi?id=53086
+
+        * WebCoreSupport/WebInspectorClient.cpp:
+        (WebInspectorFrontendClient::attachWindow):
+        (WebInspectorFrontendClient::detachWindow):
+        (WebInspectorFrontendClient::showWindowWithoutNotifications):
+        * WebCoreSupport/WebInspectorClient.h:
+
 2011-01-24  Adam Roben  <aroben at apple.com>
 
         Windows Production build fix
diff --git a/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp b/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
index 76ebc8f..dee2516 100644
--- a/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
+++ b/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
@@ -271,8 +271,7 @@ void WebInspectorFrontendClient::attachWindow()
     if (m_attached)
         return;
 
-    // FIXME: This flag can be saved to the flags storage directly.
-    m_inspectedWebView->page()->inspectorController()->setInspectorStartsAttached(true);
+    m_inspectorClient->setInspectorStartsAttached(true);
 
     closeWindowWithoutNotifications();
     showWindowWithoutNotifications();
@@ -283,8 +282,7 @@ void WebInspectorFrontendClient::detachWindow()
     if (!m_attached)
         return;
 
-    // FIXME: This flag can be saved to the flags storage directly.
-    m_inspectedWebView->page()->inspectorController()->setInspectorStartsAttached(false);
+    m_inspectorClient->setInspectorStartsAttached(false);
 
     closeWindowWithoutNotifications();
     showWindowWithoutNotifications();
@@ -365,7 +363,7 @@ void WebInspectorFrontendClient::showWindowWithoutNotifications()
     else {
         // If no preference is set - default to an attached window. This is important for inspector LayoutTests.
         // FIXME: This flag can be fetched directly from the flags storage.
-        shouldAttach = m_inspectedWebView->page()->inspectorController()->inspectorStartsAttached();
+        shouldAttach = m_inspectorClient->inspectorStartsAttached();
 
         if (shouldAttach && !canAttachWindow())
             shouldAttach = false;
diff --git a/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h b/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h
index 0c38247..2c4bcdf 100644
--- a/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h
+++ b/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h
@@ -63,6 +63,11 @@ public:
 
     virtual bool sendMessageToFrontend(const WTF::String&);
 
+    bool inspectorStartsAttached();
+    void setInspectorStartsAttached(bool);
+
+    void releaseFrontendPage();
+
     void updateHighlight();
     void frontendClosing()
     {
@@ -70,7 +75,6 @@ public:
         releaseFrontendPage();
     }
 
-    void releaseFrontendPage();
 private:
     ~WebInspectorClient();
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list