remove CSSBorderImageValue
authoralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jan 2012 11:10:54 +0000 (11:10 +0000)
committeralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jan 2012 11:10:54 +0000 (11:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=75563

Reviewed by Tony Chang.

Source/WebCore:

Remove CSSBorderImageValue as border-image is a shorthand therefore we don't
need a dedicated CSS class type for it. CSSBorderImageValue was here for
-webkit-border-image which is not a shorthand. This is the first step to move border-image
close to a correct shorthand implementation while keeping -webkit-border-image being a regular
CSS property.

No new tests : It's a refactor, existing tests should cover it.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.order:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSAllInOne.cpp:
* css/CSSBorderImage.cpp: Added.
(WebCore::createBorderImageValue):
* css/CSSBorderImage.h: Added.
* css/CSSBorderImageValue.cpp: Removed.
* css/CSSBorderImageValue.h: Removed.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForNinePieceImage):
* css/CSSParser.cpp:
(WebCore::BorderImageParseContext::commitBorderImage):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::mapNinePieceImage):
* css/CSSValue.cpp:
(WebCore::CSSValue::addSubresourceStyleURLs):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:

LayoutTests:

Modify the expected output as now border-image is a CSSValueList.

* fast/css/getComputedStyle/getComputedStyle-border-image-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105502 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-image-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.order
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSAllInOne.cpp
Source/WebCore/css/CSSBorderImage.cpp [new file with mode: 0644]
Source/WebCore/css/CSSBorderImage.h [new file with mode: 0644]
Source/WebCore/css/CSSBorderImageValue.cpp [deleted file]
Source/WebCore/css/CSSBorderImageValue.h [deleted file]
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/css/CSSValue.cpp
Source/WebCore/css/CSSValue.h

index 51c4221..2a13bf2 100644 (file)
@@ -1,3 +1,14 @@
+2012-01-20  Alexis Menard  <alexis.menard@openbossa.org>
+
+        remove CSSBorderImageValue
+        https://bugs.webkit.org/show_bug.cgi?id=75563
+
+        Reviewed by Tony Chang.
+
+        Modify the expected output as now border-image is a CSSValueList.
+
+        * fast/css/getComputedStyle/getComputedStyle-border-image-expected.txt:
+
 2012-01-20  Hayato Ito  <hayato@chromium.org>
 
         Add ShadowRoot.idl which is enabled by newly introduced SHADOW_DOM flag.
index 7a1f9c7..b64bf21 100644 (file)
@@ -8,20 +8,20 @@ Test calling getPropertyValue on computed styles for -webkit-border-image proper
 -webkit-border-image: -webkit-gradient(linear, 0 0, 0 0) 25 25 25 25 stretch stretch;
   -webkit-border-image
     getPropertyValue:    -webkit-gradient(linear, 0 0, 0 0) 25 fill / 1 / 0px stretch
-    getPropertyCSSValue: [object CSSValue]
+    getPropertyCSSValue: [object CSSValueList]
 
 -webkit-border-image: -webkit-gradient(linear, 0 0, 0 0) 50 repeat;
   -webkit-border-image
     getPropertyValue:    -webkit-gradient(linear, 0 0, 0 0) 50 fill / 1 / 0px repeat
-    getPropertyCSSValue: [object CSSValue]
+    getPropertyCSSValue: [object CSSValueList]
 
 -webkit-border-image: -webkit-gradient(linear, 0 0, 0 0) 25 25 25 25 / 20 20 20 20 repeat;
   -webkit-border-image
     getPropertyValue:    -webkit-gradient(linear, 0 0, 0 0) 25 fill / 20 / 0px repeat
-    getPropertyCSSValue: [object CSSValue]
+    getPropertyCSSValue: [object CSSValueList]
 
 -webkit-border-image: -webkit-gradient(linear, 0 0, 0 0) 50 / 20 stretch stretch;
   -webkit-border-image
     getPropertyValue:    -webkit-gradient(linear, 0 0, 0 0) 50 fill / 20 / 0px stretch
-    getPropertyCSSValue: [object CSSValue]
+    getPropertyCSSValue: [object CSSValueList]
 
