Changeset 247388 in webkit


Ignore:
Timestamp:
Jul 12, 2019 8:19:06 AM (5 years ago)
Author:
timothy@apple.com
Message:

Drop DarkModeCSSEnabled as an experimental feature and always enable it.
https://bugs.webkit.org/show_bug.cgi?id=199725
rdar://problem/52970972

Reviewed by Megan Gardner.

Source/WebCore:

Tests: css-dark-mode

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/MediaQueryEvaluator.cpp:

(WebCore::prefersColorSchemeEvaluate):

  • css/MediaQueryExpression.cpp:

(WebCore::featureWithValidIdent):
(WebCore::isFeatureValidWithoutValue):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

  • html/HTMLMetaElement.cpp:

(WebCore::HTMLMetaElement::process):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setDarkModeCSSEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::darkModeCSSEnabled const): Deleted.

Source/WebKit:

  • Shared/WebPreferences.yaml: Removed DarkModeCSSEnabled.

LayoutTests:

Removed <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
from all dark mode tests.

  • css-dark-mode/color-scheme-css-parse.html:
  • css-dark-mode/color-scheme-css.html:
  • css-dark-mode/color-scheme-meta.html:
  • css-dark-mode/color-scheme-priority.html:
  • css-dark-mode/color-scheme-scrollbar.html:
  • css-dark-mode/default-colors.html:
  • css-dark-mode/older-syntax/supported-color-schemes-css.html:
  • css-dark-mode/older-syntax/supported-color-schemes-meta.html:
  • css-dark-mode/older-systems/color-scheme-css.html:
  • css-dark-mode/older-systems/color-scheme-meta.html:
  • css-dark-mode/older-systems/prefers-color-scheme.html:
  • css-dark-mode/prefers-color-scheme-picture-element.html:
  • css-dark-mode/prefers-color-scheme.html:
