Changeset 49989 in webkit


Ignore:
Timestamp:
Oct 23, 2009 12:38:21 PM (14 years ago)
Author:
dumi@chromium.org
Message:

Adding a class that allows us to enable/disable features at
runtime. Adding a flag to enable database support.

Patch by Dumitru Daniliuc <dumi@chromium.org> on 2009-10-22
Reviewed by Dmitry Titov.

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

  • WebCore.gypi:
  • bindings/v8/RuntimeEnabledFeatures.cpp: Added.
  • bindings/v8/RuntimeEnabledFeatures.h: Added.

(WebCore::RuntimeEnabledFeatures::setDatabaseEnabled):
(WebCore::RuntimeEnabledFeatures::databaseEnabled):
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):

  • bindings/v8/custom/V8CustomBinding.h:
  • bindings/v8/custom/V8DOMWindowCustom.cpp:

(WebCore::ACCESSOR_RUNTIME_ENABLER):

  • page/DOMWindow.idl:
Location:
trunk/WebCore
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r49988 r49989  
     12009-10-22  Dumitru Daniliuc  <dumi@chromium.org>
     2
     3        Reviewed by Dmitry Titov.
     4
     5        Adding a class that allows us to enable/disable features at
     6        runtime. Adding a flag to enable database support.
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=30653
     9
     10        * WebCore.gypi:
     11        * bindings/v8/RuntimeEnabledFeatures.cpp: Added.
     12        * bindings/v8/RuntimeEnabledFeatures.h: Added.
     13        (WebCore::RuntimeEnabledFeatures::setDatabaseEnabled):
     14        (WebCore::RuntimeEnabledFeatures::databaseEnabled):
     15        (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
     16        * bindings/v8/custom/V8CustomBinding.h:
     17        * bindings/v8/custom/V8DOMWindowCustom.cpp:
     18        (WebCore::ACCESSOR_RUNTIME_ENABLER):
     19        * page/DOMWindow.idl:
     20
    1212009-10-23  Keishi Hattori  <casey.hattori@gmail.com>
    222
  • trunk/WebCore/WebCore.gypi

    r49923 r49989  
    743743            'bindings/v8/NPV8Object.h',
    744744            'bindings/v8/OwnHandle.h',
     745            'bindings/v8/RuntimeEnabledFeatures.cpp',
     746            'bindings/v8/RuntimeEnabledFeatures.h',
    745747            'bindings/v8/ScheduledAction.cpp',
    746748            'bindings/v8/ScheduledAction.h',
  • trunk/WebCore/bindings/v8/custom/V8CustomBinding.h

    r49894 r49989  
    570570        DECLARE_INDEXED_PROPERTY_GETTER(ClientRectList);
    571571        DECLARE_INDEXED_PROPERTY_GETTER(FileList);
    572  
     572
    573573#if ENABLE(DATAGRID)
    574574        DECLARE_PROPERTY_ACCESSOR(HTMLDataGridElementDataSource);
    575575        DECLARE_INDEXED_PROPERTY_GETTER(DataGridColumnList);
    576576        DECLARE_NAMED_PROPERTY_GETTER(DataGridColumnList);
    577 #endif     
     577#endif
     578
     579#if ENABLE(DATABASE)
     580        DECLARE_ACCESSOR_RUNTIME_ENABLER(DOMWindowOpenDatabase);
     581#endif
    578582
    579583#if ENABLE(DOM_STORAGE)
  • trunk/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp

    r49894 r49989  
    5050#include "Page.h"
    5151#include "PlatformScreen.h"
     52#include "RuntimeEnabledFeatures.h"
    5253#include "ScheduledAction.h"
    5354#include "ScriptSourceCode.h"
     
    279280{
    280281    return WebSocket::isAvailable();
     282}
     283#endif
     284
     285#if ENABLE(DATABASE)
     286ACCESSOR_RUNTIME_ENABLER(DOMWindowOpenDatabase)
     287{
     288    return WebCore::RuntimeEnabledFeatures::databaseEnabled();
    281289}
    282290#endif
  • trunk/WebCore/page/DOMWindow.idl

    r49894 r49989  
    161161#endif   
    162162#if defined(ENABLE_DATABASE) && ENABLE_DATABASE
    163         Database openDatabase(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize)
     163        [EnabledAtRuntime] Database openDatabase(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize)
    164164            raises(DOMException);
    165165#endif
Note: See TracChangeset for help on using the changeset viewer.