index ad1bbba..87f78e1 100644 (file)
@@ -426,7 +426,7 @@ SET(WebCore_SOURCES
     bindings/generic/RuntimeEnabledFeatures.cpp
 
     css/CSSAspectRatioValue.cpp
-    css/CSSBorderImageValue.cpp
+    css/CSSBorderImage.cpp
     css/CSSBorderImageSliceValue.cpp
     css/CSSCanvasValue.cpp
     css/CSSCharsetRule.cpp
index 8de560c..f388863 100755 (executable)
@@ -1,3 +1,43 @@
+2012-01-20  Alexis Menard  <alexis.menard@openbossa.org>
+
+        remove CSSBorderImageValue
+        https://bugs.webkit.org/show_bug.cgi?id=75563
+
+        Reviewed by Tony Chang.
+
+        Remove CSSBorderImageValue as border-image is a shorthand therefore we don't
+        need a dedicated CSS class type for it. CSSBorderImageValue was here for
+        -webkit-border-image which is not a shorthand. This is the first step to move border-image
+        close to a correct shorthand implementation while keeping -webkit-border-image being a regular
+        CSS property.
+
+        No new tests : It's a refactor, existing tests should cover it.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * Target.pri:
+        * WebCore.gypi:
+        * WebCore.order:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSAllInOne.cpp:
+        * css/CSSBorderImage.cpp: Added.
+        (WebCore::createBorderImageValue):
+        * css/CSSBorderImage.h: Added.
+        * css/CSSBorderImageValue.cpp: Removed.
+        * css/CSSBorderImageValue.h: Removed.
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::valueForNinePieceImage):
+        * css/CSSParser.cpp:
+        (WebCore::BorderImageParseContext::commitBorderImage):
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::mapNinePieceImage):
+        * css/CSSValue.cpp:
+        (WebCore::CSSValue::addSubresourceStyleURLs):
+        (WebCore::CSSValue::cssText):
+        (WebCore::CSSValue::destroy):
+        * css/CSSValue.h:
+
 2012-01-20  Hayato Ito  <hayato@chromium.org>
 
         Add ShadowRoot.idl which is enabled by newly introduced SHADOW_DOM flag.
index 83e19b3..1a1b83d 100644 (file)
@@ -1272,8 +1272,8 @@ webcore_sources += \
        Source/WebCore/css/CSSAspectRatioValue.h \
        Source/WebCore/css/CSSBorderImageSliceValue.cpp \
        Source/WebCore/css/CSSBorderImageSliceValue.h \
-       Source/WebCore/css/CSSBorderImageValue.cpp \
-       Source/WebCore/css/CSSBorderImageValue.h \
+       Source/WebCore/css/CSSBorderImage.cpp \
+       Source/WebCore/css/CSSBorderImage.h \
        Source/WebCore/css/CSSCanvasValue.cpp \
        Source/WebCore/css/CSSCanvasValue.h \
        Source/WebCore/css/CSSCharsetRule.cpp \
