Changeset 114499 in webkit


Ignore:
Timestamp:
Apr 18, 2012 5:26:33 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-18
Reviewed by Pavel Feldman.

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

Source/WebKit/win:

  • 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:

  • WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:

(WTR::LayoutTestController::showWebInspector):
(WTR::LayoutTestController::closeWebInspector):
(WTR::LayoutTestController::evaluateInWebInspector):
(WTR::LayoutTestController::setJavaScriptProfilingEnabled):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::invoke):

Location:
trunk
Files:
10 edited

Legend:

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

    r113877 r114499  
     12012-04-18  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-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>
    227
  • trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp

    r113877 r114499  
    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

    r113877 r114499  
    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

    r113877 r114499  
    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

    r113877 r114499  
    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

    r113877 r114499  
    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

    r113877 r114499  
    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

    r114490 r114499  
     12012-04-18  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/LayoutTestController.cpp:
     12        (WTR::LayoutTestController::showWebInspector):
     13        (WTR::LayoutTestController::closeWebInspector):
     14        (WTR::LayoutTestController::evaluateInWebInspector):
     15        (WTR::LayoutTestController::setJavaScriptProfilingEnabled):
     16        * WebKitTestRunner/TestInvocation.cpp:
     17        (WTR::TestInvocation::invoke):
     18
    1192012-04-18  Mario Sanchez Prada  <msanchez@igalia.com>
    220
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp

    r113877 r114499  
    461461void LayoutTestController::showWebInspector()
    462462{
     463#if ENABLE(INSPECTOR)
    463464    WKBundleInspectorShow(WKBundlePageGetInspector(InjectedBundle::shared().page()->page()));
     465#endif // ENABLE(INSPECTOR)
    464466}
    465467
    466468void LayoutTestController::closeWebInspector()
    467469{
     470#if ENABLE(INSPECTOR)
    468471    WKBundleInspectorClose(WKBundlePageGetInspector(InjectedBundle::shared().page()->page()));
     472#endif // ENABLE(INSPECTOR)
    469473}
    470474
    471475void LayoutTestController::evaluateInWebInspector(long callID, JSStringRef script)
    472476{
     477#if ENABLE(INSPECTOR)
    473478    WKRetainPtr<WKStringRef> scriptWK = toWK(script);
    474479    WKBundleInspectorEvaluateScriptForTest(WKBundlePageGetInspector(InjectedBundle::shared().page()->page()), callID, scriptWK.get());
     480#endif // ENABLE(INSPECTOR)
    475481}
    476482
    477483void LayoutTestController::setJavaScriptProfilingEnabled(bool enabled)
    478484{
     485#if ENABLE(INSPECTOR)
    479486    WKBundleInspectorSetJavaScriptProfilingEnabled(WKBundlePageGetInspector(InjectedBundle::shared().page()->page()), enabled);
     487#endif // ENABLE(INSPECTOR)
    480488}
    481489
  • trunk/Tools/WebKitTestRunner/TestInvocation.cpp

    r113877 r114499  
    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.