[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

beidson at apple.com beidson at apple.com
Thu Apr 8 02:18:16 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 3b2609259262058a3a61fcef29673286c1e5e379
Author: beidson at apple.com <beidson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Mar 10 04:53:04 2010 +0000

    REGRESSION: WebInspector docking busted on Windows
    <rdar://problem/7728433> and https://bugs.webkit.org/show_bug.cgi?id=35953
    
    Reviewed by Tim Hatcher.
    
    WebCore:
    
    First off, a bit of settings-key related cleanup. If they're shared over multiple files, these
    things should be properly declared Strings, not random loose char*'s.
    
    Along with that change, we move the "inspectorStartsAttachedSettingName" from WebKit down to the
    InspectorController in WebCore.
    
    Finally, when the controller is ready to show the WebInspector window, it can use this newly
    exposed settings key to call "setWindowVisible" directly instead of relying on "showWindow" to do
    it indirectly.
    
    * WebCore.base.exp:
    
    * inspector/InspectorBackend.cpp:
    (WebCore::InspectorBackend::saveFrontendSettings):
    * inspector/InspectorController.cpp:
    (WebCore::InspectorController::frontendSettingsSettingName):
    (WebCore::InspectorController::inspectorStartsAttachedSettingName):
    (WebCore::InspectorController::scriptObjectReady): Using the new inspectorStartsAttachedSettingName
      key and some "can I attach this?" logic, call setWindowVisible directly to display the inspector
      window.
    (WebCore::InspectorController::populateScriptObjects):
    * inspector/InspectorController.h:
    
    WebKit/mac:
    
    * WebCoreSupport/WebInspectorClient.mm:
    (-[WebInspectorWindowController showWindow:]): Use the InspectorController:: copy of the should attach settings key.
    (-[WebInspectorWindowController attach]): Ditto.
    (-[WebInspectorWindowController detach]): Ditto.
    
    WebKit/win:
    
    * WebCoreSupport/WebInspectorClient.cpp:
    (WebInspectorClient::attachWindow): Use the InspectorController:: copy of the should attach settings key.
    (WebInspectorClient::detachWindow): Ditto.
    (WebInspectorClient::showWindowWithoutNotifications): Ditto.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55761 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 59f5b15..556fff9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,33 @@
+2010-03-09  Brady Eidson  <beidson at apple.com>
+
+        Reviewed by Tim Hatcher.
+
+        REGRESSION: WebInspector docking busted on Windows
+        <rdar://problem/7728433> and https://bugs.webkit.org/show_bug.cgi?id=35953
+
+        First off, a bit of settings-key related cleanup. If they're shared over multiple files, these 
+        things should be properly declared Strings, not random loose char*'s.
+
+        Along with that change, we move the "inspectorStartsAttachedSettingName" from WebKit down to the
+        InspectorController in WebCore.
+
+        Finally, when the controller is ready to show the WebInspector window, it can use this newly
+        exposed settings key to call "setWindowVisible" directly instead of relying on "showWindow" to do
+        it indirectly.
+
+        * WebCore.base.exp:
+
+        * inspector/InspectorBackend.cpp:
+        (WebCore::InspectorBackend::saveFrontendSettings):
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::frontendSettingsSettingName):
+        (WebCore::InspectorController::inspectorStartsAttachedSettingName):
+        (WebCore::InspectorController::scriptObjectReady): Using the new inspectorStartsAttachedSettingName
+          key and some "can I attach this?" logic, call setWindowVisible directly to display the inspector
+          window.
+        (WebCore::InspectorController::populateScriptObjects):
+        * inspector/InspectorController.h:
+
 2010-03-09  Alexey Proskuryakov  <ap at apple.com>
 
         Reviewed by Mark Rowe.
diff --git a/WebCore/WebCore.base.exp b/WebCore/WebCore.base.exp
index 7e9cb7d..4364aea 100644
--- a/WebCore/WebCore.base.exp
+++ b/WebCore/WebCore.base.exp
@@ -405,6 +405,7 @@ __ZN7WebCore19AnimationController17suspendAnimationsEPNS_8DocumentE
 __ZN7WebCore19AnimationController20pauseAnimationAtTimeEPNS_12RenderObjectERKNS_6StringEd
 __ZN7WebCore19AnimationController21pauseTransitionAtTimeEPNS_12RenderObjectERKNS_6StringEd
 __ZN7WebCore19CSSStyleDeclaration11setPropertyERKNS_6StringES3_Ri