index 97956bc..c047d75 100644 (file)
@@ -392,7 +392,7 @@ v8 {
 SOURCES += \
     css/CSSAspectRatioValue.cpp \
     css/CSSBorderImageSliceValue.cpp \
-    css/CSSBorderImageValue.cpp \
+    css/CSSBorderImage.cpp \
     css/CSSCanvasValue.cpp \
     css/CSSCharsetRule.cpp \
     css/CSSComputedStyleDeclaration.cpp \
@@ -1504,7 +1504,7 @@ v8 {
 HEADERS += \
     css/CSSAspectRatioValue.h \
     css/CSSBorderImageSliceValue.h \
-    css/CSSBorderImageValue.h \
+    css/CSSBorderImage.h \
     css/CSSCanvasValue.h \
     css/CSSCharsetRule.h \
     css/CSSComputedStyleDeclaration.h \
index 953e103..06af14b 100644 (file)
             'config.h',
             'css/CSSAspectRatioValue.cpp',
             'css/CSSAspectRatioValue.h',
-            'css/CSSBorderImageValue.cpp',
-            'css/CSSBorderImageValue.h',
+            'css/CSSBorderImage.cpp',
+            'css/CSSBorderImage.h',
             'css/CSSBorderImageSliceValue.cpp',
             'css/CSSBorderImageSliceValue.h',
             'css/CSSCanvasValue.cpp',
index 345dfdc..0804753 100644 (file)
@@ -10459,10 +10459,7 @@ __ZN7WebCore13RenderReplicaD0Ev
 __ZN7WebCore15CSSReflectValueD0Ev
 __ZN7WebCore9CSSParser16parseBorderImageEibRN3WTF6RefPtrINS_8CSSValueEEE
 __ZN7WebCore23BorderImageParseContext17commitBorderImageEPNS_9CSSParserEb
-__ZN7WebCore19CSSBorderImageValue6createEN3WTF10PassRefPtrINS_8CSSValueEEENS2_INS_4RectEEEii
-__ZN7WebCore19CSSBorderImageValueC1EN3WTF10PassRefPtrINS_8CSSValueEEENS2_INS_4RectEEEii
 __ZN7WebCore23BorderImageParseContextD1Ev
-__ZNK7WebCore19CSSBorderImageValue18isBorderImageValueEv
 __ZNK7WebCore22CSSImageGeneratorValue11isFixedSizeEv
 __ZN7WebCore16CSSGradientValue5imageEPNS_12RenderObjectERKNS_7IntSizeE
 __ZNK3WTF9HashTableIPN7WebCore12RenderObjectESt4pairIS3_S4_INS1_7IntSizeEiEENS_18PairFirstExtractorIS7_EENS_7PtrHashIS3_EENS_14PairHashTraitsINS_10HashTraitsIS3_EENSD_IS6_EEEESE_E8containsIS3_NS_22IdentityHashTranslatorIS3_S7_SB_EEEEbRKT_
@@ -10486,7 +10483,6 @@ __ZN7WebCore15GraphicsContext8fillRectERKNS_9FloatRectERNS_9GeneratorE
 __ZN7WebCore8Gradient4fillEPNS_15GraphicsContextERKNS_9FloatRectE
 __ZNK3WTF9HashTableIN7WebCore7IntSizeESt4pairIS2_jENS_18PairFirstExtractorIS4_EENS_7IntHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSA_IjEEEESB_E8containsIS2_NS_22IdentityHashTranslatorIS2_S4_S8_EEEEbRKT_
 __ZN7WebCore14GeneratedImageD0Ev
-__ZN7WebCore19CSSBorderImageValueD0Ev
 __ZN7WebCore22CSSLinearGradientValueD0Ev
 __ZN7WebCore16CSSGradientValueD2Ev
 __ZN3WTF16VectorDestructorILb1EN7WebCore20CSSGradientColorStopEE8destructEPS2_S4_
@@ -19654,7 +19650,6 @@ __ZNK7WebCore24ShorthandPropertyWrapper18isShorthandWrapperEv
 __ZNK7WebCore32PropertyWrapperMaybeInvalidColor5blendEPKNS_13AnimationBaseEPNS_11RenderStyleEPKS4_S7_d
 __ZN7WebCore17CSSParserSelector16insertTagHistoryENS_11CSSSelector8RelationEN3WTF10PassOwnPtrIS0_EES2_
 __ZN7WebCore18SliderThumbElement19defaultEventHandlerEPNS_5EventE
-__ZNK7WebCore19CSSBorderImageValue7cssTextEv
 __ZN7WebCore26jsElementChildElementCountEPN3JSC9ExecStateENS0_7JSValueERKNS0_10IdentifierE
 __ZNK7WebCore7Element17childElementCountEv
 __ZN7WebCore18jsDOMWindowScrollYEPN3JSC9ExecStateENS0_7JSValueERKNS0_10IdentifierE
@@ -31096,7 +31091,6 @@ __ZN7WebCore12CSSStyleRule23addSubresourceStyleURLsERN3WTF11ListHashSetINS_4KURL
 __ZNK7WebCore16HTMLStyleElement27addSubresourceAttributeURLsERN3WTF11ListHashSetINS_4KURLELm256ENS_8KURLHashEEE
 __ZN7WebCore15CSSFontFaceRule23addSubresourceStyleURLsERN3WTF11ListHashSetINS_4KURLELm256ENS_8KURLHashEEE
 __ZN7WebCore19CSSFontFaceSrcValue23addSubresourceStyleURLsERN3WTF11ListHashSetINS_4KURLELm256ENS_8KURLHashEEEPKNS_13CSSStyleSheetE
-__ZN7WebCore19CSSBorderImageValue23addSubresourceStyleURLsERN3WTF11ListHashSetINS_4KURLELm256ENS_8KURLHashEEEPKNS_13CSSStyleSheetE
 __ZN7WebCore15CSSReflectValue23addSubresourceStyleURLsERN3WTF11ListHashSetINS_4KURLELm256ENS_8KURLHashEEEPKNS_13CSSStyleSheetE
 __ZNK7WebCore20HTMLFrameElementBase14isURLAttributeEPNS_9AttributeE
 __ZN7WebCore12IconDatabase25setPrivateBrowsingEnabledEb
index 62c383b..5044ec0 100755 (executable)
                                >
                        </File>
                        <File
-                               RelativePath="..\css\CSSBorderImageValue.cpp"
+                               RelativePath="..\css\CSSBorderImage.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\css\CSSBorderImageValue.h"
+                               RelativePath="..\css\CSSBorderImage.h"
                                >
                        </File>
                        <File
index f137497..a30039b 100644 (file)
                A80A9425149F227100989291 /* JSDOMWindowWebSocketCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80A9424149F227100989291 /* JSDOMWindowWebSocketCustom.cpp */; };
                A80D67080E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h in Headers */ = {isa = PBXBuildFile; fileRef = A80D67070E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h */; };
                A80E6CE40A1989CA007FB8C5 /* CSSValueList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CBA0A1989CA007FB8C5 /* CSSValueList.cpp */; };