Location:
trunk
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r247377 r247388  
     12019-07-12  Timothy Hatcher  <timothy@apple.com>
     2
     3        Drop DarkModeCSSEnabled as an experimental feature and always enable it.
     4        https://bugs.webkit.org/show_bug.cgi?id=199725
     5        rdar://problem/52970972
     6
     7        Reviewed by Megan Gardner.
     8
     9        Removed <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
     10        from all dark mode tests.
     11
     12        * css-dark-mode/color-scheme-css-parse.html:
     13        * css-dark-mode/color-scheme-css.html:
     14        * css-dark-mode/color-scheme-meta.html:
     15        * css-dark-mode/color-scheme-priority.html:
     16        * css-dark-mode/color-scheme-scrollbar.html:
     17        * css-dark-mode/default-colors.html:
     18        * css-dark-mode/older-syntax/supported-color-schemes-css.html:
     19        * css-dark-mode/older-syntax/supported-color-schemes-meta.html:
     20        * css-dark-mode/older-systems/color-scheme-css.html:
     21        * css-dark-mode/older-systems/color-scheme-meta.html:
     22        * css-dark-mode/older-systems/prefers-color-scheme.html:
     23        * css-dark-mode/prefers-color-scheme-picture-element.html:
     24        * css-dark-mode/prefers-color-scheme.html:
     25
    1262019-07-11  Myles C. Maxfield  <mmaxfield@apple.com>
    227
  • trunk/LayoutTests/css-dark-mode/color-scheme-css-parse.html

    r244408 r247388  
    11<!DOCTYPE html>
    2 
    3 <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
    42
    53<script src="../resources/testharness.js"></script>
  • trunk/LayoutTests/css-dark-mode/color-scheme-css.html

    r244408 r247388  
    11<!DOCTYPE html>
    2 
    3 <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
    42
    53<script src="../resources/testharness.js"></script>
  • trunk/LayoutTests/css-dark-mode/color-scheme-meta.html

    r244467 r247388  
    11<!DOCTYPE html>
    2 
    3 <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
    42
    53<script src="../resources/testharness.js"></script>
  • trunk/LayoutTests/css-dark-mode/color-scheme-priority.html

    r244408 r247388  
    11<!DOCTYPE html>
    2 
    3 <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
    42
    53<script src="../resources/testharness.js"></script>
  • trunk/LayoutTests/css-dark-mode/color-scheme-scrollbar.html

    r244408 r247388  
    11<!DOCTYPE html>
    2 
    3 <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
    42
    53<script src="../resources/testharness.js"></script>
  • trunk/LayoutTests/css-dark-mode/default-colors.html

    r244408 r247388  
    11<!DOCTYPE html>
    2 
    3 <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
    42
    53<script src="../resources/testharness.js"></script>
  • trunk/LayoutTests/css-dark-mode/older-syntax/supported-color-schemes-css.html

    r244408 r247388  
    11<!DOCTYPE html>
    2 
    3 <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
    42
    53<script src="../../resources/testharness.js"></script>
  • trunk/LayoutTests/css-dark-mode/older-syntax/supported-color-schemes-meta.html

    r244413 r247388  
    11<!DOCTYPE html>
    2 
    3 <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
    42
    53<script src="../../resources/testharness.js"></script>
  • trunk/LayoutTests/css-dark-mode/older-systems/color-scheme-css.html

    r244408 r247388  
    11<!DOCTYPE html>
    2 
    3 <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
    42
    53<script src="../../resources/testharness.js"></script>
  • trunk/LayoutTests/css-dark-mode/older-systems/color-scheme-meta.html

    r244408 r247388  
    11<!DOCTYPE html>
    2 
    3 <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
    42
    53<script src="../../resources/testharness.js"></script>
  • trunk/LayoutTests/css-dark-mode/older-systems/prefers-color-scheme.html

    r239904 r247388  
    11<!DOCTYPE html>
    2 
    3 <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
    42
    53<script src="../../resources/testharness.js"></script>
  • trunk/LayoutTests/css-dark-mode/prefers-color-scheme-picture-element.html

    r237878 r247388  
    11<!DOCTYPE html>
    2 
    3 <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
    42
    53<script src="../resources/testharness.js"></script>
  • trunk/LayoutTests/css-dark-mode/prefers-color-scheme.html

    r238200 r247388  
    11<!DOCTYPE html>
    2 
    3 <!-- webkit-test-runner [ experimental:DarkModeCSSEnabled=true ] -->
    42
    53<script src="../resources/testharness.js"></script>
  • trunk/Source/WebCore/ChangeLog

    r247385 r247388  
     12019-07-12  Timothy Hatcher  <timothy@apple.com>
     2
     3        Drop DarkModeCSSEnabled as an experimental feature and always enable it.
     4        https://bugs.webkit.org/show_bug.cgi?id=199725
     5        rdar://problem/52970972
     6
     7        Reviewed by Megan Gardner.
     8
     9        Tests: css-dark-mode
     10
     11        * css/CSSComputedStyleDeclaration.cpp:
     12        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
     13        * css/MediaQueryEvaluator.cpp:
     14        (WebCore::prefersColorSchemeEvaluate):
     15        * css/MediaQueryExpression.cpp:
     16        (WebCore::featureWithValidIdent):
     17        (WebCore::isFeatureValidWithoutValue):
     18        * css/parser/CSSPropertyParser.cpp:
     19        (WebCore::CSSPropertyParser::parseSingleValue):
     20        * html/HTMLMetaElement.cpp:
     21        (WebCore::HTMLMetaElement::process):
     22        * page/RuntimeEnabledFeatures.h:
     23        (WebCore::RuntimeEnabledFeatures::setDarkModeCSSEnabled): Deleted.
     24        (WebCore::RuntimeEnabledFeatures::darkModeCSSEnabled const): Deleted.
     25
    1262019-07-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
    227
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r247256 r247388  
    40304030#if ENABLE(DARK_MODE_CSS)
    40314031        case CSSPropertyColorScheme: {
    4032             if (!RuntimeEnabledFeatures::sharedFeatures().darkModeCSSEnabled())
    4033                 return nullptr;
    4034 
    40354032            auto colorScheme = style.colorScheme();
    40364033            if (colorScheme.isAuto())
  • trunk/Source/WebCore/css/MediaQueryEvaluator.cpp

    r246490 r247388  
    768768static bool prefersColorSchemeEvaluate(CSSValue* value, const CSSToLengthConversionData&, Frame& frame, MediaFeaturePrefix)
    769769{
    770     ASSERT(RuntimeEnabledFeatures::sharedFeatures().darkModeCSSEnabled());
    771 
    772770    if (!value)
    773771        return true;
  • trunk/Source/WebCore/css/MediaQueryExpression.cpp

    r246490 r247388  
    5656#endif
    5757#if ENABLE(DARK_MODE_CSS)
    58     || (mediaFeature == MediaFeatureNames::prefersColorScheme && RuntimeEnabledFeatures::sharedFeatures().darkModeCSSEnabled())
     58    || (mediaFeature == MediaFeatureNames::prefersColorScheme)
    5959#endif
    6060    || mediaFeature == MediaFeatureNames::prefersReducedMotion
     
    169169        || (mediaFeature == MediaFeatureNames::prefersDarkInterface && (context.useSystemAppearance || isUASheetBehavior(context.mode)))
    170170#if ENABLE(DARK_MODE_CSS)
    171         || (mediaFeature == MediaFeatureNames::prefersColorScheme && RuntimeEnabledFeatures::sharedFeatures().darkModeCSSEnabled())
     171        || (mediaFeature == MediaFeatureNames::prefersColorScheme)
    172172#endif
    173173        || mediaFeature == MediaFeatureNames::devicePixelRatio
  • trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp

    r246490 r247388  
    42424242#if ENABLE(DARK_MODE_CSS)
    42434243    case CSSPropertyColorScheme:
    4244         if (!RuntimeEnabledFeatures::sharedFeatures().darkModeCSSEnabled())
    4245             return nullptr;
    42464244        return consumeColorScheme(m_range);
    42474245#endif
  • trunk/Source/WebCore/html/HTMLMetaElement.cpp

    r246490 r247388  
    9393        document().processDisabledAdaptations(contentValue);
    9494#if ENABLE(DARK_MODE_CSS)
    95     else if (RuntimeEnabledFeatures::sharedFeatures().darkModeCSSEnabled() && (equalLettersIgnoringASCIICase(name(), "color-scheme") || equalLettersIgnoringASCIICase(name(), "supported-color-schemes")))
     95    else if (equalLettersIgnoringASCIICase(name(), "color-scheme") || equalLettersIgnoringASCIICase(name(), "supported-color-schemes"))
    9696        document().processColorScheme(contentValue);
    9797#endif
  • trunk/Source/WebCore/page/RuntimeEnabledFeatures.h

    r246763 r247388  
    8585    void setDirectoryUploadEnabled(bool isEnabled) { m_isDirectoryUploadEnabled = isEnabled; }
    8686    bool directoryUploadEnabled() const { return m_isDirectoryUploadEnabled; }
    87 
    88 #if ENABLE(DARK_MODE_CSS)
    89     void setDarkModeCSSEnabled(bool isEnabled) { m_isDarkModeCSSEnabled = isEnabled; }
    90     bool darkModeCSSEnabled() const { return m_isDarkModeCSSEnabled; }
    91 #endif
    9287
    9388    void setDataTransferItemsEnabled(bool areEnabled) { m_areDataTransferItemsEnabled = areEnabled; }
     
    438433#endif
    439434
    440 #if ENABLE(DARK_MODE_CSS)
    441     bool m_isDarkModeCSSEnabled { true };
    442 #endif
    443 
    444435#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
    445436    bool m_isIndexedDBWorkersEnabled { true };
  • trunk/Source/WebKit/ChangeLog

    r247377 r247388  
     12019-07-12  Timothy Hatcher  <timothy@apple.com>
     2
     3        Drop DarkModeCSSEnabled as an experimental feature and always enable it.
     4        https://bugs.webkit.org/show_bug.cgi?id=199725
     5        rdar://problem/52970972
     6
     7        Reviewed by Megan Gardner.
     8
     9        * Shared/WebPreferences.yaml: Removed DarkModeCSSEnabled.
     10
    1112019-07-11  Myles C. Maxfield  <mmaxfield@apple.com>
    212
  • trunk/Source/WebKit/Shared/WebPreferences.yaml

    r247377 r247388  
    13551355  category: experimental
    13561356
    1357 DarkModeCSSEnabled:
    1358   type: bool
    1359   defaultValue: true
    1360   humanReadableName: "Dark Mode CSS Support"
    1361   humanReadableDescription: "Enable Dark Mode CSS Support"
    1362   webcoreBinding: RuntimeEnabledFeatures
    1363   category: experimental
    1364   condition: ENABLE(DARK_MODE_CSS)
    1365 
    13661357CSSPaintingAPIEnabled:
    13671358  type: bool
Note: See TracChangeset for help on using the changeset viewer.