+__ZN7WebCore19InspectorController34inspectorStartsAttachedSettingNameEv
 __ZN7WebCore19SelectionController10setFocusedEb
 __ZN7WebCore19SelectionController12setSelectionERKNS_16VisibleSelectionEbbb
 __ZN7WebCore19SelectionController16setSelectedRangeEPNS_5RangeENS_9EAffinityEb
diff --git a/WebCore/inspector/InspectorBackend.cpp b/WebCore/inspector/InspectorBackend.cpp
index 743a6ec..f522d43 100644
--- a/WebCore/inspector/InspectorBackend.cpp
+++ b/WebCore/inspector/InspectorBackend.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
  * Copyright (C) 2008 Matt Lilek <webkit at mattlilek.com>
  *
  * Redistribution and use in source and binary forms, with or without
@@ -82,7 +82,7 @@ InspectorBackend::~InspectorBackend()
 void InspectorBackend::saveFrontendSettings(const String& settings)
 {
     if (m_inspectorController)
-        m_inspectorController->setSetting(InspectorController::FrontendSettingsSettingName, settings);
+        m_inspectorController->setSetting(InspectorController::frontendSettingsSettingName(), settings);
 }
 
 void InspectorBackend::storeLastActivePanel(const String& panelName)
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 90fdff9..b3ca3ae 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
  * Copyright (C) 2008 Matt Lilek <webkit at mattlilek.com>
  *
  * Redistribution and use in source and binary forms, with or without
@@ -119,7 +119,18 @@ static const char* const debuggerEnabledSettingName = "debuggerEnabled";
 static const char* const profilerEnabledSettingName = "profilerEnabled";
 static const char* const inspectorAttachedHeightName = "inspectorAttachedHeight";
 static const char* const lastActivePanelSettingName = "lastActivePanel";
-const char* const InspectorController::FrontendSettingsSettingName = "frontendSettings";
+
+const String& InspectorController::frontendSettingsSettingName()
+{
+    DEFINE_STATIC_LOCAL(String, settingName, ("frontendSettings"));
+    return settingName;
+}
+
+const String& InspectorController::inspectorStartsAttachedSettingName()
+{
+    DEFINE_STATIC_LOCAL(String, settingName, ("inspectorStartsAttached"));
+    return settingName;
+}
 
 static const unsigned defaultAttachedHeight = 300;
 static const float minimumAttachedHeight = 250.0f;
@@ -554,8 +565,15 @@ void InspectorController::scriptObjectReady()
         enableProfiler();
 #endif
 
+    // If no preference is set - default to an attached window. This is important for inspector LayoutTests.
+    String shouldAttachValue = setting(inspectorStartsAttachedSettingName());
+    bool shouldAttach = shouldAttachValue != "false";
+    
+    if (shouldAttach && !canAttachWindow())
+        shouldAttach = false;
+
     // Make sure our window is visible now that the page loaded
-    showWindow();
+    setWindowVisible(true, shouldAttach);
 
     m_client->inspectorWindowObjectCleared();
 }
@@ -671,7 +689,7 @@ void InspectorController::populateScriptObjects()
     if (!m_frontend)
         return;
 
-    m_frontend->populateFrontendSettings(setting(FrontendSettingsSettingName));
+    m_frontend->populateFrontendSettings(setting(frontendSettingsSettingName()));
 
     if (m_resourceTrackingEnabled)
         m_frontend->resourceTrackingWasEnabled();
diff --git a/WebCore/inspector/InspectorController.h b/WebCore/inspector/InspectorController.h
index 6ab5e89..3cdc807 100644
--- a/WebCore/inspector/InspectorController.h
+++ b/WebCore/inspector/InspectorController.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -252,8 +252,11 @@ public:
     void addScriptToEvaluateOnLoad(const String& source);
     void removeAllScriptsToEvaluateOnLoad();
 
+    static const String& inspectorStartsAttachedSettingName();
+
 private:
-    static const char* const FrontendSettingsSettingName;
+    static const String& frontendSettingsSettingName();
+
     friend class InspectorBackend;
     friend class InspectorFrontendHost;
     friend class InjectedScriptHost;
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 3ff64d9..cdee9ea 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,15 @@
+2010-03-09  Brady Eidson  <beidson at apple.com>
+
+        Reviewed by Tim Hatcher.
+
+        REGRESSION: WebInspector docking busted on Windows
+        <rdar://problem/7728433> and https://bugs.webkit.org/show_bug.cgi?id=35953
+
+        * WebCoreSupport/WebInspectorClient.mm:
+        (-[WebInspectorWindowController showWindow:]): Use the InspectorController:: copy of the should attach settings key.
+        (-[WebInspectorWindowController attach]): Ditto.
+        (-[WebInspectorWindowController detach]): Ditto.
+
 2010-03-09  Geoffrey Garen  <ggaren at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