-               A80E6CE50A1989CA007FB8C5 /* CSSBorderImageValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CBB0A1989CA007FB8C5 /* CSSBorderImageValue.cpp */; };
                A80E6CE60A1989CA007FB8C5 /* CSSPrimitiveValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CBC0A1989CA007FB8C5 /* CSSPrimitiveValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A80E6CE70A1989CA007FB8C5 /* CSSFontFaceRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CBD0A1989CA007FB8C5 /* CSSFontFaceRule.cpp */; };
                A80E6CE80A1989CA007FB8C5 /* ShadowValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CBE0A1989CA007FB8C5 /* ShadowValue.h */; };
                A80E6D040A1989CA007FB8C5 /* Counter.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CDA0A1989CA007FB8C5 /* Counter.h */; };
                A80E6D050A1989CA007FB8C5 /* CSSPrimitiveValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CDB0A1989CA007FB8C5 /* CSSPrimitiveValue.cpp */; };
                A80E6D060A1989CA007FB8C5 /* CSSRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CDC0A1989CA007FB8C5 /* CSSRule.cpp */; };
-               A80E6D070A1989CA007FB8C5 /* CSSBorderImageValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CDD0A1989CA007FB8C5 /* CSSBorderImageValue.h */; };
                A80E6D080A1989CA007FB8C5 /* CSSInitialValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CDE0A1989CA007FB8C5 /* CSSInitialValue.h */; };
                A80E6D090A1989CA007FB8C5 /* CSSRuleList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CDF0A1989CA007FB8C5 /* CSSRuleList.cpp */; };
                A80E6D0B0A1989CA007FB8C5 /* DashboardRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CE10A1989CA007FB8C5 /* DashboardRegion.h */; };
                E16982601134636A00894115 /* ObjCRuntimeObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = E169825F1134636A00894115 /* ObjCRuntimeObject.mm */; };
                E1698264113467F300894115 /* JavaRuntimeObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1698263113467F300894115 /* JavaRuntimeObject.cpp */; };
                E16982681134680700894115 /* JavaRuntimeObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E16982671134680700894115 /* JavaRuntimeObject.h */; };
+               E16A84F914C85CCC002977DF /* CSSBorderImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E16A84F714C85CCC002977DF /* CSSBorderImage.cpp */; };
+               E16A84FA14C85CCC002977DF /* CSSBorderImage.h in Headers */ = {isa = PBXBuildFile; fileRef = E16A84F814C85CCC002977DF /* CSSBorderImage.h */; };
                E17A4A1B0D97991D00FC10C6 /* DOMSVGAltGlyphElement.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 65AA6BAC0D974A00000541AE /* DOMSVGAltGlyphElement.h */; };
                E17A4A1C0D97991D00FC10C6 /* DOMSVGAltGlyphElementInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 65AA6BAE0D974A00000541AE /* DOMSVGAltGlyphElementInternal.h */; };
                E182568F0EF2B02D00933242 /* JSWorkerContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E182568D0EF2B02D00933242 /* JSWorkerContext.cpp */; };
                A80A9424149F227100989291 /* JSDOMWindowWebSocketCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMWindowWebSocketCustom.cpp; sourceTree = "<group>"; };
                A80D67070E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextPlatformPrivateCG.h; sourceTree = "<group>"; };
                A80E6CBA0A1989CA007FB8C5 /* CSSValueList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSValueList.cpp; sourceTree = "<group>"; };
-               A80E6CBB0A1989CA007FB8C5 /* CSSBorderImageValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSBorderImageValue.cpp; sourceTree = "<group>"; };
                A80E6CBC0A1989CA007FB8C5 /* CSSPrimitiveValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSPrimitiveValue.h; sourceTree = "<group>"; };
                A80E6CBD0A1989CA007FB8C5 /* CSSFontFaceRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontFaceRule.cpp; sourceTree = "<group>"; };
                A80E6CBE0A1989CA007FB8C5 /* ShadowValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ShadowValue.h; sourceTree = "<group>"; };
                A80E6CDA0A1989CA007FB8C5 /* Counter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Counter.h; sourceTree = "<group>"; };
                A80E6CDB0A1989CA007FB8C5 /* CSSPrimitiveValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSPrimitiveValue.cpp; sourceTree = "<group>"; };
                A80E6CDC0A1989CA007FB8C5 /* CSSRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSRule.cpp; sourceTree = "<group>"; };
-               A80E6CDD0A1989CA007FB8C5 /* CSSBorderImageValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSBorderImageValue.h; sourceTree = "<group>"; };
                A80E6CDE0A1989CA007FB8C5 /* CSSInitialValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSInitialValue.h; sourceTree = "<group>"; };
                A80E6CDF0A1989CA007FB8C5 /* CSSRuleList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSRuleList.cpp; sourceTree = "<group>"; };
                A80E6CE10A1989CA007FB8C5 /* DashboardRegion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DashboardRegion.h; sourceTree = "<group>"; };
                E169825F1134636A00894115 /* ObjCRuntimeObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ObjCRuntimeObject.mm; sourceTree = "<group>"; };
                E1698263113467F300894115 /* JavaRuntimeObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JavaRuntimeObject.cpp; path = jsc/JavaRuntimeObject.cpp; sourceTree = "<group>"; };
                E16982671134680700894115 /* JavaRuntimeObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaRuntimeObject.h; path = jsc/JavaRuntimeObject.h; sourceTree = "<group>"; };
+               E16A84F714C85CCC002977DF /* CSSBorderImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSBorderImage.cpp; sourceTree = "<group>"; };
+               E16A84F814C85CCC002977DF /* CSSBorderImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSBorderImage.h; sourceTree = "<group>"; };
                E182568D0EF2B02D00933242 /* JSWorkerContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWorkerContext.cpp; sourceTree = "<group>"; };
                E182568E0EF2B02D00933242 /* JSWorkerContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWorkerContext.h; sourceTree = "<group>"; };
                E18258AB0EF3CD7000933242 /* JSWorkerContextCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWorkerContextCustom.cpp; sourceTree = "<group>"; };
                                930705C709E0C95F00B17FE4 /* Counter.idl */,
                                CAE9F90D146441F000C245B0 /* CSSAspectRatioValue.cpp */,
                                CAE9F90E146441F000C245B0 /* CSSAspectRatioValue.h */,
