Changeset 49305 in webkit


Ignore:
Timestamp:
Oct 8, 2009 9:11:08 AM (15 years ago)
Author:
Adam Roben
Message:

Make IWebInspectorPrivate be accessed in a more standard way

Fixes <http://webkit.org/b/30215> Make IWebInspectorPrivate be
accessed in a more standard way

Reviewed by John Sullivan and Tim Hatcher.

WebKit/win:

IWebViewPrivate::inspectorPrivate has been removed. Callers should
instead use IWebViewPrivate::inspector and then use QueryInterface to
get the IWebInspectorPrivate interface. This matches how our other COM
classes work.

  • Interfaces/IWebViewPrivate.idl: Removed inspectorPrivate.

(WebInspector::QueryInterface): Support querying to
IWebInspectorPrivate.

  • WebView.cpp:
  • WebView.h:

Removed inspectorPrivate.

WebKitTools:

Use QueryInterface to get IWebInspectorPrivate

  • DumpRenderTree/win/LayoutTestControllerWin.cpp:

(LayoutTestController::evaluateInWebInspector): Get the IWebInspector
by calling IWebViewPrivate::inspector, then use QueryInterface to get
to the IWebInspectorPrivate interface.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/win/ChangeLog

    r49304 r49305  
     12009-10-08  Adam Roben  <aroben@apple.com>
     2
     3        Make IWebInspectorPrivate be accessed in a more standard way
     4
     5        IWebViewPrivate::inspectorPrivate has been removed. Callers should
     6        instead use IWebViewPrivate::inspector and then use QueryInterface to
     7        get the IWebInspectorPrivate interface. This matches how our other COM
     8        classes work.
     9
     10        Fixes <http://webkit.org/b/30215> Make IWebInspectorPrivate be
     11        accessed in a more standard way
     12
     13        Reviewed by John Sullivan and Tim Hatcher.
     14
     15        * Interfaces/IWebViewPrivate.idl: Removed inspectorPrivate.
     16
     17        * WebInspector.cpp:
     18        (WebInspector::QueryInterface): Support querying to
     19        IWebInspectorPrivate.
     20
     21        * WebView.cpp:
     22        * WebView.h:
     23        Removed inspectorPrivate.
     24
    1252009-10-08  Adam Roben  <aroben@apple.com>
    226
  • trunk/WebKit/win/Interfaces/IWebViewPrivate.idl

    r49304 r49305  
    209209    // Removes all white list entries created with whiteListAccessFromOrigin.
    210210    HRESULT resetOriginAccessWhiteLists();
    211 
    212     HRESULT inspectorPrivate([out, retval] IWebInspectorPrivate**);
    213211}
  • trunk/WebKit/win/WebInspector.cpp

    r49091 r49305  
    7373    if (IsEqualGUID(riid, IID_IWebInspector))
    7474        *ppvObject = static_cast<IWebInspector*>(this);
     75    else if (IsEqualGUID(riid, IID_IWebInspectorPrivate))
     76        *ppvObject = static_cast<IWebInspectorPrivate*>(this);
    7577    else if (IsEqualGUID(riid, IID_IUnknown))
    7678        *ppvObject = static_cast<IWebInspector*>(this);
  • trunk/WebKit/win/WebView.cpp

    r49299 r49305  
    51785178}
    51795179
    5180 HRESULT STDMETHODCALLTYPE WebView::inspectorPrivate(IWebInspectorPrivate** inspector)
    5181 {
    5182     if (!m_webInspector)
    5183         m_webInspector.adoptRef(WebInspector::createInstance(this));
    5184 
    5185     return m_webInspector.copyRefTo(inspector);
    5186 }
    5187 
    51885180HRESULT STDMETHODCALLTYPE WebView::windowAncestryDidChange()
    51895181{
  • trunk/WebKit/win/WebView.h

    r49299 r49305  
    673673    virtual HRESULT STDMETHODCALLTYPE inspector(
    674674        /* [retval][out] */ IWebInspector**);
    675 
    676     virtual HRESULT STDMETHODCALLTYPE inspectorPrivate(
    677         /* [retval][out] */ IWebInspectorPrivate**);
    678675
    679676    virtual HRESULT STDMETHODCALLTYPE clearUndoRedoOperations( void);
  • trunk/WebKitTools/ChangeLog

    r49299 r49305  
     12009-10-08  Adam Roben  <aroben@apple.com>
     2
     3        Use QueryInterface to get IWebInspectorPrivate
     4
     5        Fixes <http://webkit.org/b/30215> Make IWebInspectorPrivate be
     6        accessed in a more standard way
     7
     8        Reviewed by John Sullivan and Tim Hatcher.
     9
     10        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
     11        (LayoutTestController::evaluateInWebInspector): Get the IWebInspector
     12        by calling IWebViewPrivate::inspector, then use QueryInterface to get
     13        to the IWebInspectorPrivate interface.
     14
    1152009-10-07  Adam Roben  <aroben@apple.com>
    216
  • trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp

    r49299 r49305  
    903903        return;
    904904
    905     COMPtr<IWebInspectorPrivate> inspector;
    906     if (SUCCEEDED(webView->inspectorPrivate(&inspector)))
    907         inspector->evaluateInFrontend(callId, bstrT(script).GetBSTR());
    908 }
     905    COMPtr<IWebInspector> inspector;
     906    if (FAILED(webView->inspector(&inspector)))
     907        return;
     908
     909    COMPtr<IWebInspectorPrivate> inspectorPrivate(Query, inspector);
     910    if (!inspectorPrivate)
     911        return;
     912
     913    inspectorPrivate->evaluateInFrontend(callId, bstrT(script).GetBSTR());
     914}
Note: See TracChangeset for help on using the changeset viewer.