index 8b51566..c5f1729 100644
--- a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
@@ -44,8 +44,6 @@
 
 using namespace WebCore;
 
-static const char* const inspectorStartsAttachedName = "inspectorStartsAttached";
-
 @interface WebInspectorWindowController : NSWindowController <NSWindowDelegate> {
 @private
     WebView *_inspectedWebView;
@@ -327,7 +325,7 @@ void WebInspectorClient::inspectorWindowObjectCleared()
     _visible = YES;
     
     // If no preference is set - default to an attached window. This is important for inspector LayoutTests.
-    String shouldAttach = [_inspectedWebView page]->inspectorController()->setting(inspectorStartsAttachedName);
+    String shouldAttach = [_inspectedWebView page]->inspectorController()->setting(InspectorController::inspectorStartsAttachedSettingName());
     _shouldAttach = shouldAttach != "false";
     
     if (_shouldAttach && ![_inspectedWebView page]->inspectorController()->canAttachWindow())
@@ -365,7 +363,7 @@ void WebInspectorClient::inspectorWindowObjectCleared()
     if (_attachedToInspectedWebView)
         return;
 
-    [_inspectedWebView page]->inspectorController()->setSetting(inspectorStartsAttachedName, "true");
+    [_inspectedWebView page]->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "true");
     _movingWindows = YES;
 
     [self close];
@@ -379,7 +377,7 @@ void WebInspectorClient::inspectorWindowObjectCleared()
     if (!_attachedToInspectedWebView)
         return;
 
-    [_inspectedWebView page]->inspectorController()->setSetting(inspectorStartsAttachedName, "false");
+    [_inspectedWebView page]->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "false");
     _movingWindows = YES;
 
     [self close];
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 670034f..14de714 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,15 @@
+2010-03-09  Brady Eidson  <beidson at apple.com>
+
+        Reviewed by Tim Hatcher.
+
+        REGRESSION: WebInspector docking busted on Windows
+        <rdar://problem/7728433> and https://bugs.webkit.org/show_bug.cgi?id=35953
+
+        * WebCoreSupport/WebInspectorClient.cpp:
+        (WebInspectorClient::attachWindow): Use the InspectorController:: copy of the should attach settings key.
+        (WebInspectorClient::detachWindow): Ditto.
+        (WebInspectorClient::showWindowWithoutNotifications): Ditto.
+
 2010-03-09  John Sullivan  <sullivan at apple.com>
 
         Fixed localized string key collision. update-webkit-localized-strings now
diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
index 14e6e10..6a10c0d 100644
--- a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -52,8 +52,6 @@
 
 using namespace WebCore;
 
-static const char* const inspectorStartsAttachedName = "inspectorStartsAttached";
-
 static LPCTSTR kWebInspectorWindowClassName = TEXT("WebInspectorWindowClass");
 static ATOM registerWindowClass();
 static LPCTSTR kWebInspectorPointerProp = TEXT("WebInspectorPointer");
@@ -233,7 +231,7 @@ void WebInspectorClient::attachWindow()
     if (m_attached)
         return;
 
-    m_inspectedWebView->page()->inspectorController()->setSetting(inspectorStartsAttachedName, "true");
+    m_inspectedWebView->page()->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "true");
 
     closeWindowWithoutNotifications();
     showWindowWithoutNotifications();
@@ -244,7 +242,7 @@ void WebInspectorClient::detachWindow()
     if (!m_attached)
         return;
 
-    m_inspectedWebView->page()->inspectorController()->setSetting(inspectorStartsAttachedName, "false");
+    m_inspectedWebView->page()->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "false");
 
     closeWindowWithoutNotifications();
     showWindowWithoutNotifications();
@@ -350,7 +348,7 @@ void WebInspectorClient::showWindowWithoutNotifications()
     ASSERT(m_inspectedWebViewHwnd);
 
     // If no preference is set - default to an attached window. This is important for inspector LayoutTests.
-    String shouldAttach = m_inspectedWebView->page()->inspectorController()->setting(inspectorStartsAttachedName);
+    String shouldAttach = m_inspectedWebView->page()->inspectorController()->setting(InspectorController::inspectorStartsAttachedSettingName());
     m_shouldAttachWhenShown = shouldAttach != "false";
         
     if (m_shouldAttachWhenShown && !m_inspectedWebView->page()->inspectorController()->canAttachWindow())

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list