Changeset 268962 in webkit


Ignore:
Timestamp:
Oct 25, 2020, 6:57:09 PM (5 years ago)
Author:
[email protected]
Message:

Remove non-standard 'css'/'Css' prefixed properties on CSSStyleDeclaration
https://bugs.webkit.org/show_bug.cgi?id=218158

Reviewed by Simon Fraser.

Source/WebCore:

Remove support for 'css'/'Css' prefixed properties of CSSStyleDeclaration which
are no longer supported by any other browser.

  • css/CSSStyleDeclaration.cpp:
  • css/makeprop.pl:

LayoutTests:

  • fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt:
  • fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html:

Update test to reflect removal of css prefixes.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r268961 r268962  
     12020-10-25  Sam Weinig  <[email protected]>
     2
     3        Remove non-standard 'css'/'Css' prefixed properties on CSSStyleDeclaration
     4        https://bugs.webkit.org/show_bug.cgi?id=218158
     5
     6        Reviewed by Simon Fraser.
     7
     8        * fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt:
     9        * fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html:
     10        Update test to reflect removal of css prefixes.
     11
    1122020-10-25  Emilio Cobos Álvarez  <[email protected]>
    213
  • trunk/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt

    r268957 r268962  
    44
    55
    6 normal cases
    7 
    86PASS element.style.zIndex is '1'
    97PASS element.style.ZIndex is undefined.
    10 
    11 "css" prefix
    12 
    13 PASS element.style.cssZIndex is '1'
    14 PASS element.style.CssZIndex is '1'
    15 PASS element.style.CsszIndex is undefined.
    16 PASS element.style.csszIndex is undefined.
    178PASS successfullyParsed is true
    189
  • trunk/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html

    r268957 r268962  
    1313element.style.zIndex = 1;
    1414
    15 debug('normal cases');
    16 debug('');
    17 
    1815shouldBe("element.style.zIndex", "'1'");
    1916shouldBeUndefined("element.style.ZIndex");
    20 
    21 debug('');
    22 debug('"css" prefix');
    23 debug('');
    24 
    25 shouldBe("element.style.cssZIndex", "'1'");
    26 shouldBe("element.style.CssZIndex", "'1'");
    27 shouldBeUndefined("element.style.CsszIndex");
    28 shouldBeUndefined("element.style.csszIndex");
    2917
    3018</script>
  • trunk/Source/WebCore/ChangeLog

    r268960 r268962  
     12020-10-25  Sam Weinig  <[email protected]>
     2
     3        Remove non-standard 'css'/'Css' prefixed properties on CSSStyleDeclaration
     4        https://bugs.webkit.org/show_bug.cgi?id=218158
     5
     6        Reviewed by Simon Fraser.
     7
     8        Remove support for 'css'/'Css' prefixed properties of CSSStyleDeclaration which
     9        are no longer supported by any other browser.
     10
     11        * css/CSSStyleDeclaration.cpp:
     12        * css/makeprop.pl:
     13
    1142020-10-25  Simon Fraser  <[email protected]>
    215
  • trunk/Source/WebCore/css/CSSStyleDeclaration.cpp

    r268957 r268962  
    4545    None,
    4646    Epub,
    47     CSS,
    4847    WebKit
    4948};
     
    8685    UChar firstChar = toASCIILower(propertyName[0]);
    8786    switch (firstChar) {
    88     case 'c':
    89         if (matchesCSSPropertyNamePrefix(propertyName, "css"))
    90             return PropertyNamePrefix::CSS;
    91         break;
    9287    case 'e':
    9388        if (matchesCSSPropertyNamePrefix(propertyName, "epub"))
     
    150145
    151146    unsigned i = 0;
    152     // Prefix CSS is ignored.
    153147    // Prefix Webkit becomes "-webkit-".
    154148    // Prefix Epub becomes "-epub-".
     
    157151        if (isASCIIUpper((*propertyNameString)[0]))
    158152            return propertyID;
    159         break;
    160     case PropertyNamePrefix::CSS:
    161         i += 3;
    162153        break;
    163154    case PropertyNamePrefix::Epub:
  • trunk/Source/WebCore/css/makeprop.pl

    r268957 r268962  
    15021502
    15031503print CSS_STYLE_DECLARATION_PROPERTY_NAMES_IDL << "EOF";
    1504 
    1505     // Non-standard. Adds an additional variant of all properties not starting with -webkit- or -epub-
    1506     // that is the property name prefixed by css and Css.
    1507     // Example top -> element.style.cssTop
    1508     // Example top -> element.style.CssTop
    1509 EOF
    1510 foreach my $nameOrAlias (grep { $_ !~ /^\-webkit\-|^\-epub\-/ } @namesAndAliases) {
    1511     my $camelCasedAttributeName = cssPropertyToIDLAttribute($nameOrAlias, 0, 1);
    1512     my $name = $namesAndAliasesToName{$nameOrAlias};
    1513     my $propertyId = $nameToId{$namesAndAliasesToName{$name}};
    1514    
    1515     my @extendedAttributeValues = ("CSSProperty=${propertyId}");
    1516     push(@extendedAttributeValues, "EnabledBySetting=${settingsFlags{$name}}") if $settingsFlags{$name};
    1517     push(@extendedAttributeValues, "EnabledAtRuntime=${runtimeFlags{$name}}") if $runtimeFlags{$name};
    1518     my $extendedAttributes = join(", ", @extendedAttributeValues);
    1519 
    1520     print CSS_STYLE_DECLARATION_PROPERTY_NAMES_IDL "    [CEReactions, ${extendedAttributes}] attribute [LegacyNullToEmptyString] CSSOMString css${camelCasedAttributeName};\n" unless $camelCasedAttributeName eq "Float";
    1521     print CSS_STYLE_DECLARATION_PROPERTY_NAMES_IDL "    [CEReactions, ${extendedAttributes}] attribute [LegacyNullToEmptyString] CSSOMString Css${camelCasedAttributeName};\n" unless $camelCasedAttributeName eq "Float";
    1522 }
    1523 
    1524 print CSS_STYLE_DECLARATION_PROPERTY_NAMES_IDL << "EOF";
    15251504};
    15261505EOF
Note: See TracChangeset for help on using the changeset viewer.