Changeset 136210 in webkit


Ignore:
Timestamp:
Nov 30, 2012 12:48:28 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
https://bugs.webkit.org/show_bug.cgi?id=101192

Patch by Mihai Maerean <Mihai Maerean> on 2012-11-30
Reviewed by Hajime Morita.

Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.

Tests: No new tests because there is no functional change.

Source/WebCore:

  • WebCore.exp.in:
  • WebCore.vcproj/copyForwardingHeaders.cmd:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/generic/RuntimeEnabledFeatures.cpp:

(WebCore):

  • bindings/generic/RuntimeEnabledFeatures.h:

(RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled):
(WebCore::RuntimeEnabledFeatures::cssRegionsEnabled):

  • dom/Document.cpp:

(WebCore::Document::cssRegionsEnabled):

  • page/Settings.cpp:

(WebCore::Settings::Settings):

  • page/Settings.h:

(Settings):

Source/WebKit/chromium:

  • public/WebRuntimeFeatures.h:

(WebRuntimeFeatures):

  • public/WebSettings.h: moved setExperimentalCSSRegionsEnabled to the bottom of the interface and made it a

no-op. After this patch lands and Chromium's webkit_rev is increased, we'll remove any callers in Chromium. Once
the Chromium callers are gone and WebKit's chromium_rev is increased, we'll remove the deprecated API.

  • src/WebRuntimeFeatures.cpp:

(WebKit::WebRuntimeFeatures::enableCSSRegions):
(WebKit):
(WebKit::WebRuntimeFeatures::isCSSRegionsEnabled):

  • src/WebSettingsImpl.cpp:
  • src/WebSettingsImpl.h:

(WebSettingsImpl):

Source/WebKit/efl:

  • WebCoreSupport/DumpRenderTreeSupportEfl.cpp:

(DumpRenderTreeSupportEfl::setCSSRegionsEnabled):

  • ewk/ewk_view.cpp:

(_ewk_view_priv_new):

Source/WebKit/gtk:

  • WebCoreSupport/DumpRenderTreeSupportGtk.cpp:

(DumpRenderTreeSupportGtk::setCSSRegionsEnabled):

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit/qt:

  • Api/qwebsettings.cpp:

(QWebSettingsPrivate::apply):

Source/WebKit/win:

  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Source/WebKit2:

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
(WebKit::InjectedBundle::setCSSRegionsEnabled):
(WebKit):

  • WebProcess/InjectedBundle/InjectedBundle.h:

(InjectedBundle):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

  • DumpRenderTree/chromium/WebPreferences.cpp:

(WebPreferences::applyTo):

