Changeset 113836 in webkit


Ignore:
Timestamp:
Apr 11, 2012 1:49:18 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Disabling Inspector causes build failure on Windows
https://bugs.webkit.org/show_bug.cgi?id=83557

Patch by Vivek Galatage <vivekgalatage@gmail.com> on 2012-04-11
Reviewed by Pavel Feldman.

Source/WebKit/win:

The calls to inspector APIs are not put under ENABLE(INSPECTOR) guard.
This change brings all such API calls under the guard.

  • WebCoreSupport/WebInspectorClient.cpp:
  • WebInspector.cpp:
  • WebNodeHighlight.cpp:

(WebNodeHighlight::WebNodeHighlight):
(WebNodeHighlight::update):

  • WebNodeHighlight.h:

(WebNodeHighlight):

  • WebView.cpp:

(WebView::WebView):
(WebView::close):
(WebView::initWithFrame):
(WebView::inspector):

  • WebView.h:

(WebView):

Tools:

The calls to inspector APIs are not put under ENABLE(INSPECTOR) guard.
This change brings all such API calls under the guard.

  • WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
  • WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:

(WTR):

  • WebKitTestRunner/InjectedBundle/LayoutTestController.h:

(LayoutTestController):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::invoke):

Location:
trunk
Files:
12 edited