+                               E16A84F714C85CCC002977DF /* CSSBorderImage.cpp */,
+                               E16A84F814C85CCC002977DF /* CSSBorderImage.h */,
                                BC274B30140EBED800EADFA6 /* CSSBorderImageSliceValue.cpp */,
                                BC274B2E140EBEB200EADFA6 /* CSSBorderImageSliceValue.h */,
-                               A80E6CBB0A1989CA007FB8C5 /* CSSBorderImageValue.cpp */,
-                               A80E6CDD0A1989CA007FB8C5 /* CSSBorderImageValue.h */,
                                BC604A420DB5634E00204739 /* CSSCanvasValue.cpp */,
                                BC6049CB0DB560C200204739 /* CSSCanvasValue.h */,
                                E1EBBBD30AAC9B87001FE8E2 /* CSSCharsetRule.cpp */,
                                E169803D1133542D00894115 /* CRuntimeObject.h in Headers */,
                                975CA28B130365F800E99AD9 /* Crypto.h in Headers */,
                                CAE9F910146441F000C245B0 /* CSSAspectRatioValue.h in Headers */,
+                               E16A84FA14C85CCC002977DF /* CSSBorderImage.h in Headers */,
                                BC274B2F140EBEB200EADFA6 /* CSSBorderImageSliceValue.h in Headers */,
-                               A80E6D070A1989CA007FB8C5 /* CSSBorderImageValue.h in Headers */,
                                BC6049CC0DB560C200204739 /* CSSCanvasValue.h in Headers */,
                                A80E6CF90A1989CA007FB8C5 /* CSSCharsetRule.h in Headers */,
                                BCEA4790097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h in Headers */,
                                E16980491133644700894115 /* CRuntimeObject.cpp in Sources */,
                                975CA28A130365F800E99AD9 /* Crypto.cpp in Sources */,
                                CAE9F90F146441F000C245B0 /* CSSAspectRatioValue.cpp in Sources */,
+                               E16A84F914C85CCC002977DF /* CSSBorderImage.cpp in Sources */,
                                BC274B31140EBED800EADFA6 /* CSSBorderImageSliceValue.cpp in Sources */,
-                               A80E6CE50A1989CA007FB8C5 /* CSSBorderImageValue.cpp in Sources */,
                                BC604A430DB5634E00204739 /* CSSCanvasValue.cpp in Sources */,
                                E1EBBBD40AAC9B87001FE8E2 /* CSSCharsetRule.cpp in Sources */,
                                BCEA478F097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp in Sources */,
index 50901aa..436479d 100644 (file)
@@ -26,8 +26,8 @@
 // This all-in-one cpp file cuts down on template bloat to allow us to build our Windows release build.
  
 #include "CSSAspectRatioValue.cpp"
