Changeset 57069 in webkit


Ignore:
Timestamp:
Apr 5, 2010 5:37:52 AM (14 years ago)
Author:
pfeldman@chromium.org
Message:

2010-04-05 Pavel Feldman <pfeldman@chromium.org>

Reviewed by Yury Semikhatsky.

Web Inspector: [REGRESSION] platform detection in Chromium
has regressed to unknown.

https://bugs.webkit.org/show_bug.cgi?id=37081

  • bindings/js/JSInspectorFrontendHostCustom.cpp: (WebCore::JSInspectorFrontendHost::platform): (WebCore::JSInspectorFrontendHost::port):
  • bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::V8InspectorFrontendHost::platform): (WebCore::V8InspectorFrontendHost::port):
  • inspector/InspectorFrontendHost.cpp:
  • inspector/InspectorFrontendHost.h:
  • inspector/InspectorFrontendHost.idl:
Location:
trunk/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r57068 r57069  
     12010-04-05  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: [REGRESSION] platform detection in Chromium
     6        has regressed to unknown.
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=37081
     9
     10        * bindings/js/JSInspectorFrontendHostCustom.cpp:
     11        (WebCore::JSInspectorFrontendHost::platform):
     12        (WebCore::JSInspectorFrontendHost::port):
     13        * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
     14        (WebCore::V8InspectorFrontendHost::platform):
     15        (WebCore::V8InspectorFrontendHost::port):
     16        * inspector/InspectorFrontendHost.cpp:
     17        * inspector/InspectorFrontendHost.h:
     18        * inspector/InspectorFrontendHost.idl:
     19
    1202010-04-05  Andrey Kosyakov  <caseq@chromium.org>
    221
  • trunk/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp

    r53941 r57069  
    5050namespace WebCore {
    5151
     52JSValue JSInspectorFrontendHost::platform(ExecState* execState, const ArgList&)
     53{
     54#if PLATFORM(MAC)
     55    DEFINE_STATIC_LOCAL(const String, platform, ("mac"));
     56#elif OS(WINDOWS)
     57    DEFINE_STATIC_LOCAL(const String, platform, ("windows"));
     58#elif OS(LINUX)
     59    DEFINE_STATIC_LOCAL(const String, platform, ("linux"));
     60#else
     61    DEFINE_STATIC_LOCAL(const String, platform, ("unknown"));
     62#endif
     63    return jsString(execState, platform);
     64}
     65
     66JSValue JSInspectorFrontendHost::port(ExecState* execState, const ArgList&)
     67{
     68#if PLATFORM(QT)
     69    DEFINE_STATIC_LOCAL(const String, port, ("qt"));
     70#elif PLATFORM(GTK)
     71    DEFINE_STATIC_LOCAL(const String, port, ("gtk"));
     72#elif PLATFORM(WX)
     73    DEFINE_STATIC_LOCAL(const String, port, ("wx"));
     74#else
     75    DEFINE_STATIC_LOCAL(const String, port, ("unknown"));
     76#endif
     77    return jsString(execState, port);
     78}
     79
    5280JSValue JSInspectorFrontendHost::showContextMenu(ExecState* execState, const ArgList& args)
    5381{
  • trunk/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp

    r56999 r57069  
    4141namespace WebCore {
    4242
     43v8::Handle<v8::Value> V8InspectorFrontendHost::platform(const v8::Arguments&)
     44{
     45#if defined(OS_MACOSX)
     46    return v8String("mac");
     47#elif defined(OS_LINUX)
     48    return v8String("linux");
     49#elif defined(OS_WIN)
     50    return v8String("windows");
     51#else
     52    return v8String("unknown");
     53#endif
     54}
     55
     56v8::Handle<v8::Value> V8InspectorFrontendHost::port(const v8::Arguments&)
     57{
     58    return v8::Undefined();
     59}
     60
    4361v8::Handle<v8::Value> V8InspectorFrontendHost::showContextMenuCallback(const v8::Arguments& args)
    4462{
  • trunk/WebCore/inspector/InspectorFrontendHost.cpp

    r56999 r57069  
    202202}
    203203
    204 const String& InspectorFrontendHost::platform() const
    205 {
    206 #if PLATFORM(MAC)
    207     DEFINE_STATIC_LOCAL(const String, platform, ("mac"));
    208 #elif OS(WINDOWS)
    209     DEFINE_STATIC_LOCAL(const String, platform, ("windows"));
    210 #elif OS(LINUX)
    211     DEFINE_STATIC_LOCAL(const String, platform, ("linux"));
    212 #else
    213     DEFINE_STATIC_LOCAL(const String, platform, ("unknown"));
    214 #endif
    215     return platform;
    216 }
    217 
    218 const String& InspectorFrontendHost::port() const
    219 {
    220 #if PLATFORM(QT)
    221     DEFINE_STATIC_LOCAL(const String, port, ("qt"));
    222 #elif PLATFORM(GTK)
    223     DEFINE_STATIC_LOCAL(const String, port, ("gtk"));
    224 #elif PLATFORM(WX)
    225     DEFINE_STATIC_LOCAL(const String, port, ("wx"));
    226 #else
    227     DEFINE_STATIC_LOCAL(const String, port, ("unknown"));
    228 #endif
    229 
    230     return port;
    231 }
    232 
    233204void InspectorFrontendHost::copyText(const String& text)
    234205{
  • trunk/WebCore/inspector/InspectorFrontendHost.h

    r56999 r57069  
    7272    String localizedStringsURL();
    7373    String hiddenPanels();
    74     const String& platform() const;
    75     const String& port() const;
    7674
    7775    void copyText(const String& text);
  • trunk/WebCore/inspector/InspectorFrontendHost.idl

    r56051 r57069  
    4646        DOMString localizedStringsURL();
    4747        DOMString hiddenPanels();
    48         DOMString platform();
    49         DOMString port();
    5048
    5149        void copyText(in DOMString text);
    5250
     51        [Custom] DOMString platform();
     52        [Custom] DOMString port();
    5353        [Custom] void showContextMenu(in MouseEvent event, in DOMObject items);
    5454    };
Note: See TracChangeset for help on using the changeset viewer.