Changeset 147482 in webkit


Ignore:
Timestamp:
Apr 2, 2013 12:06:39 PM (11 years ago)
Author:
timothy@apple.com
Message:

Provide a user default that can be used to disable docking of the Web Inspector.

The user default is "WebKit Web Inspector Setting - inspectorAttachDisabled".

https://webkit.org/b/113779
rdar://problem/13446021

Reviewed by Joseph Pecoraro.

Source/WebKit/cf:

  • WebCoreSupport/WebInspectorClientCF.cpp:

(WebInspectorClient::inspectorAttachDisabled): Added.
(WebInspectorClient::setInspectorAttachDisabled): Added.

Source/WebKit/mac:

  • WebCoreSupport/WebInspectorClient.h:

(WebInspectorClient::inspectorAttachDisabled): Added.
(WebInspectorClient::setInspectorAttachDisabled): Added.

  • WebCoreSupport/WebInspectorClient.mm:

(WebInspectorClient::didResizeMainFrame):
(-[WebInspectorWindowController window]):
(-[WebInspectorWindowController showWindow:]):
Check inspectorAttachDisabled() in places where we attach or update the dock button.

Source/WebKit/win:

  • WebCoreSupport/WebInspectorClient.h:

(WebInspectorClient::inspectorAttachDisabled): Added.
(WebInspectorClient::setInspectorAttachDisabled): Added.

Location:
trunk/Source/WebKit
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/cf/ChangeLog

    r132916 r147482  
     12013-04-02  Timothy Hatcher  <timothy@apple.com>
     2
     3        Provide a user default that can be used to disable docking of the Web Inspector.
     4
     5        The user default is "WebKit Web Inspector Setting - inspectorAttachDisabled".
     6
     7        https://webkit.org/b/113779
     8        rdar://problem/13446021
     9
     10        Reviewed by Joseph Pecoraro.
     11
     12        * WebCoreSupport/WebInspectorClientCF.cpp:
     13        (WebInspectorClient::inspectorAttachDisabled): Added.
     14        (WebInspectorClient::setInspectorAttachDisabled): Added.
     15
    1162012-10-29  Anders Carlsson  <andersca@apple.com>
    217
  • trunk/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp

    r132916 r147482  
    6363
    6464static const char* inspectorStartsAttachedSetting = "inspectorStartsAttached";
     65static const char* inspectorAttachDisabledSetting = "inspectorAttachDisabled";
    6566
    6667static inline RetainPtr<CFStringRef> createKeyForPreferences(const String& key)
     
    9495{
    9596    return doDispatchMessageOnFrontendPage(m_frontendPage, message);
     97}
     98
     99bool WebInspectorClient::inspectorAttachDisabled()
     100{
     101    String value;
     102    populateSetting(inspectorAttachDisabledSetting, &value);
     103    if (value.isEmpty())
     104        return false;
     105    return value == "true";
     106}
     107
     108void WebInspectorClient::setInspectorAttachDisabled(bool disabled)
     109{
     110    storeSetting(inspectorAttachDisabledSetting, disabled ? "true" : "false");
    96111}
    97112
  • trunk/Source/WebKit/mac/ChangeLog

    r147476 r147482  
     12013-04-02  Timothy Hatcher  <timothy@apple.com>
     2
     3        Provide a user default that can be used to disable docking of the Web Inspector.
     4
     5        The user default is "WebKit Web Inspector Setting - inspectorAttachDisabled".
     6
     7        https://webkit.org/b/113779
     8        rdar://problem/13446021
     9
     10        Reviewed by Joseph Pecoraro.
     11
     12        * WebCoreSupport/WebInspectorClient.h:
     13        (WebInspectorClient::inspectorAttachDisabled): Added.
     14        (WebInspectorClient::setInspectorAttachDisabled): Added.
     15
     16        * WebCoreSupport/WebInspectorClient.mm:
     17        (WebInspectorClient::didResizeMainFrame):
     18        (-[WebInspectorWindowController window]):
     19        (-[WebInspectorWindowController showWindow:]):
     20        Check inspectorAttachDisabled() in places where we attach or update the dock button.
     21
    1222013-04-02  Alexey Proskuryakov  <ap@apple.com>
    223
  • trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h

    r147004 r147482  
    7777    void setInspectorStartsAttached(bool);
    7878
     79    bool inspectorAttachDisabled();
     80    void setInspectorAttachDisabled(bool);
     81
    7982    void releaseFrontend();
    8083
  • trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm

    r147004 r147482  
    163163{
    164164    if (m_frontendClient)
    165         m_frontendClient->attachAvailabilityChanged(m_frontendClient->canAttachWindow());
     165        m_frontendClient->attachAvailabilityChanged(m_frontendClient->canAttachWindow() && !inspectorAttachDisabled());
    166166}
    167167
     
    470470
    471471    // Hide the dock button if we can't attach.
    472     _dockButton.get().hidden = !_frontendClient->canAttachWindow();
     472    _dockButton.get().hidden = !_frontendClient->canAttachWindow() || _inspectorClient->inspectorAttachDisabled();
    473473
    474474    [self setWindow:window];
     
    539539    _visible = YES;
    540540   
    541     _shouldAttach = _inspectorClient->inspectorStartsAttached();
    542    
    543     if (_shouldAttach && !_frontendClient->canAttachWindow())
    544         _shouldAttach = NO;
     541    _shouldAttach = _inspectorClient->inspectorStartsAttached() && _frontendClient->canAttachWindow() && !_inspectorClient->inspectorAttachDisabled();
    545542
    546543    if (_shouldAttach) {
  • trunk/Source/WebKit/win/ChangeLog

    r147135 r147482  
     12013-04-02  Timothy Hatcher  <timothy@apple.com>
     2
     3        Provide a user default that can be used to disable docking of the Web Inspector.
     4
     5        The user default is "WebKit Web Inspector Setting - inspectorAttachDisabled".
     6
     7        https://webkit.org/b/113779
     8        rdar://problem/13446021
     9
     10        Reviewed by Joseph Pecoraro.
     11
     12        * WebCoreSupport/WebInspectorClient.h:
     13        (WebInspectorClient::inspectorAttachDisabled): Added.
     14        (WebInspectorClient::setInspectorAttachDisabled): Added.
     15
    1162013-03-28  Matt Falkenhagen  <falken@chromium.org>
    217
  • trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h

    r147004 r147482  
    7070    bool inspectorStartsAttached();
    7171    void setInspectorStartsAttached(bool);
     72
     73    bool inspectorAttachDisabled();
     74    void setInspectorAttachDisabled(bool);
    7275
    7376    void releaseFrontend();
Note: See TracChangeset for help on using the changeset viewer.