+#include "CSSBorderImage.cpp"
 #include "CSSBorderImageSliceValue.cpp"
-#include "CSSBorderImageValue.cpp"
 #include "CSSCanvasValue.cpp"
 #include "CSSCharsetRule.cpp"
 #include "CSSComputedStyleDeclaration.cpp"
diff --git a/Source/WebCore/css/CSSBorderImage.cpp b/Source/WebCore/css/CSSBorderImage.cpp
new file mode 100644 (file)
index 0000000..3b66c6b
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "CSSBorderImage.h"
+
+namespace WebCore {
+
+PassRefPtr<CSSValueList> createBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSValue> imageSlice, PassRefPtr<CSSValue> borderSlice,
+                                                PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat)
+{
+    RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+    list->append(image);
+
+    if (borderSlice || outset) {
+        RefPtr<CSSValueList> listSlash = CSSValueList::createSlashSeparated();
+        if (imageSlice)
+            listSlash->append(imageSlice);
+
+        if (borderSlice)
+            listSlash->append(borderSlice);
+
+        if (outset)
+            listSlash->append(outset);
+
+        list->append(listSlash);
+    } else if (imageSlice)
+        list->append(imageSlice);
+    if (repeat)
+        list->append(repeat);
+    return list.release();
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/css/CSSBorderImage.h b/Source/WebCore/css/CSSBorderImage.h
new file mode 100644 (file)
index 0000000..b0769f3
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef CSSBorderImage_h
+#define CSSBorderImage_h
+
+#include "CSSBorderImageSliceValue.h"
+#include "CSSValueList.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+PassRefPtr<CSSValueList> createBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSValue> imageSlice, PassRefPtr<CSSValue> borderSlice,
+                                                PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat);
+
+} // namespace WebCore
+
+#endif // CSSBorderImage_h
diff --git a/Source/WebCore/css/CSSBorderImageValue.cpp b/Source/WebCore/css/CSSBorderImageValue.cpp
deleted file mode 100644 (file)
index 846ea6d..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "CSSBorderImageValue.h"
-
-#include "PlatformString.h"
-#include "Rect.h"
-
-namespace WebCore {
-
-CSSBorderImageValue::CSSBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSBorderImageSliceValue> imageSlice,
-    PassRefPtr<CSSValue> borderSlice, PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat)
-    : CSSValue(BorderImageClass)
-    , m_image(image)
-    , m_imageSlice(imageSlice)
-    , m_borderSlice(borderSlice)
-    , m_outset(outset)
-    , m_repeat(repeat)
-{
-}
-
-String CSSBorderImageValue::customCssText() const
-{
-    // Image first.
-    String text;
-
-    if (m_image)
-        text += m_image->cssText();
-
-    // Now the slices.
-    if (m_imageSlice) {
-        if (!text.isEmpty())
-            text += " ";
-        text += m_imageSlice->cssText();
-    }
-
-    // Now the border widths.
-    if (m_borderSlice) {
-        text += " / ";
-        text += m_borderSlice->cssText();
-    }
-
-    if (m_outset) {
-        text += " / ";
-        text += m_outset->cssText();
-    }
-
-    if (m_repeat) {
-        // Now the keywords.
-        if (!text.isEmpty())
-            text += " ";
-        text += m_repeat->cssText();
-    }
-
-    return text;
-}
-
-void CSSBorderImageValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const CSSStyleSheet* styleSheet)
-{
-    m_image->addSubresourceStyleURLs(urls, styleSheet);
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/css/CSSBorderImageValue.h b/Source/WebCore/css/CSSBorderImageValue.h
deleted file mode 100644 (file)
index 675758c..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef CSSBorderImageValue_h
-#define CSSBorderImageValue_h
-
-#include "CSSBorderImageSliceValue.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefPtr.h>
-
-namespace WebCore {
-
-class Rect;
-
-class CSSBorderImageValue : public CSSValue {
-public:
-    static PassRefPtr<CSSBorderImageValue> create(PassRefPtr<CSSValue> image, PassRefPtr<CSSBorderImageSliceValue> imageSlice,
-        PassRefPtr<CSSValue> borderSlice, PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat)
-    {
-        return adoptRef(new CSSBorderImageValue(image, imageSlice, borderSlice, outset, repeat));
-    }
-
-    String customCssText() const;
-
-    CSSValue* imageValue() const { return m_image.get(); }
-
-    void addSubresourceStyleURLs(ListHashSet<KURL>&, const CSSStyleSheet*);
-
-    // The border image.
-    RefPtr<CSSValue> m_image;
-
-    // These four values are used to make "cuts" in the image.  They can be numbers
-    // or percentages.
-    RefPtr<CSSBorderImageSliceValue> m_imageSlice;
-
-    // These four values are used to make "cuts" in the border image drawing area.
-    // They can be numbers, percentages or lengths.
-    RefPtr<CSSValue> m_borderSlice;
-
-    // The outset values are used to inflate the border image drawing area.
-    RefPtr<CSSValue> m_outset;
-
-    // Values for how to handle the scaling/stretching/tiling of the image slices.
-    RefPtr<CSSValue> m_repeat;
-
-private:
-    CSSBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSBorderImageSliceValue>, PassRefPtr<CSSValue> borderSlice,
-        PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat);
-};
-
-} // namespace WebCore
-
-#endif // CSSBorderImageValue_h
index 7d47ed7..e5190df 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "AnimationController.h"
 #include "CSSAspectRatioValue.h"
