Changeset 154742 in webkit


Ignore:
Timestamp:
Aug 28, 2013 7:10:47 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

<https://webkit.org/b/120002> [CSS Masking] Add -webkit-mask-source-type shorthand property

Source/WebCore:

Added the -webkit-mask-source-type property to the -webkit-mask shorthand property.

Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-28
Reviewed by Dirk Schulze.

Test cases added in LayoutTests/fast/masking/parsing-mask.html

  • css/CSSParser.cpp: Added the CSSPropertyWebkitMaskSourceType property to the array of shorthand properties.

(WebCore::CSSParser::parseValue):

  • css/StylePropertyShorthand.cpp: Added the CSSPropertyWebkitMaskSourceType to the list of shorthands.

(WebCore::webkitMaskShorthand):
(WebCore::matchingShorthandsForLonghand):

LayoutTests:

Added test cases for using the source type with the -webkit-mask shorthand property.

Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-28
Reviewed by Dirk Schulze.

  • fast/masking/parsing-mask-expected.txt:
  • fast/masking/parsing-mask.html:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r154736 r154742  
     12013-08-28  Andrei Parvu  <parvu@adobe.com>
     2
     3        <https://webkit.org/b/120002> [CSS Masking] Add -webkit-mask-source-type shorthand property
     4
     5        Added test cases for using the source type with the -webkit-mask shorthand property.
     6
     7        Reviewed by Dirk Schulze.
     8
     9        * fast/masking/parsing-mask-expected.txt:
     10        * fast/masking/parsing-mask.html:
     11
    1122013-08-28  Allan Sandfeld Jensen  <allan.jensen@digia.com>
    213
  • trunk/LayoutTests/fast/masking/parsing-mask-expected.txt

    r154174 r154742  
    4040PASS innerStyle("-webkit-mask-position", "center left 30px") is "left 30px top 50%"
    4141PASS innerStyle("-webkit-mask-position", "left 20% top") is "left 20% top 0%"
     42PASS innerStyle("-webkit-mask", "none alpha") is "none alpha"
     43PASS innerStyle("-webkit-mask", "none luminance, none alpha") is "none luminance, none alpha"
     44PASS innerStyle("-webkit-mask", "none auto, none, none luminance") is "none auto, none, none luminance"
    4245PASS innerStyle("-webkit-mask-source-type", "alpha") is "alpha"
    4346PASS innerStyle("-webkit-mask-source-type", "luminance") is "luminance"
     
    117120PASS innerStyle("-webkit-mask", "none top 20px top 30px / auto repeat-x scroll border-box border-box") is null
    118121PASS innerStyle("-webkit-mask", "none top 20px bottom / auto repeat-x scroll border-box border-box") is null
     122PASS innerStyle("-webkit-mask", "none alpha, none auto alpha") is null
     123PASS innerStyle("-webkit-mask", "none alpha luminance") is null
    119124PASS innerStyle("-webkit-mask-source-type", "rubbish") is null
    120125PASS innerStyle("-webkit-mask-source-type", "") is null
  • trunk/LayoutTests/fast/masking/parsing-mask.html

    r154174 r154742  
    8585
    8686// test mask-source-type
     87testInner("-webkit-mask", "none alpha", "none alpha");
     88testInner("-webkit-mask", "none luminance, none alpha", "none luminance, none alpha");
     89testInner("-webkit-mask", "none auto, none, none luminance", "none auto, none, none luminance");
    8790testInner("-webkit-mask-source-type", "alpha", "alpha");
    8891testInner("-webkit-mask-source-type", "luminance", "luminance");
     
    176179negativeTest("-webkit-mask", "none top 20px top 30px / auto repeat-x scroll border-box border-box");
    177180negativeTest("-webkit-mask", "none top 20px bottom / auto repeat-x scroll border-box border-box");
     181negativeTest("-webkit-mask", "none alpha, none auto alpha");
     182negativeTest("-webkit-mask", "none alpha luminance");
    178183negativeTest("-webkit-mask-source-type", "rubbish");
    179184negativeTest("-webkit-mask-source-type", "");
  • trunk/Source/WebCore/ChangeLog

    r154741 r154742  
     12013-08-28  Andrei Parvu  <parvu@adobe.com>
     2
     3        <https://webkit.org/b/120002> [CSS Masking] Add -webkit-mask-source-type shorthand property
     4
     5        Added the -webkit-mask-source-type property to the -webkit-mask shorthand property.
     6
     7        Reviewed by Dirk Schulze.
     8
     9        Test cases added in LayoutTests/fast/masking/parsing-mask.html
     10
     11        * css/CSSParser.cpp: Added the CSSPropertyWebkitMaskSourceType property to the array of shorthand properties.
     12        (WebCore::CSSParser::parseValue):
     13        * css/StylePropertyShorthand.cpp: Added the CSSPropertyWebkitMaskSourceType to the list of shorthands.
     14        (WebCore::webkitMaskShorthand):
     15        (WebCore::matchingShorthandsForLonghand):
     16
    1172013-08-28  Zan Dobersek  <zdobersek@igalia.com>
    218
  • trunk/Source/WebCore/css/CSSParser.cpp

    r154730 r154742  
    28512851    }
    28522852    case CSSPropertyWebkitMask: {
    2853         const CSSPropertyID properties[] = { CSSPropertyWebkitMaskImage, CSSPropertyWebkitMaskRepeat,
     2853        const CSSPropertyID properties[] = { CSSPropertyWebkitMaskImage, CSSPropertyWebkitMaskSourceType, CSSPropertyWebkitMaskRepeat,
    28542854            CSSPropertyWebkitMaskPosition, CSSPropertyWebkitMaskOrigin, CSSPropertyWebkitMaskClip, CSSPropertyWebkitMaskSize };
    28552855        return parseFillShorthand(propId, properties, WTF_ARRAY_LENGTH(properties), important);
  • trunk/Source/WebCore/css/StylePropertyShorthand.cpp

    r154338 r154742  
    432432    static const CSSPropertyID maskProperties[] = {
    433433        CSSPropertyWebkitMaskImage,
     434        CSSPropertyWebkitMaskSourceType,
    434435        CSSPropertyWebkitMaskPositionX,
    435436        CSSPropertyWebkitMaskPositionY,
     
    899900        mask.uncheckedAppend(&webkitMaskShorthand());
    900901        map.set(CSSPropertyWebkitMaskImage, mask);
     902        map.set(CSSPropertyWebkitMaskSourceType, mask);
    901903        map.set(CSSPropertyWebkitMaskSize, mask);
    902904        map.set(CSSPropertyWebkitMaskOrigin, mask);
Note: See TracChangeset for help on using the changeset viewer.