Legend:

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

    r112720 r113836  
     12012-04-11  Vivek Galatage  <vivekgalatage@gmail.com>
     2
     3        Web Inspector: Disabling Inspector causes build failure on Windows
     4        https://bugs.webkit.org/show_bug.cgi?id=83557
     5
     6        Reviewed by Pavel Feldman.
     7
     8        The calls to inspector APIs are not put under ENABLE(INSPECTOR) guard.
     9        This change brings all such API calls under the guard.
     10       
     11        * WebCoreSupport/WebInspectorClient.cpp:
     12        * WebInspector.cpp:
     13        * WebNodeHighlight.cpp:
     14        (WebNodeHighlight::WebNodeHighlight):
     15        (WebNodeHighlight::update):
     16        * WebNodeHighlight.h:
     17        (WebNodeHighlight):
     18        * WebView.cpp:
     19        (WebView::WebView):
     20        (WebView::close):
     21        (WebView::initWithFrame):
     22        (WebView::inspector):
     23        * WebView.h:
     24        (WebView):
     25
    1262012-03-30  Mark Pilgrim  <pilgrim@chromium.org>
    227
  • trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp

    r103314 r113836  
    3030#include "WebInspectorClient.h"
    3131
     32#if ENABLE(INSPECTOR)
     33
    3234#include "WebInspectorDelegate.h"
    3335#include "WebKit.h"
     
    547549    return ::RegisterClassEx(&wcex);
    548550}
     551
     552#endif // ENABLE(INSPECTOR)
  • trunk/Source/WebKit/win/WebInspector.cpp

    r100904 r113836  
    3030#include "WebInspector.h"
    3131
     32#if ENABLE(INSPECTOR)
     33
    3234#include "WebInspectorClient.h"
    3335#include "WebKitDLL.h"
     
    277279    return S_OK;
    278280}
     281
     282#endif // ENABLE(INSPECTOR)
  • trunk/Source/WebKit/win/WebNodeHighlight.cpp

    r105667 r113836  
    4848
    4949WebNodeHighlight::WebNodeHighlight(WebView* webView)
    50     : m_inspectedWebView(webView)
    51     , m_overlay(0)
     50    :
     51#if ENABLE(INSPECTOR)   
     52      m_inspectedWebView(webView),
     53#endif // ENABLE(INSPECTOR)
     54      m_overlay(0)
    5255    , m_observedWindow(0)
    5356    , m_showsWhileWebViewIsVisible(false)
    5457{
     58#if ENABLE(INSPECTOR)
    5559    m_inspectedWebView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&m_inspectedWebViewWindow));
     60#endif // ENABLE(INSPECTOR)
    5661}
    5762
     
    159164
    160165    GraphicsContext context(hdc);
    161 
     166#if ENABLE(INSPECTOR)
    162167    m_inspectedWebView->page()->inspectorController()->drawHighlight(context);
     168#endif // ENABLE(INSPECTOR)
    163169
    164170    BLENDFUNCTION bf;
  • trunk/Source/WebKit/win/WebNodeHighlight.h

    r82294 r113836  
    6060    void onRootWindowPosChanged(WINDOWPOS*);
    6161
     62#if ENABLE(INSPECTOR)
    6263    WebView* m_inspectedWebView;
     64#endif // ENABLE(INSPECTOR)
    6365    HWND m_inspectedWebViewWindow;
    6466    HWND m_overlay;
  • trunk/Source/WebKit/win/WebView.cpp

    r112720 r113836  
    338338    , m_mainFrame(0)
    339339    , m_page(0)
     340#if ENABLE(INSPECTOR)
    340341    , m_inspectorClient(0)
     342#endif // ENABLE(INSPECTOR)
    341343    , m_hasCustomDropTarget(false)
    342344    , m_useBackForwardList(true)
     
    711713    setFormDelegate(0);
    712714
     715#if ENABLE(INSPECTOR)
    713716    m_inspectorClient = 0;
    714717    if (m_webInspector)
    715718        m_webInspector->webViewClosed();
     719#endif // ENABLE(INSPECTOR)
    716720
    717721    delete m_page;
     
    26592663        Settings::setShouldUseHighResolutionTimers(useHighResolutionTimer);
    26602664
     2665#if ENABLE(INSPECTOR)
    26612666    m_inspectorClient = new WebInspectorClient(this);
     2667#endif // ENABLE(INSPECTOR)
    26622668
    26632669    Page::PageClients pageClients;
     
    26662672    pageClients.editorClient = new WebEditorClient(this);
    26672673    pageClients.dragClient = new WebDragClient(this);
     2674#if ENABLE(INSPECTOR)
    26682675    pageClients.inspectorClient = m_inspectorClient;
     2676#endif // ENABLE(INSPECTOR)
     2677
    26692678    m_page = new Page(pageClients);
    26702679    provideGeolocationTo(m_page, new WebGeolocationClient(this));
     
    57725781HRESULT STDMETHODCALLTYPE WebView::inspector(IWebInspector** inspector)
    57735782{
     5783#if ENABLE(INSPECTOR)
    57745784    if (!m_webInspector)
    57755785        m_webInspector.adoptRef(WebInspector::createInstance(this, m_inspectorClient));
    57765786
    57775787    return m_webInspector.copyRefTo(inspector);
    5778 }
     5788#else // !ENABLE(INSPECTOR)
     5789    return S_OK;
     5790#endif // ENABLE(INSPECTOR)
     5791}
     5792
    57795793
    57805794HRESULT STDMETHODCALLTYPE WebView::windowAncestryDidChange()
  • trunk/Source/WebKit/win/WebView.h

    r107603 r113836  
    705705    virtual HRESULT STDMETHODCALLTYPE loadBackForwardListFromOtherView(
    706706        /* [in] */ IWebView *otherView);
    707 
     707       
    708708    virtual HRESULT STDMETHODCALLTYPE inspector(
    709709        /* [retval][out] */ IWebInspector**);
     
    10481048    WebFrame* m_mainFrame;
    10491049    WebCore::Page* m_page;
     1050#if ENABLE(INSPECTOR)
    10501051    WebInspectorClient* m_inspectorClient;
     1052#endif // ENABLE(INSPECTOR)
    10511053   
    10521054    RefPtr<RefCountedHBITMAP> m_backingStoreBitmap;
     
    10651067    COMPtr<IWebHistoryDelegate> m_historyDelegate;
    10661068    COMPtr<WebPreferences> m_preferences;
     1069#if ENABLE(INSPECTOR)
    10671070    COMPtr<WebInspector> m_webInspector;
     1071#endif // ENABLE(INSPECTOR)
    10681072    COMPtr<IWebGeolocationProvider> m_geolocationProvider;
    10691073
  • trunk/Tools/ChangeLog

    r113829 r113836  
     12012-04-11  Vivek Galatage  <vivekgalatage@gmail.com>
     2
     3        Web Inspector: Disabling Inspector causes build failure on Windows
     4        https://bugs.webkit.org/show_bug.cgi?id=83557
     5
     6        Reviewed by Pavel Feldman.
     7
     8        The calls to inspector APIs are not put under ENABLE(INSPECTOR) guard.
     9        This change brings all such API calls under the guard.
     10
     11        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
     12        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
     13        (WTR):
     14        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
     15        (LayoutTestController):
     16        * WebKitTestRunner/TestInvocation.cpp:
     17        (WTR::TestInvocation::invoke):
     18
    1192012-04-10  Kent Tamura  <tkent@chromium.org>
    220
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl

    r113235 r113836  
    115115        [PassContext] void evaluateScriptInIsolatedWorld(in unsigned long worldID, in DOMString script);
    116116
     117#if ENABLE_INSPECTOR
    117118        // For Web Inspector tests
    118119        void showWebInspector();
    119120        void closeWebInspector();
    120121        void evaluateInWebInspector(in long callID, in DOMString script);
     122#endif       
    121123
    122124        void setPOSIXLocale(in DOMString locale);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp

    r113235 r113836  
    459459}
    460460
     461#if ENABLE(INSPECTOR)
    461462void LayoutTestController::showWebInspector()
    462463{
    463464    WKBundleInspectorShow(WKBundlePageGetInspector(InjectedBundle::shared().page()->page()));
    464465}
    465 
     466#endif // ENABLE(INSPECTOR)
     467
     468#if ENABLE(INSPECTOR)
    466469void LayoutTestController::closeWebInspector()
    467470{
    468471    WKBundleInspectorClose(WKBundlePageGetInspector(InjectedBundle::shared().page()->page()));
    469472}
    470 
     473#endif // ENABLE(INSPECTOR)
     474
     475#if ENABLE(INSPECTOR)
    471476void LayoutTestController::evaluateInWebInspector(long callID, JSStringRef script)
    472477{
     
    474479    WKBundleInspectorEvaluateScriptForTest(WKBundlePageGetInspector(InjectedBundle::shared().page()->page()), callID, scriptWK.get());
    475480}
    476 
     481#endif // ENABLE(INSPECTOR)
     482
     483#if ENABLE(INSPECTOR)
    477484void LayoutTestController::setJavaScriptProfilingEnabled(bool enabled)
    478485{
    479486    WKBundleInspectorSetJavaScriptProfilingEnabled(WKBundlePageGetInspector(InjectedBundle::shared().page()->page()), enabled);
    480487}
     488#endif // ENABLE(INSPECTOR)
    481489
    482490typedef WTF::HashMap<unsigned, WKRetainPtr<WKBundleScriptWorldRef> > WorldMap;
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

    r113235 r113836  
    166166    static unsigned worldIDForWorld(WKBundleScriptWorldRef);
    167167
     168#if ENABLE(INSPECTOR)
    168169    void showWebInspector();
    169170    void closeWebInspector();
    170171    void evaluateInWebInspector(long callId, JSStringRef script);
    171172    void setJavaScriptProfilingEnabled(bool);
     173#endif // ENABLE(INSPECTOR)
    172174
    173175    void setPOSIXLocale(JSStringRef);
  • trunk/Tools/WebKitTestRunner/TestInvocation.cpp

    r111097 r113836  
    164164    }
    165165
     166#if ENABLE(INSPECTOR)
    166167    if (shouldOpenWebInspector(m_pathOrURL.c_str()))
    167168        WKInspectorShow(WKPageGetInspector(TestController::shared().mainWebView()->page()));
     169#endif // ENABLE(INSPECTOR)       
    168170
    169171    WKPageLoadURL(TestController::shared().mainWebView()->page(), m_url.get());
     
    175177        dump("FAIL\n");
    176178
     179#if ENABLE(INSPECTOR)
    177180    WKInspectorClose(WKPageGetInspector(TestController::shared().mainWebView()->page()));
     181#endif // ENABLE(INSPECTOR)
    178182}
    179183
Note: See TracChangeset for help on using the changeset viewer.