-#include "CSSBorderImageValue.h"
+#include "CSSBorderImage.h"
 #include "CSSLineBoxContainValue.h"
 #include "CSSMutableStyleDeclaration.h"
 #include "CSSPrimitiveValue.h"
@@ -501,7 +501,7 @@ static PassRefPtr<CSSValue> valueForNinePieceImage(const NinePieceImage& image,
     // Create the repeat rules.
     RefPtr<CSSValue> repeat = valueForNinePieceImageRepeat(image, cssValuePool);
 
-    return CSSBorderImageValue::create(imageValue.release(), imageSlices.release(), borderSlices.release(), outset.release(), repeat);
+    return createBorderImageValue(imageValue, imageSlices, borderSlices, outset, repeat);
 }
 
 inline static PassRefPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(int value, const RenderStyle* style, CSSValuePool* cssValuePool)
index ae0befe..77b8ffb 100644 (file)
@@ -26,7 +26,7 @@
 #include "CSSParser.h"
 
 #include "CSSAspectRatioValue.h"
-#include "CSSBorderImageValue.h"
+#include "CSSBorderImage.h"
 #include "CSSCanvasValue.h"
 #include "CSSCharsetRule.h"
 #include "CSSCrossfadeValue.h"
@@ -5383,8 +5383,7 @@ struct BorderImageParseContext {
 
     PassRefPtr<CSSValue> commitBorderImage()
     {
-        // Make our new border image value now.
-        return CSSBorderImageValue::create(m_image, m_imageSlice, m_borderSlice, m_outset, m_repeat);
+        return createBorderImageValue(m_image, m_imageSlice, m_borderSlice, m_outset, m_repeat);
     }
 
     CSSValuePool* m_cssValuePool;
index a31e160..abf8932 100644 (file)
@@ -33,7 +33,7 @@
 #include "ContentData.h"
 #include "Counter.h"
 #include "CounterContent.h"
-#include "CSSBorderImageValue.h"
+#include "CSSBorderImage.h"
 #include "CSSCursorImageValue.h"
 #include "CSSFontFaceRule.h"
 #include "CSSFontSelector.h"
@@ -4319,11 +4319,11 @@ void CSSStyleSelector::mapAnimationTimingFunction(Animation* animation, CSSValue
 void CSSStyleSelector::mapNinePieceImage(CSSPropertyID property, CSSValue* value, NinePieceImage& image)
 {
     // If we're a primitive value, then we are "none" and don't need to alter the empty image at all.
-    if (!value || value->isPrimitiveValue() || !value->isBorderImageValue())
+    if (!value || value->isPrimitiveValue())
         return;
 
     // Retrieve the border image value.
-    CSSBorderImageValue* borderImage = static_cast<CSSBorderImageValue*>(value);
+    CSSValueList* borderImage = static_cast<CSSValueList*>(value);
 
     // Set the image (this kicks off the load).
     CSSPropertyID imageProperty;
@@ -4334,19 +4334,40 @@ void CSSStyleSelector::mapNinePieceImage(CSSPropertyID property, CSSValue* value
     else
         imageProperty = property;
 
-    if (CSSValue* imageValue = borderImage->imageValue())
+    if (CSSValue* imageValue = borderImage->item(0))
         image.setImage(styleImage(imageProperty, imageValue));
 
-    // Map in the image slices.
-    mapNinePieceImageSlice(borderImage->m_imageSlice.get(), image);
+    if (borderImage->item(1)) {
+        if (borderImage->item(1)->cssValueType() != CSSValue::CSS_VALUE_LIST) {
+            // Map in the image slices.
+            if (borderImage->item(1)) {
+                if (borderImage->item(1)->isBorderImageSliceValue()) {
+                    mapNinePieceImageSlice(borderImage->item(1), image);
+                     if (borderImage->item(2))
+                        // Set the appropriate rules for stretch/round/repeat of the slices
+                        mapNinePieceImageRepeat(borderImage->item(2), image);
+                } else
+                    // Set the appropriate rules for stretch/round/repeat of the slices
+                    mapNinePieceImageRepeat(borderImage->item(1), image);
+            }
+        } else {
+            CSSValueList* slashList = static_cast<CSSValueList*>(borderImage->item(1));
+            // Map in the image slices.
+            if (slashList->item(0) && slashList->item(0)->isBorderImageSliceValue())
+                mapNinePieceImageSlice(slashList->item(0), image);
+
+            // Map in the border slices.
+            if (slashList->item(1))
+                image.setBorderSlices(mapNinePieceImageQuad(slashList->item(1)));
 
-    // Map in the border slices.
-    if (borderImage->m_borderSlice)
-        image.setBorderSlices(mapNinePieceImageQuad(borderImage->m_borderSlice.get()));
+            // Map in the outset.
+            if (slashList->item(2))
+                image.setOutset(mapNinePieceImageQuad(slashList->item(2)));
 
-    // Map in the outset.
-    if (borderImage->m_outset)
-        image.setOutset(mapNinePieceImageQuad(borderImage->m_outset.get()));
+            // Set the appropriate rules for stretch/round/repeat of the slices
+            mapNinePieceImageRepeat(borderImage->item(2), image);
+        }
+    }
 
     if (property == CSSPropertyWebkitBorderImage) {
         // We have to preserve the legacy behavior of -webkit-border-image and make the border slices
@@ -4361,9 +4382,6 @@ void CSSStyleSelector::mapNinePieceImage(CSSPropertyID property, CSSValue* value
         if (image.borderSlices().left().isFixed())
             style()->setBorderLeftWidth(image.borderSlices().left().value());
     }
-
-    // Set the appropriate rules for stretch/round/repeat of the slices
-    mapNinePieceImageRepeat(borderImage->m_repeat.get(), image);
 }
 
 void CSSStyleSelector::mapNinePieceImageSlice(CSSValue* value, NinePieceImage& image)
index 711e4c5..0b88f55 100644 (file)
@@ -28,7 +28,6 @@
 #include "CSSValue.h"
 
 #include "CSSAspectRatioValue.h"
-#include "CSSBorderImageValue.h"
 #include "CSSBorderImageSliceValue.h"
 #include "CSSCanvasValue.h"
 #include "CSSCrossfadeValue.h"
@@ -89,8 +88,6 @@ void CSSValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const CSSStyleSh
         static_cast<CSSPrimitiveValue*>(this)->addSubresourceStyleURLs(urls, styleSheet);
     else if (isValueList())
         static_cast<CSSValueList*>(this)->addSubresourceStyleURLs(urls, styleSheet);
-    else if (classType() == BorderImageClass)
-        static_cast<CSSBorderImageValue*>(this)->addSubresourceStyleURLs(urls, styleSheet);
     else if (classType() == FontFaceSrcClass)
         static_cast<CSSFontFaceSrcValue*>(this)->addSubresourceStyleURLs(urls, styleSheet);
     else if (classType() == ReflectClass)
@@ -102,8 +99,6 @@ String CSSValue::cssText() const
     switch (classType()) {
     case AspectRatioClass:
         return static_cast<const CSSAspectRatioValue*>(this)->customCssText();
-    case BorderImageClass:
-        return static_cast<const CSSBorderImageValue*>(this)->customCssText();
     case BorderImageSliceClass:
         return static_cast<const CSSBorderImageSliceValue*>(this)->customCssText();
     case CanvasClass:
@@ -179,9 +174,6 @@ void CSSValue::destroy()
     case AspectRatioClass:
         delete static_cast<CSSAspectRatioValue*>(this);
         return;
-    case BorderImageClass:
-        delete static_cast<CSSBorderImageValue*>(this);
-        return;
     case BorderImageSliceClass:
         delete static_cast<CSSBorderImageSliceValue*>(this);
         return;
index fd5e6f5..2d33242 100644 (file)
@@ -60,7 +60,6 @@ public:
     bool isValueList() const { return m_classType >= ValueListClass; }
 
     bool isAspectRatioValue() const { return m_classType == AspectRatioClass; }
-    bool isBorderImageValue() const { return m_classType == BorderImageClass; }
     bool isBorderImageSliceValue() const { return m_classType == BorderImageSliceClass; }
     bool isCursorImageValue() const { return m_classType == CursorImageClass; }
     bool isFontFamilyValue() const { return m_classType == FontFamilyClass; }
@@ -113,7 +112,6 @@ protected:
 
         // Other class types.
         AspectRatioClass,
-        BorderImageClass,
         BorderImageSliceClass,
         FontFeatureClass,
         FontClass,