Location:
trunk
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r136207 r136210  
     12012-11-30  Mihai Maerean  <mmaerean@adobe.com>
     2
     3        [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
     4        https://bugs.webkit.org/show_bug.cgi?id=101192
     5
     6        Reviewed by Hajime Morita.
     7
     8        Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
     9
     10        Tests: No new tests because there is no functional change.
     11
     12        * WebCore.exp.in:
     13        * WebCore.vcproj/copyForwardingHeaders.cmd:
     14        * WebCore.xcodeproj/project.pbxproj:
     15        * bindings/generic/RuntimeEnabledFeatures.cpp:
     16        (WebCore):
     17        * bindings/generic/RuntimeEnabledFeatures.h:
     18        (RuntimeEnabledFeatures):
     19        (WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled):
     20        (WebCore::RuntimeEnabledFeatures::cssRegionsEnabled):
     21        * dom/Document.cpp:
     22        (WebCore::Document::cssRegionsEnabled):
     23        * page/Settings.cpp:
     24        (WebCore::Settings::Settings):
     25        * page/Settings.h:
     26        (Settings):
     27
    1282012-11-29  Martin Robinson  <mrobinson@igalia.com>
    229
  • trunk/Source/WebCore/WebCore.exp.in

    r136197 r136210  
    26962696_wkCaptionAppearanceGetSettingsChangedNotification
    26972697#endif
     2698
     2699#if ENABLE(CSS_REGIONS)
     2700__ZN7WebCore22RuntimeEnabledFeatures19isCSSRegionsEnabledE
     2701#endif
  • trunk/Source/WebCore/WebCore.vcproj/copyForwardingHeaders.cmd

    r126735 r136210  
    6464xcopy /y /d "%ProjectDir%..\platform\cairo\cairo\src\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
    6565xcopy /y /d "%ProjectDir%..\bindings\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
     66xcopy /y /d "%ProjectDir%..\bindings\generic\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
    6667xcopy /y /d "%ProjectDir%..\bindings\js\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
    6768xcopy /y /d "%ProjectDir%..\page\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r136205 r136210  
    31523152                8C0E334F138A92C7008DA94F /* LevelDBWriteBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C0E334B138A92C7008DA94F /* LevelDBWriteBatch.h */; };
    31533153                8C6EA61911EF7E0400FD8EE3 /* RuntimeEnabledFeatures.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C6EA61711EF7E0400FD8EE3 /* RuntimeEnabledFeatures.cpp */; };
    3154                 8C6EA61A11EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C6EA61811EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h */; };
     3154                8C6EA61A11EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C6EA61811EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h */; settings = {ATTRIBUTES = (Private, ); }; };
    31553155                8CADF2A9135C7B36009EF43F /* LevelDBComparator.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CADF2A3135C7B36009EF43F /* LevelDBComparator.h */; };
    31563156                8CADF2AA135C7B36009EF43F /* LevelDBDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CADF2A4135C7B36009EF43F /* LevelDBDatabase.cpp */; };
  • trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp

    r135694 r136210  
    5656bool RuntimeEnabledFeatures::isSpeechInputEnabled = true;
    5757bool RuntimeEnabledFeatures::isCSSExclusionsEnabled = false;
     58bool RuntimeEnabledFeatures::isCSSRegionsEnabled = false;
    5859bool RuntimeEnabledFeatures::isLangAttributeAwareFormControlUIEnabled = false;
    5960
  • trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h

    r134557 r136210  
    7272#endif
    7373
     74#if ENABLE(CSS_REGIONS)
     75    static void setCSSRegionsEnabled(bool isEnabled) { isCSSRegionsEnabled = isEnabled; }
     76    static bool cssRegionsEnabled() { return isCSSRegionsEnabled; }
     77#else
     78    static void setCSSRegionsEnabled(bool) { }
     79    static bool cssRegionsEnabled() { return false; }
     80#endif
     81
    7482#if ENABLE(FULLSCREEN_API)
    7583    // Mozilla version
     
    275283    static bool isSpeechInputEnabled;
    276284    static bool isCSSExclusionsEnabled;
     285    static bool isCSSRegionsEnabled;
    277286    WEBCORE_TESTING static bool isLangAttributeAwareFormControlUIEnabled;
    278287#if ENABLE(SCRIPTED_SPEECH)
  • trunk/Source/WebCore/dom/Document.cpp

    r135893 r136210  
    11251125bool Document::cssRegionsEnabled() const
    11261126{
    1127     return settings() && settings()->cssRegionsEnabled();
     1127    return RuntimeEnabledFeatures::cssRegionsEnabled();
    11281128}
    11291129
  • trunk/Source/WebCore/page/Settings.cpp

    r135189 r136210  
    165165    , m_cssStickyPositionEnabled(true)
    166166#endif
    167 #if ENABLE(CSS_REGIONS)
    168     , m_cssRegionsEnabled(false)
    169 #endif
    170167#if ENABLE(CSS_VARIABLES)
    171168    , m_cssVariablesEnabled(false)
  • trunk/Source/WebCore/page/Settings.h

    r135189 r136210  
    225225#endif
    226226
    227 #if ENABLE(CSS_REGIONS)
    228         void setCSSRegionsEnabled(bool enabled) { m_cssRegionsEnabled = enabled; }
    229         bool cssRegionsEnabled() const { return m_cssRegionsEnabled; }
    230 #else
    231         void setCSSRegionsEnabled(bool) { }
    232         bool cssRegionsEnabled() const { return false; }
    233 #endif
    234 
    235227#if ENABLE(CSS_VARIABLES)
    236228        void setCSSVariablesEnabled(bool enabled) { m_cssVariablesEnabled = enabled; }
     
    350342#if ENABLE(CSS_STICKY_POSITION)
    351343        bool m_cssStickyPositionEnabled : 1;
    352 #endif       
    353 #if ENABLE(CSS_REGIONS)
    354         bool m_cssRegionsEnabled : 1;
    355344#endif
    356345#if ENABLE(CSS_VARIABLES)
  • trunk/Source/WebKit/chromium/ChangeLog

    r136204 r136210  
     12012-11-30  Mihai Maerean  <mmaerean@adobe.com>
     2
     3        [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
     4        https://bugs.webkit.org/show_bug.cgi?id=101192
     5
     6        Reviewed by Hajime Morita.
     7
     8        Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
     9
     10        Tests: No new tests because there is no functional change.
     11
     12        * public/WebRuntimeFeatures.h:
     13        (WebRuntimeFeatures):
     14        * public/WebSettings.h: moved setExperimentalCSSRegionsEnabled to the bottom of the interface and made it a
     15        no-op.  After this patch lands and Chromium's webkit_rev is increased, we'll remove any callers in Chromium. Once
     16        the Chromium callers are gone and WebKit's chromium_rev is increased, we'll remove the deprecated API.
     17        * src/WebRuntimeFeatures.cpp:
     18        (WebKit::WebRuntimeFeatures::enableCSSRegions):
     19        (WebKit):
     20        (WebKit::WebRuntimeFeatures::isCSSRegionsEnabled):
     21        * src/WebSettingsImpl.cpp:
     22        * src/WebSettingsImpl.h:
     23        (WebSettingsImpl):
     24
    1252012-11-29  Rafael Weinstein  <rafaelw@chromium.org>
    226
  • trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h

    r135170 r136210  
    158158    WEBKIT_EXPORT static bool isRequestAutocompleteEnabled();
    159159
     160    WEBKIT_EXPORT static void enableCSSRegions(bool);
     161    WEBKIT_EXPORT static bool isCSSRegionsEnabled();
     162
    160163private:
    161164    WebRuntimeFeatures();
  • trunk/Source/WebKit/chromium/public/WebSettings.h

    r135789 r136210  
    102102    virtual void setExperimentalCSSGridLayoutEnabled(bool) = 0;
    103103    virtual void setCSSStickyPositionEnabled(bool) = 0;
    104     virtual void setExperimentalCSSRegionsEnabled(bool) = 0;
    105104    virtual void setExperimentalCSSVariablesEnabled(bool) = 0;
    106105    virtual void setExperimentalWebGLEnabled(bool) = 0;
     
    175174    void setApplyDefaultDeviceScaleFactorInCompositor(bool enabled) { setApplyDeviceScaleFactorInCompositor(enabled); }
    176175
     176    // DEPRECATED
     177    void setExperimentalCSSRegionsEnabled(bool) { }
     178
    177179protected:
    178180    ~WebSettings() { }
  • trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp

    r135170 r136210  
    622622}
    623623
     624void WebRuntimeFeatures::enableCSSRegions(bool enable)
     625{
     626    RuntimeEnabledFeatures::setCSSRegionsEnabled(enable);
     627}
     628
     629bool WebRuntimeFeatures::isCSSRegionsEnabled()
     630{
     631    return RuntimeEnabledFeatures::cssRegionsEnabled();
     632}
     633
    624634void WebRuntimeFeatures::enableRequestAutocomplete(bool enable)
    625635{
  • trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp

    r135911 r136210  
    372372}
    373373
    374 void WebSettingsImpl::setExperimentalCSSRegionsEnabled(bool enabled)
    375 {
    376     m_settings->setCSSRegionsEnabled(enabled);
    377 }
    378 
    379374void WebSettingsImpl::setExperimentalCSSGridLayoutEnabled(bool enabled)
    380375{
  • trunk/Source/WebKit/chromium/src/WebSettingsImpl.h

    r135789 r136210  
    9494    virtual void setExperimentalCSSGridLayoutEnabled(bool);
    9595    virtual void setCSSStickyPositionEnabled(bool);
    96     virtual void setExperimentalCSSRegionsEnabled(bool);
    9796    virtual void setExperimentalCSSVariablesEnabled(bool);
    9897    virtual void setExperimentalWebGLEnabled(bool);
  • trunk/Source/WebKit/efl/ChangeLog

    r136197 r136210  
     12012-11-30  Mihai Maerean  <mmaerean@adobe.com>
     2
     3        [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
     4        https://bugs.webkit.org/show_bug.cgi?id=101192
     5
     6        Reviewed by Hajime Morita.
     7
     8        Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
     9
     10        Tests: No new tests because there is no functional change.
     11
     12        * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
     13        (DumpRenderTreeSupportEfl::setCSSRegionsEnabled):
     14        * ewk/ewk_view.cpp:
     15        (_ewk_view_priv_new):
     16
    1172012-11-29  Alexey Proskuryakov  <ap@apple.com>
    218
  • trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp

    r134059 r136210  
    5454#include <RenderTreeAsText.h>
    5555#include <ResourceLoadScheduler.h>
     56#include <RuntimeEnabledFeatures.h>
    5657#include <SchemeRegistry.h>
    5758#include <ScriptValue.h>
     
    368369    DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page);
    369370
    370     page->settings()->setCSSRegionsEnabled(enabled);
     371    WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled(enabled);
    371372}
    372373
  • trunk/Source/WebKit/efl/ewk/ewk_view.cpp

    r135662 r136210  
    5858#include "RenderThemeEfl.h"
    5959#include "ResourceHandle.h"
     60#include "RuntimeEnabledFeatures.h"
    6061#include "Settings.h"
    6162#include "TiledBackingStore.h"
     
    822823    priv->pageSettings->setStandardFontFamily("sans");
    823824    priv->pageSettings->setHyperlinkAuditingEnabled(false);
    824     priv->pageSettings->setCSSRegionsEnabled(true);
     825    WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled(true);
    825826    priv->pageSettings->setScriptEnabled(true);
    826827    priv->pageSettings->setPluginsEnabled(true);
  • trunk/Source/WebKit/gtk/ChangeLog

    r136197 r136210  
     12012-11-30  Mihai Maerean  <mmaerean@adobe.com>
     2
     3        [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
     4        https://bugs.webkit.org/show_bug.cgi?id=101192
     5
     6        Reviewed by Hajime Morita.
     7
     8        Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
     9
     10        Tests: No new tests because there is no functional change.
     11
     12        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
     13        (DumpRenderTreeSupportGtk::setCSSRegionsEnabled):
     14
    1152012-11-29  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp

    r131275 r136210  
    691691void DumpRenderTreeSupportGtk::setCSSRegionsEnabled(WebKitWebView* webView, bool enabled)
    692692{
    693     core(webView)->settings()->setCSSRegionsEnabled(enabled);
     693    RuntimeEnabledFeatures::setCSSRegionsEnabled(enabled);
    694694}
    695695
  • trunk/Source/WebKit/mac/ChangeLog

    r136204 r136210  
     12012-11-30  Mihai Maerean  <mmaerean@adobe.com>
     2
     3        [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
     4        https://bugs.webkit.org/show_bug.cgi?id=101192
     5
     6        Reviewed by Hajime Morita.
     7
     8        Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
     9
     10        Tests: No new tests because there is no functional change.
     11
     12        * WebView/WebView.mm:
     13        (-[WebView _preferencesChanged:]):
     14
    1152012-11-29  Rafael Weinstein  <rafaelw@chromium.org>
    216
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r136033 r136210  
    164164#import <WebCore/RunLoop.h>
    165165#import <WebCore/RuntimeApplicationChecks.h>
     166#import <WebCore/RuntimeEnabledFeatures.h>
    166167#import <WebCore/SchemeRegistry.h>
    167168#import <WebCore/ScriptController.h>
     
    15391540    settings->setCSSCustomFilterEnabled([preferences cssCustomFilterEnabled]);
    15401541#endif
    1541     settings->setCSSRegionsEnabled([preferences cssRegionsEnabled]);
     1542    RuntimeEnabledFeatures::setCSSRegionsEnabled([preferences cssRegionsEnabled]);
    15421543    settings->setCSSGridLayoutEnabled([preferences cssGridLayoutEnabled]);
    15431544#if ENABLE(FULLSCREEN_API)
  • trunk/Source/WebKit/qt/Api/qwebsettings.cpp

    r135515 r136210  
    4242#include "PageCache.h"
    4343#include "PluginDatabase.h"
     44#include "RuntimeEnabledFeatures.h"
    4445#include "Settings.h"
    4546#include <QDir>
     
    168169        value = attributes.value(QWebSettings::CSSRegionsEnabled,
    169170                                 global->attributes.value(QWebSettings::CSSRegionsEnabled));
    170         settings->setCSSRegionsEnabled(value);
     171        WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled(value);
    171172        value = attributes.value(QWebSettings::CSSGridLayoutEnabled,
    172173                                 global->attributes.value(QWebSettings::CSSGridLayoutEnabled));
  • trunk/Source/WebKit/qt/ChangeLog

    r136197 r136210  
     12012-11-30  Mihai Maerean  <mmaerean@adobe.com>
     2
     3        [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
     4        https://bugs.webkit.org/show_bug.cgi?id=101192
     5
     6        Reviewed by Hajime Morita.
     7
     8        Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
     9
     10        Tests: No new tests because there is no functional change.
     11
     12        * Api/qwebsettings.cpp:
     13        (QWebSettingsPrivate::apply):
     14
    1152012-11-29  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Source/WebKit/win/ChangeLog

    r136197 r136210  
     12012-11-30  Mihai Maerean  <mmaerean@adobe.com>
     2
     3        [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
     4        https://bugs.webkit.org/show_bug.cgi?id=101192
     5
     6        Reviewed by Hajime Morita.
     7
     8        Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
     9
     10        Tests: No new tests because there is no functional change.
     11
     12        * WebView.cpp:
     13        (WebView::notifyPreferencesChanged):
     14
    1152012-11-29  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Source/WebKit/win/WebView.cpp

    r135405 r136210  
    130130#include <WebCore/ResourceHandleClient.h>
    131131#include <WebCore/ResourceRequest.h>
     132#include <WebCore/RuntimeEnabledFeatures.h>
    132133#include <WebCore/SchemeRegistry.h>
    133134#include <WebCore/ScriptValue.h>
     
    46724673    if (FAILED(hr))
    46734674        return hr;
    4674     settings->setCSSRegionsEnabled(!!enabled);
     4675    RuntimeEnabledFeatures::setCSSRegionsEnabled(!!enabled);
    46754676
    46764677    hr = preferences->privateBrowsingEnabled(&enabled);
  • trunk/Source/WebKit2/ChangeLog

    r136208 r136210  
     12012-11-30  Mihai Maerean  <mmaerean@adobe.com>
     2
     3        [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
     4        https://bugs.webkit.org/show_bug.cgi?id=101192
     5
     6        Reviewed by Hajime Morita.
     7
     8        Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
     9
     10        Tests: No new tests because there is no functional change.
     11
     12        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     13        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
     14        (WebKit::InjectedBundle::setCSSRegionsEnabled):
     15        (WebKit):
     16        * WebProcess/InjectedBundle/InjectedBundle.h:
     17        (InjectedBundle):
     18        * WebProcess/WebPage/WebPage.cpp:
     19        (WebKit::WebPage::updatePreferences):
     20
    1212012-11-29  Tim Horton  <timothy_horton@apple.com>
    222
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r135508 r136210  
    7272#include <wtf/PassOwnArrayPtr.h>
    7373
    74 #if ENABLE(SHADOW_DOM)
     74#if ENABLE(SHADOW_DOM) || ENABLE(CSS_REGIONS)
    7575#include <WebCore/RuntimeEnabledFeatures.h>
    7676#endif
     
    183183    }
    184184
     185#if ENABLE(CSS_REGIONS)
     186    if (preference == "WebKitCSSRegionsEnabled")
     187        RuntimeEnabledFeatures::setCSSRegionsEnabled(enabled);
     188#endif
     189
    185190    // Map the names used in LayoutTests with the names used in WebCore::Settings and WebPreferencesStore.
    186191#define FOR_EACH_OVERRIDE_BOOL_PREFERENCE(macro) \
    187192    macro(WebKitAcceleratedCompositingEnabled, AcceleratedCompositingEnabled, acceleratedCompositingEnabled) \
    188193    macro(WebKitCSSCustomFilterEnabled, CSSCustomFilterEnabled, cssCustomFilterEnabled) \
    189     macro(WebKitCSSRegionsEnabled, CSSRegionsEnabled, cssRegionsEnabled) \
    190194    macro(WebKitCSSGridLayoutEnabled, CSSGridLayoutEnabled, cssGridLayoutEnabled) \
    191195    macro(WebKitJavaEnabled, JavaEnabled, javaEnabled) \
     
    647651}
    648652
     653void InjectedBundle::setCSSRegionsEnabled(bool enabled)
     654{
     655#if ENABLE(CSS_REGIONS)
     656    RuntimeEnabledFeatures::setCSSRegionsEnabled(enabled);
     657#else
     658    UNUSED_PARAM(enabled);
     659#endif
     660}
     661
    649662void InjectedBundle::dispatchPendingLoadRequests()
    650663{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r135508 r136210  
    181181    void setSerialLoadingEnabled(bool);
    182182    void setShadowDOMEnabled(bool);
     183    void setCSSRegionsEnabled(bool);
    183184    void dispatchPendingLoadRequests();
    184185
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r136193 r136210  
    115115#include <WebCore/ResourceResponse.h>
    116116#include <WebCore/RunLoop.h>
     117#include <WebCore/RuntimeEnabledFeatures.h>
    117118#include <WebCore/SchemeRegistry.h>
    118119#include <WebCore/ScriptValue.h>
     
    22592260    settings->setShowRepaintCounter(store.getBoolValueForKey(WebPreferencesKey::compositingRepaintCountersVisibleKey()));
    22602261    settings->setCSSCustomFilterEnabled(store.getBoolValueForKey(WebPreferencesKey::cssCustomFilterEnabledKey()));
    2261     settings->setCSSRegionsEnabled(store.getBoolValueForKey(WebPreferencesKey::cssRegionsEnabledKey()));
     2262    RuntimeEnabledFeatures::setCSSRegionsEnabled(store.getBoolValueForKey(WebPreferencesKey::cssRegionsEnabledKey()));
    22622263    settings->setCSSGridLayoutEnabled(store.getBoolValueForKey(WebPreferencesKey::cssGridLayoutEnabledKey()));
    22632264    settings->setRegionBasedColumnsEnabled(store.getBoolValueForKey(WebPreferencesKey::regionBasedColumnsEnabledKey()));
  • trunk/Tools/ChangeLog

    r136204 r136210  
     12012-11-30  Mihai Maerean  <mmaerean@adobe.com>
     2
     3        [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
     4        https://bugs.webkit.org/show_bug.cgi?id=101192
     5
     6        Reviewed by Hajime Morita.
     7
     8        Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
     9
     10        Tests: No new tests because there is no functional change.
     11
     12        * DumpRenderTree/chromium/WebPreferences.cpp:
     13        (WebPreferences::applyTo):
     14
    1152012-11-29  Rafael Weinstein  <rafaelw@chromium.org>
    216
  • trunk/Tools/DumpRenderTree/chromium/WebPreferences.cpp

    r135459 r136210  
    3131#include "config.h"
    3232#include "WebPreferences.h"
     33#include "WebRuntimeFeatures.h"
    3334
    3435#include "WebView.h"
     
    201202    settings->setDeveloperExtrasEnabled(developerExtrasEnabled);
    202203    settings->setExperimentalWebGLEnabled(experimentalWebGLEnabled);
    203     settings->setExperimentalCSSRegionsEnabled(experimentalCSSRegionsEnabled);
     204    WebRuntimeFeatures::enableCSSRegions(experimentalCSSRegionsEnabled);
    204205    settings->setExperimentalCSSGridLayoutEnabled(experimentalCSSGridLayoutEnabled);
    205206    settings->setExperimentalCSSCustomFilterEnabled(cssCustomFilterEnabled);
Note: See TracChangeset for help on using the changeset viewer.