2007-10-08 Eric Seidel <eric@webkit.org>
authoroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2007 15:32:39 +0000 (15:32 +0000)
committeroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2007 15:32:39 +0000 (15:32 +0000)
        Reviewed by hyatt.

        Implement getComputedStyle support for SVG CSS values
        http://bugs.webkit.org/show_bug.cgi?id=15422

        This also unifies SVG and non-SVG CSS hash lookups. A unified hash
        solves correctness problems as well as offers improved speed.

        Test: svg/css/getComputedStyle-basic.xhtml

        * DerivedSources.make: unify SVG and non-SVG CSS hash files
        * WebCore.xcodeproj/project.pbxproj: remove old SVG CSS hash files
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::):
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): call getPropertyCSSValue
        * css/CSSComputedStyleDeclaration.h: add getPropertyCSSValue
        * css/CSSGrammar.y:
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseValue):
        * css/CSSStyleDeclaration.cpp:
        (WebCore::propertyID):
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * ksvg2/css/CSSPropertyNames.in: remove font-size-adjust
        * ksvg2/css/SVGCSSComputedStyleDeclaration.cpp: Added.
        (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): added.
        * ksvg2/css/SVGCSSParser.cpp:
        (WebCore::CSSParser::parseSVGValue):
        * ksvg2/css/SVGCSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applySVGProperty):
        * ksvg2/scripts/cssmakeprops: Removed.
        * ksvg2/scripts/cssmakevalues: Removed.
        * ksvg2/svg/SVGAnimationElement.cpp:
        * ksvg2/svg/SVGStyledElement.cpp:
        (WebCore::mapAttributeToCSSProperty):
        (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName): remove font-size-adjust

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

20 files changed:
LayoutTests/ChangeLog
LayoutTests/svg/css/getComputedStyle-basic-expected.txt [new file with mode: 0644]
LayoutTests/svg/css/getComputedStyle-basic.xhtml [new file with mode: 0644]
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/css/CSSComputedStyleDeclaration.cpp
WebCore/css/CSSComputedStyleDeclaration.h
WebCore/css/CSSGrammar.y
WebCore/css/CSSParser.cpp
WebCore/css/CSSStyleDeclaration.cpp
WebCore/css/CSSStyleSelector.cpp
WebCore/ksvg2/css/CSSPropertyNames.in
WebCore/ksvg2/css/SVGCSSComputedStyleDeclaration.cpp [new file with mode: 0644]
WebCore/ksvg2/css/SVGCSSParser.cpp
WebCore/ksvg2/css/SVGCSSStyleSelector.cpp
WebCore/ksvg2/scripts/cssmakeprops [deleted file]
WebCore/ksvg2/scripts/cssmakevalues [deleted file]
WebCore/ksvg2/svg/SVGAnimationElement.cpp
WebCore/ksvg2/svg/SVGStyledElement.cpp

index ca652e1..8d5bc2d 100644 (file)
@@ -1,3 +1,11 @@
+2007-10-08  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by hyatt.
+
+        * svg/css: Added.
+        * svg/css/getComputedStyle-basic-expected.txt: Added.
+        * svg/css/getComputedStyle-basic.xhtml: Added.
+
 2007-10-08  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Steve Falkenburg.
diff --git a/LayoutTests/svg/css/getComputedStyle-basic-expected.txt b/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
new file mode 100644 (file)
index 0000000..8fe16ce
--- /dev/null
@@ -0,0 +1,669 @@
+rect: style.getPropertyValue(background-attachment) : scroll
+rect: style.getPropertyCSSValue(background-attachment) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(background-color) : rgba(0, 0, 0, 0)
+rect: style.getPropertyCSSValue(background-color) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(background-image) : none
+rect: style.getPropertyCSSValue(background-image) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(background-position) : 0% 0%
+rect: style.getPropertyCSSValue(background-position) : [object CSSValueList]
+rect: style.getPropertyValue(background-repeat) : repeat
+rect: style.getPropertyCSSValue(background-repeat) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(border-bottom-color) : rgb(0, 0, 0)
+rect: style.getPropertyCSSValue(border-bottom-color) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(border-bottom-style) : none
+rect: style.getPropertyCSSValue(border-bottom-style) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(border-bottom-width) : 0px
+rect: style.getPropertyCSSValue(border-bottom-width) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(border-collapse) : separate
+rect: style.getPropertyCSSValue(border-collapse) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(border-left-color) : rgb(0, 0, 0)
+rect: style.getPropertyCSSValue(border-left-color) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(border-left-style) : none
+rect: style.getPropertyCSSValue(border-left-style) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(border-left-width) : 0px
+rect: style.getPropertyCSSValue(border-left-width) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(border-right-color) : rgb(0, 0, 0)
+rect: style.getPropertyCSSValue(border-right-color) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(border-right-style) : none
+rect: style.getPropertyCSSValue(border-right-style) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(border-right-width) : 0px
+rect: style.getPropertyCSSValue(border-right-width) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(border-top-color) : rgb(0, 0, 0)
+rect: style.getPropertyCSSValue(border-top-color) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(border-top-style) : none
+rect: style.getPropertyCSSValue(border-top-style) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(border-top-width) : 0px
+rect: style.getPropertyCSSValue(border-top-width) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(bottom) : auto
+rect: style.getPropertyCSSValue(bottom) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(caption-side) : top
+rect: style.getPropertyCSSValue(caption-side) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(clear) : none
+rect: style.getPropertyCSSValue(clear) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(color) : rgb(0, 0, 0)
+rect: style.getPropertyCSSValue(color) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(cursor) : auto
+rect: style.getPropertyCSSValue(cursor) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(direction) : ltr
+rect: style.getPropertyCSSValue(direction) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(display) : inline
+rect: style.getPropertyCSSValue(display) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(empty-cells) : show
+rect: style.getPropertyCSSValue(empty-cells) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(float) : none
+rect: style.getPropertyCSSValue(float) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(font-family) : Times
+rect: style.getPropertyCSSValue(font-family) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(font-size) : 16px
+rect: style.getPropertyCSSValue(font-size) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(font-style) : normal
+rect: style.getPropertyCSSValue(font-style) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(font-variant) : normal
+rect: style.getPropertyCSSValue(font-variant) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(font-weight) : normal
+rect: style.getPropertyCSSValue(font-weight) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(height) : 0px
+rect: style.getPropertyCSSValue(height) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(left) : auto
+rect: style.getPropertyCSSValue(left) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(letter-spacing) : normal
+rect: style.getPropertyCSSValue(letter-spacing) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(line-height) : normal
+rect: style.getPropertyCSSValue(line-height) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(list-style-image) : none
+rect: style.getPropertyCSSValue(list-style-image) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(list-style-position) : outside
+rect: style.getPropertyCSSValue(list-style-position) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(list-style-type) : disc
+rect: style.getPropertyCSSValue(list-style-type) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(margin-bottom) : 0px
+rect: style.getPropertyCSSValue(margin-bottom) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(margin-left) : 0px
+rect: style.getPropertyCSSValue(margin-left) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(margin-right) : 0px
+rect: style.getPropertyCSSValue(margin-right) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(margin-top) : 0px
+rect: style.getPropertyCSSValue(margin-top) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(max-height) : none
+rect: style.getPropertyCSSValue(max-height) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(max-width) : none
+rect: style.getPropertyCSSValue(max-width) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(min-height) : 0px
+rect: style.getPropertyCSSValue(min-height) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(min-width) : 0px
+rect: style.getPropertyCSSValue(min-width) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(opacity) : 1
+rect: style.getPropertyCSSValue(opacity) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(orphans) : 2
+rect: style.getPropertyCSSValue(orphans) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(outline-color) : rgb(0, 0, 0)
+rect: style.getPropertyCSSValue(outline-color) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(outline-style) : none
+rect: style.getPropertyCSSValue(outline-style) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(outline-width) : 0px
+rect: style.getPropertyCSSValue(outline-width) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(overflow-x) : visible
+rect: style.getPropertyCSSValue(overflow-x) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(overflow-y) : visible
+rect: style.getPropertyCSSValue(overflow-y) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(padding-bottom) : 0px
+rect: style.getPropertyCSSValue(padding-bottom) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(padding-left) : 0px
+rect: style.getPropertyCSSValue(padding-left) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(padding-right) : 0px
+rect: style.getPropertyCSSValue(padding-right) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(padding-top) : 0px
+rect: style.getPropertyCSSValue(padding-top) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(page-break-after) : auto
+rect: style.getPropertyCSSValue(page-break-after) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(page-break-before) : auto
+rect: style.getPropertyCSSValue(page-break-before) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(page-break-inside) : auto
+rect: style.getPropertyCSSValue(page-break-inside) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(position) : static
+rect: style.getPropertyCSSValue(position) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(resize) : none
+rect: style.getPropertyCSSValue(resize) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(right) : auto
+rect: style.getPropertyCSSValue(right) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(table-layout) : auto
+rect: style.getPropertyCSSValue(table-layout) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(text-align) : auto
+rect: style.getPropertyCSSValue(text-align) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(text-decoration) : none
+rect: style.getPropertyCSSValue(text-decoration) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(text-indent) : 0px
+rect: style.getPropertyCSSValue(text-indent) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(text-shadow) : none
+rect: style.getPropertyCSSValue(text-shadow) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(text-transform) : none
+rect: style.getPropertyCSSValue(text-transform) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(top) : auto
+rect: style.getPropertyCSSValue(top) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(unicode-bidi) : normal
+rect: style.getPropertyCSSValue(unicode-bidi) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(vertical-align) : baseline
+rect: style.getPropertyCSSValue(vertical-align) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(visibility) : visible
+rect: style.getPropertyCSSValue(visibility) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(white-space) : normal
+rect: style.getPropertyCSSValue(white-space) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(widows) : 2
+rect: style.getPropertyCSSValue(widows) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(width) : 0px
+rect: style.getPropertyCSSValue(width) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(word-spacing) : 0px
+rect: style.getPropertyCSSValue(word-spacing) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(word-wrap) : normal
+rect: style.getPropertyCSSValue(word-wrap) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(z-index) : auto
+rect: style.getPropertyCSSValue(z-index) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-appearance) : none
+rect: style.getPropertyCSSValue(-webkit-appearance) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-background-clip) : border
+rect: style.getPropertyCSSValue(-webkit-background-clip) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-background-composite) : source-over
+rect: style.getPropertyCSSValue(-webkit-background-composite) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-background-origin) : padding
+rect: style.getPropertyCSSValue(-webkit-background-origin) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-background-size) : auto auto
+rect: style.getPropertyCSSValue(-webkit-background-size) : [object CSSValueList]
+rect: style.getPropertyValue(-webkit-border-fit) : border
+rect: style.getPropertyCSSValue(-webkit-border-fit) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-border-horizontal-spacing) : 0px
+rect: style.getPropertyCSSValue(-webkit-border-horizontal-spacing) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-border-vertical-spacing) : 0px
+rect: style.getPropertyCSSValue(-webkit-border-vertical-spacing) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-box-align) : stretch
+rect: style.getPropertyCSSValue(-webkit-box-align) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-box-direction) : normal
+rect: style.getPropertyCSSValue(-webkit-box-direction) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-box-flex) : 0
+rect: style.getPropertyCSSValue(-webkit-box-flex) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-box-flex-group) : 1
+rect: style.getPropertyCSSValue(-webkit-box-flex-group) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-box-lines) : single
+rect: style.getPropertyCSSValue(-webkit-box-lines) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-box-ordinal-group) : 1
+rect: style.getPropertyCSSValue(-webkit-box-ordinal-group) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-box-orient) : horizontal
+rect: style.getPropertyCSSValue(-webkit-box-orient) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-box-pack) : start
+rect: style.getPropertyCSSValue(-webkit-box-pack) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-box-shadow) : none
+rect: style.getPropertyCSSValue(-webkit-box-shadow) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-box-sizing) : content-box
+rect: style.getPropertyCSSValue(-webkit-box-sizing) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-column-break-after) : auto
+rect: style.getPropertyCSSValue(-webkit-column-break-after) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-column-break-before) : auto
+rect: style.getPropertyCSSValue(-webkit-column-break-before) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-column-break-inside) : auto
+rect: style.getPropertyCSSValue(-webkit-column-break-inside) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-column-count) : auto
+rect: style.getPropertyCSSValue(-webkit-column-count) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-column-gap) : normal
+rect: style.getPropertyCSSValue(-webkit-column-gap) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-column-rule-color) : rgb(0, 0, 0)
+rect: style.getPropertyCSSValue(-webkit-column-rule-color) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-column-rule-style) : none
+rect: style.getPropertyCSSValue(-webkit-column-rule-style) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-column-rule-width) : 0px
+rect: style.getPropertyCSSValue(-webkit-column-rule-width) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-column-width) : auto
+rect: style.getPropertyCSSValue(-webkit-column-width) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-highlight) : none
+rect: style.getPropertyCSSValue(-webkit-highlight) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-line-break) : normal
+rect: style.getPropertyCSSValue(-webkit-line-break) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-line-clamp) : none
+rect: style.getPropertyCSSValue(-webkit-line-clamp) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-margin-bottom-collapse) : collapse
+rect: style.getPropertyCSSValue(-webkit-margin-bottom-collapse) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-margin-top-collapse) : collapse
+rect: style.getPropertyCSSValue(-webkit-margin-top-collapse) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-marquee-direction) : auto
+rect: style.getPropertyCSSValue(-webkit-marquee-direction) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-marquee-increment) : 6px
+rect: style.getPropertyCSSValue(-webkit-marquee-increment) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-marquee-repetition) : infinite
+rect: style.getPropertyCSSValue(-webkit-marquee-repetition) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-marquee-style) : scroll
+rect: style.getPropertyCSSValue(-webkit-marquee-style) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-nbsp-mode) : normal
+rect: style.getPropertyCSSValue(-webkit-nbsp-mode) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-rtl-ordering) : logical
+rect: style.getPropertyCSSValue(-webkit-rtl-ordering) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-text-decorations-in-effect) : none
+rect: style.getPropertyCSSValue(-webkit-text-decorations-in-effect) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-text-fill-color) : rgb(0, 0, 0)
+rect: style.getPropertyCSSValue(-webkit-text-fill-color) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-text-security) : none
+rect: style.getPropertyCSSValue(-webkit-text-security) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-text-stroke-color) : rgb(0, 0, 0)
+rect: style.getPropertyCSSValue(-webkit-text-stroke-color) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-text-stroke-width) : 0
+rect: style.getPropertyCSSValue(-webkit-text-stroke-width) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-user-drag) : auto
+rect: style.getPropertyCSSValue(-webkit-user-drag) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-user-modify) : read-only
+rect: style.getPropertyCSSValue(-webkit-user-modify) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-user-select) : text
+rect: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-dashboard-region) : null
+rect: style.getPropertyCSSValue(-webkit-dashboard-region) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-border-bottom-left-radius) : 0px
+rect: style.getPropertyCSSValue(-webkit-border-bottom-left-radius) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-border-bottom-right-radius) : 0px
+rect: style.getPropertyCSSValue(-webkit-border-bottom-right-radius) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-border-top-left-radius) : 0px
+rect: style.getPropertyCSSValue(-webkit-border-top-left-radius) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-border-top-right-radius) : 0px
+rect: style.getPropertyCSSValue(-webkit-border-top-right-radius) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(clip-path) : none
+rect: style.getPropertyCSSValue(clip-path) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(clip-rule) : nonzero
+rect: style.getPropertyCSSValue(clip-rule) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(mask) : none
+rect: style.getPropertyCSSValue(mask) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(filter) : none
+rect: style.getPropertyCSSValue(filter) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(flood-color) : rgb(0, 0, 0)
+rect: style.getPropertyCSSValue(flood-color) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(flood-opacity) : 1
+rect: style.getPropertyCSSValue(flood-opacity) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(lighting-color) : rgb(255, 255, 255)
+rect: style.getPropertyCSSValue(lighting-color) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(stop-color) : rgb(0, 0, 0)
+rect: style.getPropertyCSSValue(stop-color) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(stop-opacity) : 1
+rect: style.getPropertyCSSValue(stop-opacity) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(pointer-events) : visiblepainted
+rect: style.getPropertyCSSValue(pointer-events) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(color-interpolation) : srgb
+rect: style.getPropertyCSSValue(color-interpolation) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(color-interpolation-filters) : linearrgb
+rect: style.getPropertyCSSValue(color-interpolation-filters) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(color-rendering) : auto
+rect: style.getPropertyCSSValue(color-rendering) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(fill) : #0000FF
+rect: style.getPropertyCSSValue(fill) : [object SVGPaint]
+rect: style.getPropertyValue(fill-opacity) : 1
+rect: style.getPropertyCSSValue(fill-opacity) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(fill-rule) : nonzero
+rect: style.getPropertyCSSValue(fill-rule) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(image-rendering) : auto
+rect: style.getPropertyCSSValue(image-rendering) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(marker-end) : none
+rect: style.getPropertyCSSValue(marker-end) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(marker-mid) : none
+rect: style.getPropertyCSSValue(marker-mid) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(marker-start) : none
+rect: style.getPropertyCSSValue(marker-start) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(shape-rendering) : auto
+rect: style.getPropertyCSSValue(shape-rendering) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(stroke) : #FFA500
+rect: style.getPropertyCSSValue(stroke) : [object SVGPaint]
+rect: style.getPropertyValue(stroke-dasharray) : 
+rect: style.getPropertyCSSValue(stroke-dasharray) : null
+rect: style.getPropertyValue(stroke-dashoffset) : 
+rect: style.getPropertyCSSValue(stroke-dashoffset) : null
+rect: style.getPropertyValue(stroke-linecap) : butt
+rect: style.getPropertyCSSValue(stroke-linecap) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(stroke-linejoin) : miter
+rect: style.getPropertyCSSValue(stroke-linejoin) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(stroke-miterlimit) : 4
+rect: style.getPropertyCSSValue(stroke-miterlimit) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(stroke-opacity) : 1
+rect: style.getPropertyCSSValue(stroke-opacity) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(stroke-width) : 2px
+rect: style.getPropertyCSSValue(stroke-width) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(text-rendering) : auto
+rect: style.getPropertyCSSValue(text-rendering) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(alignment-baseline) : auto
+rect: style.getPropertyCSSValue(alignment-baseline) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(baseline-shift) : baseline
+rect: style.getPropertyCSSValue(baseline-shift) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(dominant-baseline) : auto
+rect: style.getPropertyCSSValue(dominant-baseline) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(kerning) : 
+rect: style.getPropertyCSSValue(kerning) : null
+rect: style.getPropertyValue(text-anchor) : start
+rect: style.getPropertyCSSValue(text-anchor) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(writing-mode) : lr-tb
+rect: style.getPropertyCSSValue(writing-mode) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(background-attachment) : scroll
+g: style.getPropertyCSSValue(background-attachment) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(background-color) : rgba(0, 0, 0, 0)
+g: style.getPropertyCSSValue(background-color) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(background-image) : none
+g: style.getPropertyCSSValue(background-image) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(background-position) : 0% 0%
+g: style.getPropertyCSSValue(background-position) : [object CSSValueList]
+g: style.getPropertyValue(background-repeat) : repeat
+g: style.getPropertyCSSValue(background-repeat) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(border-bottom-color) : rgb(0, 0, 0)
+g: style.getPropertyCSSValue(border-bottom-color) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(border-bottom-style) : none
+g: style.getPropertyCSSValue(border-bottom-style) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(border-bottom-width) : 0px
+g: style.getPropertyCSSValue(border-bottom-width) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(border-collapse) : separate
+g: style.getPropertyCSSValue(border-collapse) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(border-left-color) : rgb(0, 0, 0)
+g: style.getPropertyCSSValue(border-left-color) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(border-left-style) : none
+g: style.getPropertyCSSValue(border-left-style) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(border-left-width) : 0px
+g: style.getPropertyCSSValue(border-left-width) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(border-right-color) : rgb(0, 0, 0)
+g: style.getPropertyCSSValue(border-right-color) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(border-right-style) : none
+g: style.getPropertyCSSValue(border-right-style) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(border-right-width) : 0px
+g: style.getPropertyCSSValue(border-right-width) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(border-top-color) : rgb(0, 0, 0)
+g: style.getPropertyCSSValue(border-top-color) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(border-top-style) : none
+g: style.getPropertyCSSValue(border-top-style) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(border-top-width) : 0px
+g: style.getPropertyCSSValue(border-top-width) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(bottom) : auto
+g: style.getPropertyCSSValue(bottom) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(caption-side) : top
+g: style.getPropertyCSSValue(caption-side) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(clear) : none
+g: style.getPropertyCSSValue(clear) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(color) : rgb(0, 0, 0)
+g: style.getPropertyCSSValue(color) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(cursor) : auto
+g: style.getPropertyCSSValue(cursor) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(direction) : ltr
+g: style.getPropertyCSSValue(direction) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(display) : inline
+g: style.getPropertyCSSValue(display) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(empty-cells) : show
+g: style.getPropertyCSSValue(empty-cells) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(float) : none
+g: style.getPropertyCSSValue(float) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(font-family) : Times
+g: style.getPropertyCSSValue(font-family) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(font-size) : 16px
+g: style.getPropertyCSSValue(font-size) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(font-style) : normal
+g: style.getPropertyCSSValue(font-style) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(font-variant) : normal
+g: style.getPropertyCSSValue(font-variant) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(font-weight) : normal
+g: style.getPropertyCSSValue(font-weight) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(height) : 0px
+g: style.getPropertyCSSValue(height) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(left) : auto
+g: style.getPropertyCSSValue(left) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(letter-spacing) : normal
+g: style.getPropertyCSSValue(letter-spacing) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(line-height) : normal
+g: style.getPropertyCSSValue(line-height) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(list-style-image) : none
+g: style.getPropertyCSSValue(list-style-image) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(list-style-position) : outside
+g: style.getPropertyCSSValue(list-style-position) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(list-style-type) : disc
+g: style.getPropertyCSSValue(list-style-type) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(margin-bottom) : 0px
+g: style.getPropertyCSSValue(margin-bottom) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(margin-left) : 0px
+g: style.getPropertyCSSValue(margin-left) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(margin-right) : 0px
+g: style.getPropertyCSSValue(margin-right) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(margin-top) : 0px
+g: style.getPropertyCSSValue(margin-top) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(max-height) : none
+g: style.getPropertyCSSValue(max-height) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(max-width) : none
+g: style.getPropertyCSSValue(max-width) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(min-height) : 0px
+g: style.getPropertyCSSValue(min-height) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(min-width) : 0px
+g: style.getPropertyCSSValue(min-width) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(opacity) : 1
+g: style.getPropertyCSSValue(opacity) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(orphans) : 2
+g: style.getPropertyCSSValue(orphans) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(outline-color) : rgb(0, 0, 0)
+g: style.getPropertyCSSValue(outline-color) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(outline-style) : none
+g: style.getPropertyCSSValue(outline-style) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(outline-width) : 0px
+g: style.getPropertyCSSValue(outline-width) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(overflow-x) : visible
+g: style.getPropertyCSSValue(overflow-x) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(overflow-y) : visible
+g: style.getPropertyCSSValue(overflow-y) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(padding-bottom) : 0px
+g: style.getPropertyCSSValue(padding-bottom) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(padding-left) : 0px
+g: style.getPropertyCSSValue(padding-left) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(padding-right) : 0px
+g: style.getPropertyCSSValue(padding-right) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(padding-top) : 0px
+g: style.getPropertyCSSValue(padding-top) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(page-break-after) : auto
+g: style.getPropertyCSSValue(page-break-after) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(page-break-before) : auto
+g: style.getPropertyCSSValue(page-break-before) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(page-break-inside) : auto
+g: style.getPropertyCSSValue(page-break-inside) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(position) : static
+g: style.getPropertyCSSValue(position) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(resize) : none
+g: style.getPropertyCSSValue(resize) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(right) : auto
+g: style.getPropertyCSSValue(right) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(table-layout) : auto
+g: style.getPropertyCSSValue(table-layout) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(text-align) : auto
+g: style.getPropertyCSSValue(text-align) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(text-decoration) : none
+g: style.getPropertyCSSValue(text-decoration) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(text-indent) : 0px
+g: style.getPropertyCSSValue(text-indent) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(text-shadow) : none
+g: style.getPropertyCSSValue(text-shadow) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(text-transform) : none
+g: style.getPropertyCSSValue(text-transform) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(top) : auto
+g: style.getPropertyCSSValue(top) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(unicode-bidi) : normal
+g: style.getPropertyCSSValue(unicode-bidi) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(vertical-align) : baseline
+g: style.getPropertyCSSValue(vertical-align) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(visibility) : visible
+g: style.getPropertyCSSValue(visibility) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(white-space) : normal
+g: style.getPropertyCSSValue(white-space) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(widows) : 2
+g: style.getPropertyCSSValue(widows) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(width) : 0px
+g: style.getPropertyCSSValue(width) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(word-spacing) : 0px
+g: style.getPropertyCSSValue(word-spacing) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(word-wrap) : normal
+g: style.getPropertyCSSValue(word-wrap) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(z-index) : auto
+g: style.getPropertyCSSValue(z-index) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-appearance) : none
+g: style.getPropertyCSSValue(-webkit-appearance) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-background-clip) : border
+g: style.getPropertyCSSValue(-webkit-background-clip) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-background-composite) : source-over
+g: style.getPropertyCSSValue(-webkit-background-composite) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-background-origin) : padding
+g: style.getPropertyCSSValue(-webkit-background-origin) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-background-size) : auto auto
+g: style.getPropertyCSSValue(-webkit-background-size) : [object CSSValueList]
+g: style.getPropertyValue(-webkit-border-fit) : border
+g: style.getPropertyCSSValue(-webkit-border-fit) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-border-horizontal-spacing) : 0px
+g: style.getPropertyCSSValue(-webkit-border-horizontal-spacing) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-border-vertical-spacing) : 0px
+g: style.getPropertyCSSValue(-webkit-border-vertical-spacing) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-box-align) : stretch
+g: style.getPropertyCSSValue(-webkit-box-align) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-box-direction) : normal
+g: style.getPropertyCSSValue(-webkit-box-direction) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-box-flex) : 0
+g: style.getPropertyCSSValue(-webkit-box-flex) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-box-flex-group) : 1
+g: style.getPropertyCSSValue(-webkit-box-flex-group) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-box-lines) : single
+g: style.getPropertyCSSValue(-webkit-box-lines) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-box-ordinal-group) : 1
+g: style.getPropertyCSSValue(-webkit-box-ordinal-group) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-box-orient) : horizontal
+g: style.getPropertyCSSValue(-webkit-box-orient) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-box-pack) : start
+g: style.getPropertyCSSValue(-webkit-box-pack) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-box-shadow) : none
+g: style.getPropertyCSSValue(-webkit-box-shadow) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-box-sizing) : content-box
+g: style.getPropertyCSSValue(-webkit-box-sizing) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-column-break-after) : auto
+g: style.getPropertyCSSValue(-webkit-column-break-after) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-column-break-before) : auto
+g: style.getPropertyCSSValue(-webkit-column-break-before) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-column-break-inside) : auto
+g: style.getPropertyCSSValue(-webkit-column-break-inside) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-column-count) : auto
+g: style.getPropertyCSSValue(-webkit-column-count) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-column-gap) : normal
+g: style.getPropertyCSSValue(-webkit-column-gap) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-column-rule-color) : rgb(0, 0, 0)
+g: style.getPropertyCSSValue(-webkit-column-rule-color) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-column-rule-style) : none
+g: style.getPropertyCSSValue(-webkit-column-rule-style) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-column-rule-width) : 0px
+g: style.getPropertyCSSValue(-webkit-column-rule-width) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-column-width) : auto
+g: style.getPropertyCSSValue(-webkit-column-width) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-highlight) : none
+g: style.getPropertyCSSValue(-webkit-highlight) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-line-break) : normal
+g: style.getPropertyCSSValue(-webkit-line-break) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-line-clamp) : none
+g: style.getPropertyCSSValue(-webkit-line-clamp) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-margin-bottom-collapse) : collapse
+g: style.getPropertyCSSValue(-webkit-margin-bottom-collapse) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-margin-top-collapse) : collapse
+g: style.getPropertyCSSValue(-webkit-margin-top-collapse) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-marquee-direction) : auto
+g: style.getPropertyCSSValue(-webkit-marquee-direction) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-marquee-increment) : 6px
+g: style.getPropertyCSSValue(-webkit-marquee-increment) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-marquee-repetition) : infinite
+g: style.getPropertyCSSValue(-webkit-marquee-repetition) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-marquee-style) : scroll
+g: style.getPropertyCSSValue(-webkit-marquee-style) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-nbsp-mode) : normal
+g: style.getPropertyCSSValue(-webkit-nbsp-mode) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-rtl-ordering) : logical
+g: style.getPropertyCSSValue(-webkit-rtl-ordering) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-text-decorations-in-effect) : none
+g: style.getPropertyCSSValue(-webkit-text-decorations-in-effect) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-text-fill-color) : rgb(0, 0, 0)
+g: style.getPropertyCSSValue(-webkit-text-fill-color) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-text-security) : none
+g: style.getPropertyCSSValue(-webkit-text-security) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-text-stroke-color) : rgb(0, 0, 0)
+g: style.getPropertyCSSValue(-webkit-text-stroke-color) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-text-stroke-width) : 0
+g: style.getPropertyCSSValue(-webkit-text-stroke-width) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-user-drag) : auto
+g: style.getPropertyCSSValue(-webkit-user-drag) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-user-modify) : read-only
+g: style.getPropertyCSSValue(-webkit-user-modify) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-user-select) : text
+g: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-dashboard-region) : null
+g: style.getPropertyCSSValue(-webkit-dashboard-region) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-border-bottom-left-radius) : 0px
+g: style.getPropertyCSSValue(-webkit-border-bottom-left-radius) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-border-bottom-right-radius) : 0px
+g: style.getPropertyCSSValue(-webkit-border-bottom-right-radius) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-border-top-left-radius) : 0px
+g: style.getPropertyCSSValue(-webkit-border-top-left-radius) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-border-top-right-radius) : 0px
+g: style.getPropertyCSSValue(-webkit-border-top-right-radius) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(clip-path) : none
+g: style.getPropertyCSSValue(clip-path) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(clip-rule) : nonzero
+g: style.getPropertyCSSValue(clip-rule) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(mask) : none
+g: style.getPropertyCSSValue(mask) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(filter) : none
+g: style.getPropertyCSSValue(filter) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(flood-color) : rgb(0, 0, 0)
+g: style.getPropertyCSSValue(flood-color) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(flood-opacity) : 1
+g: style.getPropertyCSSValue(flood-opacity) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(lighting-color) : rgb(255, 255, 255)
+g: style.getPropertyCSSValue(lighting-color) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(stop-color) : rgb(0, 0, 0)
+g: style.getPropertyCSSValue(stop-color) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(stop-opacity) : 1
+g: style.getPropertyCSSValue(stop-opacity) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(pointer-events) : visiblepainted
+g: style.getPropertyCSSValue(pointer-events) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(color-interpolation) : srgb
+g: style.getPropertyCSSValue(color-interpolation) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(color-interpolation-filters) : linearrgb
+g: style.getPropertyCSSValue(color-interpolation-filters) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(color-rendering) : auto
+g: style.getPropertyCSSValue(color-rendering) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(fill) : #000000
+g: style.getPropertyCSSValue(fill) : [object SVGPaint]
+g: style.getPropertyValue(fill-opacity) : 1
+g: style.getPropertyCSSValue(fill-opacity) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(fill-rule) : nonzero
+g: style.getPropertyCSSValue(fill-rule) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(image-rendering) : auto
+g: style.getPropertyCSSValue(image-rendering) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(marker-end) : none
+g: style.getPropertyCSSValue(marker-end) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(marker-mid) : none
+g: style.getPropertyCSSValue(marker-mid) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(marker-start) : none
+g: style.getPropertyCSSValue(marker-start) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(shape-rendering) : auto
+g: style.getPropertyCSSValue(shape-rendering) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(stroke) : #FFA500
+g: style.getPropertyCSSValue(stroke) : [object SVGPaint]
+g: style.getPropertyValue(stroke-dasharray) : 
+g: style.getPropertyCSSValue(stroke-dasharray) : null
+g: style.getPropertyValue(stroke-dashoffset) : 
+g: style.getPropertyCSSValue(stroke-dashoffset) : null
+g: style.getPropertyValue(stroke-linecap) : butt
+g: style.getPropertyCSSValue(stroke-linecap) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(stroke-linejoin) : miter
+g: style.getPropertyCSSValue(stroke-linejoin) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(stroke-miterlimit) : 4
+g: style.getPropertyCSSValue(stroke-miterlimit) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(stroke-opacity) : 1
+g: style.getPropertyCSSValue(stroke-opacity) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(stroke-width) : 2px
+g: style.getPropertyCSSValue(stroke-width) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(text-rendering) : auto
+g: style.getPropertyCSSValue(text-rendering) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(alignment-baseline) : auto
+g: style.getPropertyCSSValue(alignment-baseline) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(baseline-shift) : baseline
+g: style.getPropertyCSSValue(baseline-shift) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(dominant-baseline) : auto
+g: style.getPropertyCSSValue(dominant-baseline) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(kerning) : 
+g: style.getPropertyCSSValue(kerning) : null
+g: style.getPropertyValue(text-anchor) : start
+g: style.getPropertyCSSValue(text-anchor) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(writing-mode) : lr-tb
+g: style.getPropertyCSSValue(writing-mode) : [object CSSPrimitiveValue]
+
diff --git a/LayoutTests/svg/css/getComputedStyle-basic.xhtml b/LayoutTests/svg/css/getComputedStyle-basic.xhtml
new file mode 100644 (file)
index 0000000..6a709d6
--- /dev/null
@@ -0,0 +1,37 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <body>
+    <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+      <g id="g" stroke="orange" stroke-width="2px">
+        <rect id="rect" width="100" height="100" fill="blue" />
+      </g>
+    </svg>
+    <div id="log"></div>
+    <script><![CDATA[
+      if (window.layoutTestController)
+          layoutTestController.dumpAsText();
+
+      function debugLog(s) {
+        var logDiv = document.getElementById("log");
+        logDiv.appendChild(document.createTextNode(s));
+        logDiv.appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "br"));
+      }
+
+      function printStyle(elementId) {
+        var element = document.getElementById(elementId);
+        var style = document.defaultView.getComputedStyle(element);
+      
+        for (var x = 0; x < style.length; x++) {
+          var name = style.item(x);
+          var value = style.getPropertyValue(name);
+          var cssValue = style.getPropertyCSSValue(name);
+  
+          debugLog(elementId + ": style.getPropertyValue(" + name + ") : " + value);
+          debugLog(elementId + ": style.getPropertyCSSValue(" + name + ") : " + cssValue);
+        }
+      }
+      
+      printStyle("rect");
+      printStyle("g");
+    ]]></script>
+  </body>
+</html>
index ad24b9d..18cfe9d 100644 (file)
@@ -1,3 +1,42 @@
+2007-10-08  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by hyatt.
+
+        Implement getComputedStyle support for SVG CSS values
+        http://bugs.webkit.org/show_bug.cgi?id=15422
+        
+        This also unifies SVG and non-SVG CSS hash lookups. A unified hash
+        solves correctness problems as well as offers improved speed.
+        
+        Test: svg/css/getComputedStyle-basic.xhtml
+
+        * DerivedSources.make: unify SVG and non-SVG CSS hash files
+        * WebCore.xcodeproj/project.pbxproj: remove old SVG CSS hash files
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::):
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): call getPropertyCSSValue
+        * css/CSSComputedStyleDeclaration.h: add getPropertyCSSValue
+        * css/CSSGrammar.y:
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        * css/CSSStyleDeclaration.cpp:
+        (WebCore::propertyID):
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::applyProperty):
+        * ksvg2/css/CSSPropertyNames.in: remove font-size-adjust
+        * ksvg2/css/SVGCSSComputedStyleDeclaration.cpp: Added.
+        (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): added.
+        * ksvg2/css/SVGCSSParser.cpp:
+        (WebCore::CSSParser::parseSVGValue):
+        * ksvg2/css/SVGCSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::applySVGProperty):
+        * ksvg2/scripts/cssmakeprops: Removed.
+        * ksvg2/scripts/cssmakevalues: Removed.
+        * ksvg2/svg/SVGAnimationElement.cpp:
+        * ksvg2/svg/SVGStyledElement.cpp:
+        (WebCore::mapAttributeToCSSProperty):
+        (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName): remove font-size-adjust
+
 2007-10-08  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Steve Falkenburg;
index 2b632b5..a2eb8cf 100644 (file)
@@ -562,20 +562,38 @@ all : \
     kjs_events.lut.h \
     kjs_navigator.lut.h \
     kjs_window.lut.h \
-    ksvgcssproperties.h \
-    ksvgcssvalues.h \
     tokenizer.cpp \
     WebCore.exp \
 #
 
 # CSS property names and value keywords
 
-CSSPropertyNames.h : css/CSSPropertyNames.in css/makeprop.pl
-       cat $< > CSSPropertyNames.in
+ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG)
+
+CSSPropertyNames.in : css/CSSPropertyNames.in ksvg2/css/CSSPropertyNames.in
+       if sort $< $(WebCore)/ksvg/css/CSSPropertyNames.in | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
+       cat $< $(WebCore)/ksvg2/css/CSSPropertyNames.in > CSSPropertyNames.in
+
+CSSValueKeywords.in : css/CSSValueKeywords.in ksvg2/css/CSSValueKeywords.in
+       # Lower case all the values, as CSS values are case-insensitive
+       perl -ne 'print lc' $(WebCore)/ksvg2/css/CSSValueKeywords.in > SVGCSSValueKeywords.in
+       if sort $< SVGCSSValueKeywords.in | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
+       cat $< SVGCSSValueKeywords.in > CSSValueKeywords.in
+
+else
+
+CSSPropertyNames.in : css/CSSValueKeywords.in
+       cp $< CSSPropertyNames.in
+
+CSSValueKeywords.in : css/CSSValueKeywords.in
+       cp $< CSSValueKeywords.in
+
+endif 
+
+CSSPropertyNames.h : CSSPropertyNames.in css/makeprop.pl
        perl "$(WebCore)/css/makeprop.pl"
 
-CSSValueKeywords.h : css/CSSValueKeywords.in css/makevalues.pl
-       cat $< > CSSValueKeywords.in
+CSSValueKeywords.h : CSSValueKeywords.in css/makevalues.pl
        perl "$(WebCore)/css/makevalues.pl"
 
 # DOCTYPE strings
@@ -670,20 +688,6 @@ XLinkNames.cpp : ksvg2/scripts/make_names.pl ksvg2/misc/xlinkattrs.in
        perl $< --attrs $(WebCore)/ksvg2/misc/xlinkattrs.in \
             --namespace XLink --cppNamespace WebCore --namespaceURI "http://www.w3.org/1999/xlink" --output .
 
-# SVG CSS property names and value keywords
-
-ksvgcssproperties.h : ksvg2/scripts/cssmakeprops css/CSSPropertyNames.in ksvg2/css/CSSPropertyNames.in
-       if sort $(WebCore)/css/CSSPropertyNames.in $(WebCore)/ksvg2/css/CSSPropertyNames.in | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
-       cat $(WebCore)/ksvg2/css/CSSPropertyNames.in > ksvgcssproperties.in
-       $(WebCore)/ksvg2/scripts/cssmakeprops -n SVG -f ksvgcssproperties.in
-
-ksvgcssvalues.h : ksvg2/scripts/cssmakevalues css/CSSValueKeywords.in ksvg2/css/CSSValueKeywords.in
-       if sort $(WebCore)/css/CSSValueKeywords.in $(WebCore)/ksvg2/css/CSSValueKeywords.in | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
-       # Lower case all the values, as CSS values are case-insensitive
-       perl -ne 'print lc' $(WebCore)/ksvg2/css/CSSValueKeywords.in > ksvgcssvalues.in
-       $(WebCore)/ksvg2/scripts/cssmakevalues -n SVG -f ksvgcssvalues.in
-
-
 # Add SVG Symbols to the WebCore exported symbols file
 
 WebCore.exp : WebCore.base.exp WebCore.SVG.exp
@@ -700,12 +704,6 @@ SVGNames.cpp :
 XLinkNames.cpp :
        echo > XLinkNames.cpp
 
-ksvgcssproperties.h :
-       echo > ksvgcssproperties.h
-
-ksvgcssvalues.h :
-       echo > ksvgcssvalues.h
-
 WebCore.exp : WebCore.base.exp
        cp $(WebCore)/WebCore.base.exp WebCore.exp
 
index 632671f..b8eea41 100644 (file)
                656581F309D1508D000E61D7 /* kjs_events.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581DC09D1508D000E61D7 /* kjs_events.lut.h */; };
                656581F509D1508D000E61D7 /* kjs_navigator.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581DE09D1508D000E61D7 /* kjs_navigator.lut.h */; };
                656581F809D1508D000E61D7 /* kjs_window.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581E109D1508D000E61D7 /* kjs_window.lut.h */; };
-               656581FB09D1508D000E61D7 /* ksvgcssproperties.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581E409D1508D000E61D7 /* ksvgcssproperties.h */; };
                656581FE09D1508D000E61D7 /* SVGElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581E709D1508D000E61D7 /* SVGElementFactory.h */; };
                6565820009D1508D000E61D7 /* SVGNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581E909D1508D000E61D7 /* SVGNames.h */; };
                6565820209D1508D000E61D7 /* XLinkNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581EB09D1508D000E61D7 /* XLinkNames.h */; };
-               6565821309D15111000E61D7 /* ksvgcssvalues.h in Headers */ = {isa = PBXBuildFile; fileRef = 6565820F09D15111000E61D7 /* ksvgcssvalues.h */; };
                656B84E00AEA1D3100A095B4 /* ResourceHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656B84DC0AEA1D3100A095B4 /* ResourceHandle.cpp */; };
                656B84E20AEA1D3100A095B4 /* ResourceHandleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 656B84DE0AEA1D3100A095B4 /* ResourceHandleClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                656B84E30AEA1D3100A095B4 /* ResourceHandleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 656B84DF0AEA1D3100A095B4 /* ResourceHandleInternal.h */; };
                A84EBD780CB8C89200079609 /* JSStyleSheetListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A84EBD770CB8C89200079609 /* JSStyleSheetListCustom.cpp */; };
                A84EBD830CB8C97700079609 /* JSStyleSheetList.h in Headers */ = {isa = PBXBuildFile; fileRef = A84EBD810CB8C97700079609 /* JSStyleSheetList.h */; };
                A84EBD840CB8C97700079609 /* JSStyleSheetList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A84EBD820CB8C97700079609 /* JSStyleSheetList.cpp */; };
+               A84EC1390CB9FDBC00079609 /* SVGCSSComputedStyleDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A84EC1380CB9FDBC00079609 /* SVGCSSComputedStyleDeclaration.cpp */; };
                A86629CF09DA2B47009633A5 /* JSUIEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A86629C909DA2B47009633A5 /* JSUIEvent.h */; };
                A86629D009DA2B48009633A5 /* JSUIEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A86629CA09DA2B47009633A5 /* JSUIEvent.cpp */; };
                A86629D109DA2B48009633A5 /* JSMouseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A86629CB09DA2B47009633A5 /* JSMouseEvent.h */; };
                656581DC09D1508D000E61D7 /* kjs_events.lut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = kjs_events.lut.h; sourceTree = "<group>"; };
                656581DE09D1508D000E61D7 /* kjs_navigator.lut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = kjs_navigator.lut.h; sourceTree = "<group>"; };
                656581E109D1508D000E61D7 /* kjs_window.lut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = kjs_window.lut.h; sourceTree = "<group>"; };
-               656581E209D1508D000E61D7 /* ksvgcssproperties.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ksvgcssproperties.c; sourceTree = "<group>"; };
-               656581E309D1508D000E61D7 /* ksvgcssproperties.gperf */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ksvgcssproperties.gperf; sourceTree = "<group>"; };
-               656581E409D1508D000E61D7 /* ksvgcssproperties.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ksvgcssproperties.h; sourceTree = "<group>"; };
-               656581E509D1508D000E61D7 /* ksvgcssproperties.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ksvgcssproperties.in; sourceTree = "<group>"; };
                656581E609D1508D000E61D7 /* SVGElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGElementFactory.cpp; sourceTree = "<group>"; };
                656581E709D1508D000E61D7 /* SVGElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGElementFactory.h; sourceTree = "<group>"; };
                656581E809D1508D000E61D7 /* SVGNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGNames.cpp; sourceTree = "<group>"; };
                656581E909D1508D000E61D7 /* SVGNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGNames.h; sourceTree = "<group>"; };
                656581EA09D1508D000E61D7 /* XLinkNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = XLinkNames.cpp; sourceTree = "<group>"; };
                656581EB09D1508D000E61D7 /* XLinkNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XLinkNames.h; sourceTree = "<group>"; };
-               6565820D09D15111000E61D7 /* ksvgcssvalues.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ksvgcssvalues.c; sourceTree = "<group>"; };
-               6565820E09D15111000E61D7 /* ksvgcssvalues.gperf */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ksvgcssvalues.gperf; sourceTree = "<group>"; };
-               6565820F09D15111000E61D7 /* ksvgcssvalues.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ksvgcssvalues.h; sourceTree = "<group>"; };
-               6565821009D15111000E61D7 /* ksvgcssvalues.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ksvgcssvalues.in; sourceTree = "<group>"; };
                656B84DC0AEA1D3100A095B4 /* ResourceHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceHandle.cpp; sourceTree = "<group>"; };
                656B84DE0AEA1D3100A095B4 /* ResourceHandleClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceHandleClient.h; sourceTree = "<group>"; };
                656B84DF0AEA1D3100A095B4 /* ResourceHandleInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceHandleInternal.h; sourceTree = "<group>"; };
                A84EBD770CB8C89200079609 /* JSStyleSheetListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStyleSheetListCustom.cpp; sourceTree = "<group>"; };
                A84EBD810CB8C97700079609 /* JSStyleSheetList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStyleSheetList.h; sourceTree = "<group>"; };
                A84EBD820CB8C97700079609 /* JSStyleSheetList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStyleSheetList.cpp; sourceTree = "<group>"; };
+               A84EC1380CB9FDBC00079609 /* SVGCSSComputedStyleDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGCSSComputedStyleDeclaration.cpp; sourceTree = "<group>"; };
                A85D7A2F0879EBA9006A9172 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
                A86629C909DA2B47009633A5 /* JSUIEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSUIEvent.h; sourceTree = "<group>"; };
                A86629CA09DA2B47009633A5 /* JSUIEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSUIEvent.cpp; sourceTree = "<group>"; };
                                656581DC09D1508D000E61D7 /* kjs_events.lut.h */,
                                656581DE09D1508D000E61D7 /* kjs_navigator.lut.h */,
                                656581E109D1508D000E61D7 /* kjs_window.lut.h */,
-                               656581E209D1508D000E61D7 /* ksvgcssproperties.c */,
-                               656581E309D1508D000E61D7 /* ksvgcssproperties.gperf */,
-                               656581E409D1508D000E61D7 /* ksvgcssproperties.h */,
-                               656581E509D1508D000E61D7 /* ksvgcssproperties.in */,
-                               6565820D09D15111000E61D7 /* ksvgcssvalues.c */,
-                               6565820E09D15111000E61D7 /* ksvgcssvalues.gperf */,
-                               6565820F09D15111000E61D7 /* ksvgcssvalues.h */,
-                               6565821009D15111000E61D7 /* ksvgcssvalues.in */,
                                656581E609D1508D000E61D7 /* SVGElementFactory.cpp */,
                                656581E709D1508D000E61D7 /* SVGElementFactory.h */,
                                656581E809D1508D000E61D7 /* SVGNames.cpp */,
                                A8C0F700089701F100BA5114 /* SVGRenderStyle.h */,
                                A8C0F701089701F100BA5114 /* SVGRenderStyleDefs.cpp */,
                                A8C0F702089701F100BA5114 /* SVGRenderStyleDefs.h */,
+                               A84EC1380CB9FDBC00079609 /* SVGCSSComputedStyleDeclaration.cpp */,
                        );
                        path = css;
                        sourceTree = "<group>";
                                656581F309D1508D000E61D7 /* kjs_events.lut.h in Headers */,
                                656581F509D1508D000E61D7 /* kjs_navigator.lut.h in Headers */,
                                656581F809D1508D000E61D7 /* kjs_window.lut.h in Headers */,
-                               656581FB09D1508D000E61D7 /* ksvgcssproperties.h in Headers */,
                                656581FE09D1508D000E61D7 /* SVGElementFactory.h in Headers */,
                                6565820009D1508D000E61D7 /* SVGNames.h in Headers */,
                                6565820209D1508D000E61D7 /* XLinkNames.h in Headers */,
-                               6565821309D15111000E61D7 /* ksvgcssvalues.h in Headers */,
                                650F53DC09D15DDA00C9B0C8 /* CSSGrammar.h in Headers */,
                                65DF31DB09D1C123000BE325 /* JSAttr.h in Headers */,
                                65DF31F409D1CC60000BE325 /* JSCharacterData.h in Headers */,
                                BC64B4DB0CB4298A005F2B62 /* CSSFontSelector.cpp in Sources */,
                                A84EBD780CB8C89200079609 /* JSStyleSheetListCustom.cpp in Sources */,
                                A84EBD840CB8C97700079609 /* JSStyleSheetList.cpp in Sources */,
+                               A84EC1390CB9FDBC00079609 /* SVGCSSComputedStyleDeclaration.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 51fc16d..45ea801 100644 (file)
@@ -172,6 +172,46 @@ static const int computedProperties[] = {
     CSS_PROP__WEBKIT_BORDER_BOTTOM_RIGHT_RADIUS,
     CSS_PROP__WEBKIT_BORDER_TOP_LEFT_RADIUS,
     CSS_PROP__WEBKIT_BORDER_TOP_RIGHT_RADIUS
+    
+#if ENABLE(SVG)
+    ,
+    CSS_PROP_CLIP_PATH,
+    CSS_PROP_CLIP_RULE,
+    CSS_PROP_MASK,
+    CSS_PROP_FILTER,
+    CSS_PROP_FLOOD_COLOR,
+    CSS_PROP_FLOOD_OPACITY,
+    CSS_PROP_LIGHTING_COLOR,
+    CSS_PROP_STOP_COLOR,
+    CSS_PROP_STOP_OPACITY,
+    CSS_PROP_POINTER_EVENTS,
+    CSS_PROP_COLOR_INTERPOLATION,
+    CSS_PROP_COLOR_INTERPOLATION_FILTERS,
+    CSS_PROP_COLOR_RENDERING,
+    CSS_PROP_FILL,
+    CSS_PROP_FILL_OPACITY,
+    CSS_PROP_FILL_RULE,
+    CSS_PROP_IMAGE_RENDERING,
+    CSS_PROP_MARKER_END,
+    CSS_PROP_MARKER_MID,
+    CSS_PROP_MARKER_START,
+    CSS_PROP_SHAPE_RENDERING,
+    CSS_PROP_STROKE,
+    CSS_PROP_STROKE_DASHARRAY,
+    CSS_PROP_STROKE_DASHOFFSET,
+    CSS_PROP_STROKE_LINECAP,
+    CSS_PROP_STROKE_LINEJOIN,
+    CSS_PROP_STROKE_MITERLIMIT,
+    CSS_PROP_STROKE_OPACITY,
+    CSS_PROP_STROKE_WIDTH,
+    CSS_PROP_TEXT_RENDERING,
+    CSS_PROP_ALIGNMENT_BASELINE,
+    CSS_PROP_BASELINE_SHIFT,
+    CSS_PROP_DOMINANT_BASELINE,
+    CSS_PROP_KERNING,
+    CSS_PROP_TEXT_ANCHOR,
+    CSS_PROP_WRITING_MODE
+#endif
 };
 
 const unsigned numComputedProperties = sizeof(computedProperties) / sizeof(computedProperties[0]);
@@ -1654,6 +1694,10 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
         case CSS_PROP__WEBKIT_TEXT_STROKE:
             // FIXME: The above are unimplemented.
             break;
+#if ENABLE(SVG)
+        default:
+            return getSVGPropertyCSSValue(propertyID, DoNotUpdateLayout);
+#endif
     }
 
     LOG_ERROR("unimplemented propertyID: %d", propertyID);
index ad817c8..689ba35 100644 (file)
@@ -54,6 +54,9 @@ public:
     virtual PassRefPtr<CSSMutableStyleDeclaration> makeMutable();
 
     PassRefPtr<CSSValue> getPropertyCSSValue(int propertyID, EUpdateLayout) const;
+#if ENABLE(SVG)
+    PassRefPtr<CSSValue> getSVGPropertyCSSValue(int propertyID, EUpdateLayout) const;
+#endif
 
     PassRefPtr<CSSMutableStyleDeclaration> copyInheritableProperties() const;
 
index a02fbfa..0f428e1 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
-#if ENABLE(SVG)
-#include "ksvgcssproperties.h"
-#include "ksvgcssvalues.h"
-#endif
-
 using namespace WebCore;
 using namespace HTMLNames;
 
@@ -1002,10 +997,6 @@ property:
         const char* s = str.ascii();
         int l = str.length();
         $$ = getPropertyID(s, l);
-#if ENABLE(SVG)
-        if ($$ == 0)
-            $$ = SVG::getSVGCSSPropertyID(s, l);
-#endif
     }
   ;
 
@@ -1058,10 +1049,6 @@ term:
   | IDENT maybe_space {
       DeprecatedString str = deprecatedString($1);
       $$.id = getValueID(str.lower().latin1(), str.length());
-#if ENABLE(SVG)
-      if ($$.id == 0)
-          $$.id = SVG::getSVGCSSValueID(str.lower().latin1(), str.length());
-#endif
       $$.unit = CSSPrimitiveValue::CSS_IDENT;
       $$.string = $1;
   }
index 449587b..4919ab7 100644 (file)
@@ -1487,6 +1487,10 @@ bool CSSParser::parseValue(int propId, bool important)
     case CSS_PROP_TEXT_OVERLINE:
     case CSS_PROP_TEXT_UNDERLINE:
         return false;
+#if ENABLE(SVG)
+    default:
+        return parseSVGValue(propId, important);
+#endif
     }
 
     if (valid_primitive) {
@@ -1507,10 +1511,6 @@ bool CSSParser::parseValue(int propId, bool important)
         }
         delete parsedValue;
     }
-#if ENABLE(SVG)
-    if (parseSVGValue(propId, important))
-        return true;
-#endif
     return false;
 }
 
index 7c3ff54..bb61725 100644 (file)
@@ -28,7 +28,6 @@
 #include "CSSPropertyNames.h"
 #include "CSSRule.h"
 #include "DeprecatedValueList.h"
-#include "ksvgcssproperties.h"
 #include <ctype.h>
 
 namespace WebCore {
@@ -51,12 +50,7 @@ static int propertyID(const String& s)
         buffer[i] = tolower(c);
     }
 
-    int propID = getPropertyID(buffer, len);
-#if ENABLE(SVG)
-    if (!propID)
-        propID = SVG::getSVGCSSPropertyID(buffer, len);
-#endif
-    return propID;
+    return getPropertyID(buffer, len);
 }
 
 CSSStyleDeclaration::CSSStyleDeclaration(CSSRule* parent)
index 789a006..1cc446c 100644 (file)
@@ -4378,11 +4378,12 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
     case CSS_PROP__WEBKIT_TEXT_DECORATIONS_IN_EFFECT:
     case CSS_PROP__WEBKIT_TEXT_STROKE:
         return;
-    }
 #if ENABLE(SVG)
-    // Try the SVG properties
-    applySVGProperty(id, value);
+    default:
+        // Try the SVG properties
+        applySVGProperty(id, value);
 #endif
+    }
 }
 
 void CSSStyleSelector::mapBackgroundAttachment(BackgroundLayer* layer, CSSValue* value)
index e7e49a9..e1ca112 100644 (file)
@@ -22,7 +22,7 @@ color-rendering
 fill
 fill-opacity
 fill-rule
-font-size-adjust
+#font-size-adjust
 image-rendering
 marker
 marker-end
diff --git a/WebCore/ksvg2/css/SVGCSSComputedStyleDeclaration.cpp b/WebCore/ksvg2/css/SVGCSSComputedStyleDeclaration.cpp
new file mode 100644 (file)
index 0000000..d966b53
--- /dev/null
@@ -0,0 +1,318 @@
+/*
+    Copyright (C) 2007 Eric Seidel <eric@webkit.org>
+
+    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"
+#if ENABLE(SVG)
+#include "CSSComputedStyleDeclaration.h"
+
+#include "CSSPropertyNames.h"
+#include "CSSValueKeywords.h"
+#include "Document.h"
+#include "RenderStyle.h"
+
+namespace WebCore {
+    
+PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(int propertyID, EUpdateLayout updateLayout) const
+{
+    Node* node = m_node.get();
+    if (!node)
+        return 0;
+    
+    // Make sure our layout is up to date before we allow a query on these attributes.
+    if (updateLayout)
+        node->document()->updateLayout();
+        
+    RenderStyle* style = node->computedStyle();
+    if (!style)
+        return 0;
+    
+    const SVGRenderStyle* svgStyle = style->svgStyle();
+    if (!svgStyle)
+        return 0;
+    
+    switch (static_cast<CSSPropertyID>(propertyID)) {
+        case CSS_PROP_CLIP_RULE: {
+            if (svgStyle->clipRule() == RULE_NONZERO)
+                return new CSSPrimitiveValue(CSS_VAL_NONZERO);
+            else
+                return new CSSPrimitiveValue(CSS_VAL_EVENODD);
+        }
+        case CSS_PROP_FLOOD_OPACITY:
+            return new CSSPrimitiveValue(svgStyle->floodOpacity(), CSSPrimitiveValue::CSS_NUMBER);
+        case CSS_PROP_STOP_OPACITY:
+            return new CSSPrimitiveValue(svgStyle->stopOpacity(), CSSPrimitiveValue::CSS_NUMBER);
+        case CSS_PROP_POINTER_EVENTS: {
+            switch (svgStyle->pointerEvents()) {
+            case PE_NONE:
+                return new CSSPrimitiveValue(CSS_VAL_NONE);
+            case PE_STROKE:
+                return new CSSPrimitiveValue(CSS_VAL_STROKE);
+            case PE_FILL:
+                return new CSSPrimitiveValue(CSS_VAL_FILL);
+            case PE_PAINTED:
+                return new CSSPrimitiveValue(CSS_VAL_PAINTED);
+            case PE_VISIBLE:
+                return new CSSPrimitiveValue(CSS_VAL_VISIBLE);
+            case PE_VISIBLE_STROKE:
+                return new CSSPrimitiveValue(CSS_VAL_VISIBLESTROKE);
+            case PE_VISIBLE_FILL:
+                return new CSSPrimitiveValue(CSS_VAL_VISIBLEFILL);
+            case PE_VISIBLE_PAINTED:
+                return new CSSPrimitiveValue(CSS_VAL_VISIBLEPAINTED);
+            case PE_ALL:
+                return new CSSPrimitiveValue(CSS_VAL_ALL);
+            }
+        }
+        case CSS_PROP_COLOR_INTERPOLATION: {
+            if (svgStyle->colorInterpolation() == CI_AUTO)
+                return new CSSPrimitiveValue(CSS_VAL_AUTO);
+            else if (svgStyle->colorInterpolation() == CI_SRGB)
+                return new CSSPrimitiveValue(CSS_VAL_SRGB);
+            else
+                return new CSSPrimitiveValue(CSS_VAL_LINEARRGB);
+        }
+        case CSS_PROP_COLOR_INTERPOLATION_FILTERS: {
+            if (svgStyle->colorInterpolationFilters() == CI_AUTO)
+                return new CSSPrimitiveValue(CSS_VAL_AUTO);
+            else if (svgStyle->colorInterpolationFilters() == CI_SRGB)
+                return new CSSPrimitiveValue(CSS_VAL_SRGB);
+            else
+                return new CSSPrimitiveValue(CSS_VAL_LINEARRGB);
+        }
+        case CSS_PROP_FILL_OPACITY:
+            return new CSSPrimitiveValue(svgStyle->fillOpacity(), CSSPrimitiveValue::CSS_NUMBER);
+        case CSS_PROP_FILL_RULE: {
+            if (svgStyle->fillRule() == RULE_NONZERO)
+                return new CSSPrimitiveValue(CSS_VAL_NONZERO);
+            else
+                return new CSSPrimitiveValue(CSS_VAL_EVENODD);
+        }
+        case CSS_PROP_COLOR_RENDERING: {
+            if (svgStyle->colorRendering() == CR_AUTO)
+                return new CSSPrimitiveValue(CSS_VAL_AUTO);
+            else if (svgStyle->colorRendering() == CR_OPTIMIZESPEED)
+                return new CSSPrimitiveValue(CSS_VAL_OPTIMIZESPEED);
+            else
+                return new CSSPrimitiveValue(CSS_VAL_OPTIMIZEQUALITY);
+        }
+        case CSS_PROP_IMAGE_RENDERING: {
+            if (svgStyle->imageRendering() == IR_AUTO)
+                return new CSSPrimitiveValue(CSS_VAL_AUTO);
+            else if (svgStyle->imageRendering() == IR_OPTIMIZESPEED)
+                return new CSSPrimitiveValue(CSS_VAL_OPTIMIZESPEED);
+            else
+                return new CSSPrimitiveValue(CSS_VAL_OPTIMIZEQUALITY);
+        }
+        case CSS_PROP_SHAPE_RENDERING: {
+            if (svgStyle->shapeRendering() == SR_AUTO)
+                return new CSSPrimitiveValue(CSS_VAL_AUTO);
+            else if (svgStyle->shapeRendering() == SR_OPTIMIZESPEED)
+                return new CSSPrimitiveValue(CSS_VAL_OPTIMIZESPEED);
+            else if (svgStyle->shapeRendering() == SR_CRISPEDGES)
+                return new CSSPrimitiveValue(CSS_VAL_CRISPEDGES);
+            else
+                return new CSSPrimitiveValue(CSS_VAL_GEOMETRICPRECISION);
+        }
+        case CSS_PROP_STROKE_LINECAP: {
+            if (svgStyle->capStyle() == ButtCap)
+                return new CSSPrimitiveValue(CSS_VAL_BUTT);
+            else if (svgStyle->capStyle() == RoundCap)
+                return new CSSPrimitiveValue(CSS_VAL_ROUND);
+            else
+                return new CSSPrimitiveValue(CSS_VAL_SQUARE);
+        }
+        case CSS_PROP_STROKE_LINEJOIN: {
+            if (svgStyle->joinStyle() == MiterJoin)
+                return new CSSPrimitiveValue(CSS_VAL_MITER);
+            else if (svgStyle->joinStyle() == RoundJoin)
+                return new CSSPrimitiveValue(CSS_VAL_ROUND);
+            else
+                return new CSSPrimitiveValue(CSS_VAL_BEVEL);
+        }
+        case CSS_PROP_STROKE_MITERLIMIT:
+            return new CSSPrimitiveValue(svgStyle->strokeMiterLimit(), CSSPrimitiveValue::CSS_NUMBER);
+        case CSS_PROP_STROKE_OPACITY:
+            return new CSSPrimitiveValue(svgStyle->strokeOpacity(), CSSPrimitiveValue::CSS_NUMBER);
+        case CSS_PROP_TEXT_RENDERING: {
+            switch (svgStyle->textRendering()) {
+            case TR_AUTO:
+                return new CSSPrimitiveValue(CSS_VAL_AUTO);
+            case TR_OPTIMIZESPEED:
+                return new CSSPrimitiveValue(CSS_VAL_OPTIMIZESPEED);
+            case TR_OPTIMIZELEGIBILITY:
+                return new CSSPrimitiveValue(CSS_VAL_OPTIMIZELEGIBILITY);
+            case TR_GEOMETRICPRECISION:
+                return new CSSPrimitiveValue(CSS_VAL_GEOMETRICPRECISION);
+            }
+        }
+        case CSS_PROP_ALIGNMENT_BASELINE: {
+            switch (svgStyle->alignmentBaseline()) {
+            case AB_AUTO:
+                return new CSSPrimitiveValue(CSS_VAL_AUTO);
+            case AB_BASELINE:
+                return new CSSPrimitiveValue(CSS_VAL_BASELINE);
+            case AB_BEFORE_EDGE:
+                return new CSSPrimitiveValue(CSS_VAL_BEFORE_EDGE);
+            case AB_TEXT_BEFORE_EDGE:
+                return new CSSPrimitiveValue(CSS_VAL_TEXT_BEFORE_EDGE);
+            case AB_MIDDLE:
+                return new CSSPrimitiveValue(CSS_VAL_MIDDLE);
+            case AB_CENTRAL:
+                return new CSSPrimitiveValue(CSS_VAL_CENTRAL);
+            case AB_AFTER_EDGE:
+                return new CSSPrimitiveValue(CSS_VAL_AFTER_EDGE);
+            case AB_TEXT_AFTER_EDGE:
+                return new CSSPrimitiveValue(CSS_VAL_TEXT_AFTER_EDGE);
+            case AB_IDEOGRAPHIC:
+                return new CSSPrimitiveValue(CSS_VAL_IDEOGRAPHIC);
+            case AB_ALPHABETIC:
+                return new CSSPrimitiveValue(CSS_VAL_ALPHABETIC);
+            case AB_HANGING:
+                return new CSSPrimitiveValue(CSS_VAL_HANGING);
+            case AB_MATHEMATICAL:
+                return new CSSPrimitiveValue(CSS_VAL_MATHEMATICAL);
+            }
+        }
+        case CSS_PROP_DOMINANT_BASELINE: {
+            switch (svgStyle->dominantBaseline()) {
+            case DB_AUTO:
+                return new CSSPrimitiveValue(CSS_VAL_AUTO);
+            case DB_USE_SCRIPT:
+                return new CSSPrimitiveValue(CSS_VAL_USE_SCRIPT);
+            case DB_NO_CHANGE:
+                return new CSSPrimitiveValue(CSS_VAL_NO_CHANGE);
+            case DB_RESET_SIZE:
+                return new CSSPrimitiveValue(CSS_VAL_RESET_SIZE);
+            case DB_CENTRAL:
+                return new CSSPrimitiveValue(CSS_VAL_CENTRAL);
+            case DB_MIDDLE:
+                return new CSSPrimitiveValue(CSS_VAL_MIDDLE);
+            case DB_TEXT_BEFORE_EDGE:
+                return new CSSPrimitiveValue(CSS_VAL_TEXT_BEFORE_EDGE);
+            case DB_TEXT_AFTER_EDGE:
+                return new CSSPrimitiveValue(CSS_VAL_TEXT_AFTER_EDGE);
+            case DB_IDEOGRAPHIC:
+                return new CSSPrimitiveValue(CSS_VAL_IDEOGRAPHIC);
+            case DB_ALPHABETIC:
+                return new CSSPrimitiveValue(CSS_VAL_ALPHABETIC);
+            case DB_HANGING:
+                return new CSSPrimitiveValue(CSS_VAL_HANGING);
+            case DB_MATHEMATICAL:
+                return new CSSPrimitiveValue(CSS_VAL_MATHEMATICAL);
+            }
+        }
+        case CSS_PROP_TEXT_ANCHOR: {
+            if (svgStyle->textAnchor() == TA_START)
+                return new CSSPrimitiveValue(CSS_VAL_START);
+            else if (svgStyle->textAnchor() == TA_MIDDLE)
+                return new CSSPrimitiveValue(CSS_VAL_MIDDLE);
+            else
+                return new CSSPrimitiveValue(CSS_VAL_END);
+        }
+        case CSS_PROP_WRITING_MODE: {
+            switch (svgStyle->writingMode()) {
+            case WM_LRTB:
+                return new CSSPrimitiveValue(CSS_VAL_LR_TB);
+            case WM_LR:
+                return new CSSPrimitiveValue(CSS_VAL_LR);
+            case WM_RLTB:
+                return new CSSPrimitiveValue(CSS_VAL_RL_TB);
+            case WM_RL:
+                return new CSSPrimitiveValue(CSS_VAL_RL);
+            case WM_TBRL:
+                return new CSSPrimitiveValue(CSS_VAL_TB_RL);
+            case WM_TB:
+                return new CSSPrimitiveValue(CSS_VAL_TB);
+            }
+        }
+        case CSS_PROP_CLIP_PATH:
+            if (!svgStyle->clipPath().isEmpty())
+                return new CSSPrimitiveValue(svgStyle->clipPath(), CSSPrimitiveValue::CSS_URI);
+            return new CSSPrimitiveValue(CSS_VAL_NONE);
+        case CSS_PROP_MASK:
+            if (!svgStyle->maskElement().isEmpty())
+                return new CSSPrimitiveValue(svgStyle->maskElement(), CSSPrimitiveValue::CSS_URI);
+            return new CSSPrimitiveValue(CSS_VAL_NONE);
+        case CSS_PROP_FILTER:
+            if (!svgStyle->filter().isEmpty())
+                return new CSSPrimitiveValue(svgStyle->filter(), CSSPrimitiveValue::CSS_URI);
+            return new CSSPrimitiveValue(CSS_VAL_NONE);
+        case CSS_PROP_FLOOD_COLOR:
+            return new CSSPrimitiveValue(svgStyle->floodColor().rgb());
+        case CSS_PROP_LIGHTING_COLOR:
+            return new CSSPrimitiveValue(svgStyle->lightingColor().rgb());
+        case CSS_PROP_STOP_COLOR:
+            return new CSSPrimitiveValue(svgStyle->stopColor().rgb());
+        case CSS_PROP_FILL:
+            return svgStyle->fillPaint();
+        case CSS_PROP_KERNING:
+            return svgStyle->kerning();
+        case CSS_PROP_MARKER_END:
+            if (!svgStyle->endMarker().isEmpty())
+                return new CSSPrimitiveValue(svgStyle->endMarker(), CSSPrimitiveValue::CSS_URI);
+            return new CSSPrimitiveValue(CSS_VAL_NONE);
+        case CSS_PROP_MARKER_MID:
+            if (!svgStyle->midMarker().isEmpty())
+                return new CSSPrimitiveValue(svgStyle->midMarker(), CSSPrimitiveValue::CSS_URI);
+            return new CSSPrimitiveValue(CSS_VAL_NONE);
+        case CSS_PROP_MARKER_START:
+            if (!svgStyle->startMarker().isEmpty())
+                return new CSSPrimitiveValue(svgStyle->startMarker(), CSSPrimitiveValue::CSS_URI);
+            return new CSSPrimitiveValue(CSS_VAL_NONE);
+        case CSS_PROP_STROKE:
+            return svgStyle->strokePaint();
+        case CSS_PROP_STROKE_DASHARRAY:
+            return svgStyle->strokeDashArray();
+        case CSS_PROP_STROKE_DASHOFFSET:
+            return svgStyle->strokeDashOffset();
+        case CSS_PROP_STROKE_WIDTH:
+            return svgStyle->strokeWidth();
+        case CSS_PROP_BASELINE_SHIFT: {
+            switch (svgStyle->baselineShift()) {
+            case BS_BASELINE:
+                return new CSSPrimitiveValue(CSS_VAL_BASELINE);
+            case BS_SUPER:
+                return new CSSPrimitiveValue(CSS_VAL_SUPER);
+            case BS_SUB:
+                return new CSSPrimitiveValue(CSS_VAL_SUB);
+            case BS_LENGTH:
+                return svgStyle->baselineShiftValue();
+            }
+        }
+        case CSS_PROP_MARKER:
+        case CSS_PROP_ENABLE_BACKGROUND:
+        case CSS_PROP_COLOR_PROFILE:
+        case CSS_PROP_GLYPH_ORIENTATION_HORIZONTAL:
+        case CSS_PROP_GLYPH_ORIENTATION_VERTICAL:
+            // the above properties are not yet implemented in the engine
+            break;
+    default:
+        // If you crash here, it's because you added a css property and are not handling it
+        // in either this switch statement or the one in CSSComputedStyleDelcaration::getPropertyCSSValue
+        ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", propertyID);
+    }
+    LOG_ERROR("unimplemented propertyID: %d", propertyID);
+    return 0;
+}
+
+}
+
+#endif // ENABLE(SVG)
+
+// vim:ts=4:noet
index 0e593d3..93a30c6 100644 (file)
@@ -33,8 +33,6 @@
 #include "CSSValueKeywords.h"
 #include "CSSValueList.h"
 #include "SVGPaint.h"
-#include "ksvgcssproperties.c"
-#include "ksvgcssvalues.c"
 #include "DeprecatedString.h"
 
 using namespace std;
@@ -55,16 +53,16 @@ bool CSSParser::parseSVGValue(int propId, bool important)
     switch (propId) {
     /* The comment to the right defines all valid value of these
      * properties as defined in SVG 1.1, Appendix N. Property index */
-    case SVGCSS_PROP_ALIGNMENT_BASELINE:
+    case CSS_PROP_ALIGNMENT_BASELINE:
     // auto | baseline | before-edge | text-before-edge | middle |
     // central | after-edge | text-after-edge | ideographic | alphabetic |
     // hanging | mathematical | inherit
         if (id == CSS_VAL_AUTO || id == CSS_VAL_BASELINE || id == CSS_VAL_MIDDLE ||
-          (id >= SVGCSS_VAL_BEFORE_EDGE && id <= SVGCSS_VAL_MATHEMATICAL))
+          (id >= CSS_VAL_BEFORE_EDGE && id <= CSS_VAL_MATHEMATICAL))
             valid_primitive = true;
         break;
 
-    case SVGCSS_PROP_BASELINE_SHIFT:
+    case CSS_PROP_BASELINE_SHIFT:
     // baseline | super | sub | <percentage> | <length> | inherit
         if (id == CSS_VAL_BASELINE || id == CSS_VAL_SUB ||
            id >= CSS_VAL_SUPER)
@@ -73,26 +71,26 @@ bool CSSParser::parseSVGValue(int propId, bool important)
             valid_primitive = validUnit(value, FLength|FPercent, false);
         break;
 
-    case SVGCSS_PROP_DOMINANT_BASELINE:
+    case CSS_PROP_DOMINANT_BASELINE:
     // auto | use-script | no-change | reset-size | ideographic |
     // alphabetic | hanging | mathematical | central | middle |
     // text-after-edge | text-before-edge | inherit
         if (id == CSS_VAL_AUTO || id == CSS_VAL_MIDDLE ||
-          (id >= SVGCSS_VAL_USE_SCRIPT && id <= SVGCSS_VAL_RESET_SIZE) ||
-          (id >= SVGCSS_VAL_CENTRAL && id <= SVGCSS_VAL_MATHEMATICAL))
+          (id >= CSS_VAL_USE_SCRIPT && id <= CSS_VAL_RESET_SIZE) ||
+          (id >= CSS_VAL_CENTRAL && id <= CSS_VAL_MATHEMATICAL))
             valid_primitive = true;
         break;
 
-    case SVGCSS_PROP_ENABLE_BACKGROUND:
+    case CSS_PROP_ENABLE_BACKGROUND:
     // accumulate | new [x] [y] [width] [height] | inherit
-        if (id == SVGCSS_VAL_ACCUMULATE) // TODO : new
+        if (id == CSS_VAL_ACCUMULATE) // TODO : new
             valid_primitive = true;
         break;
 
-    case SVGCSS_PROP_MARKER_START:
-    case SVGCSS_PROP_MARKER_MID:
-    case SVGCSS_PROP_MARKER_END:
-    case SVGCSS_PROP_MASK:
+    case CSS_PROP_MARKER_START:
+    case CSS_PROP_MARKER_MID:
+    case CSS_PROP_MARKER_END:
+    case CSS_PROP_MASK:
         if (id == CSS_VAL_NONE)
             valid_primitive = true;
         else if (value->unit == CSSPrimitiveValue::CSS_URI) {
@@ -102,61 +100,61 @@ bool CSSParser::parseSVGValue(int propId, bool important)
         }
         break;
 
-    case SVGCSS_PROP_CLIP_RULE:            // nonzero | evenodd | inherit
-    case SVGCSS_PROP_FILL_RULE:
-        if (id == SVGCSS_VAL_NONZERO || id == SVGCSS_VAL_EVENODD)
+    case CSS_PROP_CLIP_RULE:            // nonzero | evenodd | inherit
+    case CSS_PROP_FILL_RULE:
+        if (id == CSS_VAL_NONZERO || id == CSS_VAL_EVENODD)
             valid_primitive = true;
         break;
 
-    case SVGCSS_PROP_STROKE_MITERLIMIT:   // <miterlimit> | inherit
+    case CSS_PROP_STROKE_MITERLIMIT:   // <miterlimit> | inherit
         valid_primitive = validUnit(value, FNumber|FNonNeg, false);
         break;
 
-    case SVGCSS_PROP_STROKE_LINEJOIN:   // miter | round | bevel | inherit
-        if (id == SVGCSS_VAL_MITER || id == CSS_VAL_ROUND || id == SVGCSS_VAL_BEVEL)
+    case CSS_PROP_STROKE_LINEJOIN:   // miter | round | bevel | inherit
+        if (id == CSS_VAL_MITER || id == CSS_VAL_ROUND || id == CSS_VAL_BEVEL)
             valid_primitive = true;
         break;
 
-    case SVGCSS_PROP_STROKE_LINECAP:    // butt | round | square | inherit
-        if (id == SVGCSS_VAL_BUTT || id == CSS_VAL_ROUND || id == CSS_VAL_SQUARE)
+    case CSS_PROP_STROKE_LINECAP:    // butt | round | square | inherit
+        if (id == CSS_VAL_BUTT || id == CSS_VAL_ROUND || id == CSS_VAL_SQUARE)
             valid_primitive = true;
         break;
 
-    case SVGCSS_PROP_STROKE_OPACITY:   // <opacity-value> | inherit
-    case SVGCSS_PROP_FILL_OPACITY:
-    case SVGCSS_PROP_STOP_OPACITY:
-    case SVGCSS_PROP_FLOOD_OPACITY:
+    case CSS_PROP_STROKE_OPACITY:   // <opacity-value> | inherit
+    case CSS_PROP_FILL_OPACITY:
+    case CSS_PROP_STOP_OPACITY:
+    case CSS_PROP_FLOOD_OPACITY:
         valid_primitive = (!id && validUnit(value, FNumber|FPercent, false));
         break;
 
-    case SVGCSS_PROP_SHAPE_RENDERING:
+    case CSS_PROP_SHAPE_RENDERING:
     // auto | optimizeSpeed | crispEdges | geometricPrecision | inherit
-        if (id == CSS_VAL_AUTO || id == SVGCSS_VAL_OPTIMIZESPEED ||
-            id == SVGCSS_VAL_CRISPEDGES || id == SVGCSS_VAL_GEOMETRICPRECISION)
+        if (id == CSS_VAL_AUTO || id == CSS_VAL_OPTIMIZESPEED ||
+            id == CSS_VAL_CRISPEDGES || id == CSS_VAL_GEOMETRICPRECISION)
             valid_primitive = true;
         break;
 
-    case SVGCSS_PROP_TEXT_RENDERING:   // auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit
-        if (id == CSS_VAL_AUTO || id == SVGCSS_VAL_OPTIMIZESPEED || id == SVGCSS_VAL_OPTIMIZELEGIBILITY ||
-       id == SVGCSS_VAL_GEOMETRICPRECISION)
+    case CSS_PROP_TEXT_RENDERING:   // auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit
+        if (id == CSS_VAL_AUTO || id == CSS_VAL_OPTIMIZESPEED || id == CSS_VAL_OPTIMIZELEGIBILITY ||
+       id == CSS_VAL_GEOMETRICPRECISION)
             valid_primitive = true;
         break;
 
-    case SVGCSS_PROP_IMAGE_RENDERING:  // auto | optimizeSpeed |
-    case SVGCSS_PROP_COLOR_RENDERING:  // optimizeQuality | inherit
-        if (id == CSS_VAL_AUTO || id == SVGCSS_VAL_OPTIMIZESPEED ||
-            id == SVGCSS_VAL_OPTIMIZEQUALITY)
+    case CSS_PROP_IMAGE_RENDERING:  // auto | optimizeSpeed |
+    case CSS_PROP_COLOR_RENDERING:  // optimizeQuality | inherit
+        if (id == CSS_VAL_AUTO || id == CSS_VAL_OPTIMIZESPEED ||
+            id == CSS_VAL_OPTIMIZEQUALITY)
             valid_primitive = true;
         break;
 
-    case SVGCSS_PROP_COLOR_PROFILE: // auto | sRGB | <name> | <uri> inherit
-        if (id == CSS_VAL_AUTO || id == SVGCSS_VAL_SRGB)
+    case CSS_PROP_COLOR_PROFILE: // auto | sRGB | <name> | <uri> inherit
+        if (id == CSS_VAL_AUTO || id == CSS_VAL_SRGB)
             valid_primitive = true;
         break;
 
-    case SVGCSS_PROP_COLOR_INTERPOLATION:   // auto | sRGB | linearRGB | inherit
-    case SVGCSS_PROP_COLOR_INTERPOLATION_FILTERS:  
-        if (id == CSS_VAL_AUTO || id == SVGCSS_VAL_SRGB || id == SVGCSS_VAL_LINEARRGB)
+    case CSS_PROP_COLOR_INTERPOLATION:   // auto | sRGB | linearRGB | inherit
+    case CSS_PROP_COLOR_INTERPOLATION_FILTERS:  
+        if (id == CSS_VAL_AUTO || id == CSS_VAL_SRGB || id == CSS_VAL_LINEARRGB)
             valid_primitive = true;
         break;
 
@@ -164,26 +162,26 @@ bool CSSParser::parseSVGValue(int propId, bool important)
      * correctly and allows optimization in applyRule(..)
      */
 
-    case SVGCSS_PROP_POINTER_EVENTS:
+    case CSS_PROP_POINTER_EVENTS:
     // none | visiblePainted | visibleFill | visibleStroke | visible |
     // painted | fill | stroke | none | all | inherit
         if (id == CSS_VAL_VISIBLE || id == CSS_VAL_NONE ||
-          (id >= SVGCSS_VAL_VISIBLEPAINTED && id <= SVGCSS_VAL_ALL))
+          (id >= CSS_VAL_VISIBLEPAINTED && id <= CSS_VAL_ALL))
             valid_primitive = true;
         break;
 
-    case SVGCSS_PROP_TEXT_ANCHOR:    // start | middle | end | inherit
+    case CSS_PROP_TEXT_ANCHOR:    // start | middle | end | inherit
         if (id == CSS_VAL_START || id == CSS_VAL_MIDDLE || id == CSS_VAL_END)
             valid_primitive = true;
         break;
 
-    case SVGCSS_PROP_GLYPH_ORIENTATION_VERTICAL: // auto | <angle> | inherit
+    case CSS_PROP_GLYPH_ORIENTATION_VERTICAL: // auto | <angle> | inherit
         if (id == CSS_VAL_AUTO) {
             valid_primitive = true;
             break;
         }
         /* fallthrough intentional */
-    case SVGCSS_PROP_GLYPH_ORIENTATION_HORIZONTAL: // <angle> | inherit
+    case CSS_PROP_GLYPH_ORIENTATION_HORIZONTAL: // <angle> | inherit
         if (value->unit == CSSPrimitiveValue::CSS_DEG)
             parsedValue = new CSSPrimitiveValue(value->fValue, CSSPrimitiveValue::CSS_DEG);
         else if (value->unit == CSSPrimitiveValue::CSS_GRAD)
@@ -192,12 +190,12 @@ bool CSSParser::parseSVGValue(int propId, bool important)
             parsedValue = new CSSPrimitiveValue(value->fValue, CSSPrimitiveValue::CSS_RAD);
         break;
 
-    case SVGCSS_PROP_FILL:                 // <paint> | inherit
-    case SVGCSS_PROP_STROKE:               // <paint> | inherit
+    case CSS_PROP_FILL:                 // <paint> | inherit
+    case CSS_PROP_STROKE:               // <paint> | inherit
         {
             if (id == CSS_VAL_NONE)
                 parsedValue = new SVGPaint(SVGPaint::SVG_PAINTTYPE_NONE);
-            else if (id == SVGCSS_VAL_CURRENTCOLOR)
+            else if (id == CSS_VAL_CURRENTCOLOR)
                 parsedValue = new SVGPaint(SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR);
             else if (value->unit == CSSPrimitiveValue::CSS_URI) {
                 RGBA32 c = Color::transparent;
@@ -215,7 +213,7 @@ bool CSSParser::parseSVGValue(int propId, bool important)
 
     case CSS_PROP_COLOR:                // <color> | inherit
         if ((id >= CSS_VAL_AQUA && id <= CSS_VAL_WINDOWTEXT) ||
-           (id >= SVGCSS_VAL_ALICEBLUE && id <= SVGCSS_VAL_YELLOWGREEN))
+           (id >= CSS_VAL_ALICEBLUE && id <= CSS_VAL_YELLOWGREEN))
             parsedValue = new SVGColor(domString(value->string));
         else
             parsedValue = parseSVGColor();
@@ -224,13 +222,13 @@ bool CSSParser::parseSVGValue(int propId, bool important)
             valueList->next();
         break;
 
-    case SVGCSS_PROP_STOP_COLOR: // TODO : icccolor
-    case SVGCSS_PROP_FLOOD_COLOR:
-    case SVGCSS_PROP_LIGHTING_COLOR:
+    case CSS_PROP_STOP_COLOR: // TODO : icccolor
+    case CSS_PROP_FLOOD_COLOR:
+    case CSS_PROP_LIGHTING_COLOR:
         if ((id >= CSS_VAL_AQUA && id <= CSS_VAL_WINDOWTEXT) ||
-           (id >= SVGCSS_VAL_ALICEBLUE && id <= SVGCSS_VAL_YELLOWGREEN))
+           (id >= CSS_VAL_ALICEBLUE && id <= CSS_VAL_YELLOWGREEN))
             parsedValue = new SVGColor(domString(value->string));
-        else if (id == SVGCSS_VAL_CURRENTCOLOR)
+        else if (id == CSS_VAL_CURRENTCOLOR)
             parsedValue = new SVGColor(SVGColor::SVG_COLORTYPE_CURRENTCOLOR);
         else // TODO : svgcolor (iccColor)
             parsedValue = parseSVGColor();
@@ -240,17 +238,17 @@ bool CSSParser::parseSVGValue(int propId, bool important)
 
         break;
 
-    case SVGCSS_PROP_WRITING_MODE:
+    case CSS_PROP_WRITING_MODE:
     // lr-tb | rl_tb | tb-rl | lr | rl | tb | inherit
-        if (id >= SVGCSS_VAL_LR_TB && id <= SVGCSS_VAL_TB)
+        if (id >= CSS_VAL_LR_TB && id <= CSS_VAL_TB)
             valid_primitive = true;
         break;
 
-    case SVGCSS_PROP_STROKE_WIDTH:         // <length> | inherit
-    case SVGCSS_PROP_STROKE_DASHOFFSET:
+    case CSS_PROP_STROKE_WIDTH:         // <length> | inherit
+    case CSS_PROP_STROKE_DASHOFFSET:
         valid_primitive = validUnit(value, FLength | FPercent, false);
         break;
-    case SVGCSS_PROP_STROKE_DASHARRAY:     // none | <dasharray> | inherit
+    case CSS_PROP_STROKE_DASHARRAY:     // none | <dasharray> | inherit
         if (id == CSS_VAL_NONE)
             valid_primitive = true;
         else
@@ -258,15 +256,15 @@ bool CSSParser::parseSVGValue(int propId, bool important)
 
         break;
 
-    case SVGCSS_PROP_KERNING:              // auto | normal | <length> | inherit
+    case CSS_PROP_KERNING:              // auto | normal | <length> | inherit
         if (id == CSS_VAL_AUTO || id == CSS_VAL_NORMAL)
             valid_primitive = true;
         else
             valid_primitive = validUnit(value, FLength, false);
         break;
 
-    case SVGCSS_PROP_CLIP_PATH:    // <uri> | none | inherit
-    case SVGCSS_PROP_FILTER:
+    case CSS_PROP_CLIP_PATH:    // <uri> | none | inherit
+    case CSS_PROP_FILTER:
         if (id == CSS_VAL_NONE)
             valid_primitive = true;
         else if (value->unit == CSSPrimitiveValue::CSS_URI) {
@@ -277,18 +275,21 @@ bool CSSParser::parseSVGValue(int propId, bool important)
         break;
 
     /* shorthand properties */
-    case SVGCSS_PROP_MARKER:
+    case CSS_PROP_MARKER:
     {
-        if (!parseValue(SVGCSS_PROP_MARKER_START, important))
+        if (!parseValue(CSS_PROP_MARKER_START, important))
             return false;
         CSSValue *value = parsedProperties[numParsedProperties - 1]->value();
         m_implicitShorthand = true;
-        addProperty(SVGCSS_PROP_MARKER_MID, value, important);
-        addProperty(SVGCSS_PROP_MARKER_END, value, important);
+        addProperty(CSS_PROP_MARKER_MID, value, important);
+        addProperty(CSS_PROP_MARKER_END, value, important);
         m_implicitShorthand = false;
         return true;
     }
     default:
+        // If you crash here, it's because you added a css property and are not handling it
+        // in either this switch statement or the one in CSSParser::parseValue
+        ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", propId);
         return false;
     }
 
index fcfbc1d..60bc500 100644 (file)
@@ -31,6 +31,7 @@
 #if ENABLE(SVG)
 #include "CSSStyleSelector.h"
 
+#include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "CSSValueList.h"
 #include "SVGColor.h"
@@ -39,8 +40,6 @@
 #include "SVGRenderStyle.h"
 #include "SVGRenderStyleDefs.h"
 #include "SVGStyledElement.h"
-#include "ksvgcssproperties.h"
-#include "ksvgcssvalues.h"
 #include <math.h>
 #include <stdlib.h>
 #include <wtf/MathExtras.h>
@@ -98,48 +97,47 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
     switch (id)
     {
         // ident only properties
-        case SVGCSS_PROP_ALIGNMENT_BASELINE:
+        case CSS_PROP_ALIGNMENT_BASELINE:
         {
             HANDLE_INHERIT_AND_INITIAL(alignmentBaseline, AlignmentBaseline)
             if (!primitiveValue)
                 break;
 
-            switch (primitiveValue->getIdent())
-            {
+            switch (primitiveValue->getIdent()) {
                 case CSS_VAL_AUTO:
                     svgstyle->setAlignmentBaseline(AB_AUTO);
                     break;
                 case CSS_VAL_BASELINE:
                     svgstyle->setAlignmentBaseline(AB_BASELINE);
                     break;
-                case SVGCSS_VAL_BEFORE_EDGE:
+                case CSS_VAL_BEFORE_EDGE:
                     svgstyle->setAlignmentBaseline(AB_BEFORE_EDGE);
                     break;
-                case SVGCSS_VAL_TEXT_BEFORE_EDGE:
+                case CSS_VAL_TEXT_BEFORE_EDGE:
                     svgstyle->setAlignmentBaseline(AB_TEXT_BEFORE_EDGE);
                     break;
                 case CSS_VAL_MIDDLE:
                     svgstyle->setAlignmentBaseline(AB_MIDDLE);
                     break;
-                case SVGCSS_VAL_CENTRAL:
+                case CSS_VAL_CENTRAL:
                     svgstyle->setAlignmentBaseline(AB_CENTRAL);
                     break;
-                case SVGCSS_VAL_AFTER_EDGE:
+                case CSS_VAL_AFTER_EDGE:
                     svgstyle->setAlignmentBaseline(AB_AFTER_EDGE);
                     break;
-                case SVGCSS_VAL_TEXT_AFTER_EDGE:
+                case CSS_VAL_TEXT_AFTER_EDGE:
                     svgstyle->setAlignmentBaseline(AB_TEXT_AFTER_EDGE);
                     break;
-                case SVGCSS_VAL_IDEOGRAPHIC:
+                case CSS_VAL_IDEOGRAPHIC:
                     svgstyle->setAlignmentBaseline(AB_IDEOGRAPHIC);
                     break;
-                case SVGCSS_VAL_ALPHABETIC:
+                case CSS_VAL_ALPHABETIC:
                     svgstyle->setAlignmentBaseline(AB_ALPHABETIC);
                     break;
-                case SVGCSS_VAL_HANGING:
+                case CSS_VAL_HANGING:
                     svgstyle->setAlignmentBaseline(AB_HANGING);
                     break;
-                case SVGCSS_VAL_MATHEMATICAL:
+                case CSS_VAL_MATHEMATICAL:
                     svgstyle->setAlignmentBaseline(AB_MATHEMATICAL);
                     break;
                 default:
@@ -148,7 +146,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
 
             break;
         }
-        case SVGCSS_PROP_BASELINE_SHIFT:
+        case CSS_PROP_BASELINE_SHIFT:
         {
             HANDLE_INHERIT_AND_INITIAL(baselineShift, BaselineShift);
             if (!primitiveValue)
@@ -175,53 +173,52 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
 
             break;
         }
-        case SVGCSS_PROP_KERNING:
+        case CSS_PROP_KERNING:
         {
             if (isInherit) {
-                HANDLE_INHERIT_COND(SVGCSS_PROP_KERNING, kerning, Kerning)
+                HANDLE_INHERIT_COND(CSS_PROP_KERNING, kerning, Kerning)
                 return;
             }
             else if (isInitial) {
-                HANDLE_INITIAL_COND_WITH_VALUE(SVGCSS_PROP_KERNING, Kerning, Kerning)
+                HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_KERNING, Kerning, Kerning)
                 return;
             }
 
             svgstyle->setKerning(primitiveValue);
             break;
         }
-        case SVGCSS_PROP_POINTER_EVENTS:
+        case CSS_PROP_POINTER_EVENTS:
         {
             HANDLE_INHERIT_AND_INITIAL(pointerEvents, PointerEvents)
             if (!primitiveValue)
                 break;
                 
-            switch (primitiveValue->getIdent())
-            {
-                case SVGCSS_VAL_ALL:
+            switch (primitiveValue->getIdent()) {
+                case CSS_VAL_ALL:
                     svgstyle->setPointerEvents(PE_ALL);
                     break;
                 case CSS_VAL_NONE:
                     svgstyle->setPointerEvents(PE_NONE);
                     break;
-                case SVGCSS_VAL_VISIBLEPAINTED:
+                case CSS_VAL_VISIBLEPAINTED:
                     svgstyle->setPointerEvents(PE_VISIBLE_PAINTED);
                     break;
-                case SVGCSS_VAL_VISIBLEFILL:
+                case CSS_VAL_VISIBLEFILL:
                     svgstyle->setPointerEvents(PE_VISIBLE_FILL);
                     break;
-                case SVGCSS_VAL_VISIBLESTROKE:
+                case CSS_VAL_VISIBLESTROKE:
                     svgstyle->setPointerEvents(PE_VISIBLE_STROKE);
                     break;
                 case CSS_VAL_VISIBLE:
                     svgstyle->setPointerEvents(PE_VISIBLE);
                     break;
-                case SVGCSS_VAL_PAINTED:
+                case CSS_VAL_PAINTED:
                     svgstyle->setPointerEvents(PE_PAINTED);
                     break;
-                case SVGCSS_VAL_FILL:
+                case CSS_VAL_FILL:
                     svgstyle->setPointerEvents(PE_FILL);
                     break;
-                case SVGCSS_VAL_STROKE:
+                case CSS_VAL_STROKE:
                     svgstyle->setPointerEvents(PE_STROKE);
                 default:
                     return;
@@ -229,48 +226,47 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
 
             break;
         }
-        case SVGCSS_PROP_DOMINANT_BASELINE:
+        case CSS_PROP_DOMINANT_BASELINE:
         {
             HANDLE_INHERIT_AND_INITIAL(dominantBaseline, DominantBaseline)
             if (!primitiveValue)
                 break;
     
-            switch (primitiveValue->getIdent())
-            {
+            switch (primitiveValue->getIdent()) {
                 case CSS_VAL_AUTO:
                     svgstyle->setDominantBaseline(DB_AUTO);
                     break;
-                case SVGCSS_VAL_USE_SCRIPT:
+                case CSS_VAL_USE_SCRIPT:
                     svgstyle->setDominantBaseline(DB_USE_SCRIPT);
                     break;
-                case SVGCSS_VAL_NO_CHANGE:
+                case CSS_VAL_NO_CHANGE:
                     svgstyle->setDominantBaseline(DB_NO_CHANGE);
                     break;
-                case SVGCSS_VAL_RESET_SIZE:
+                case CSS_VAL_RESET_SIZE:
                     svgstyle->setDominantBaseline(DB_RESET_SIZE);
                     break;
-                case SVGCSS_VAL_IDEOGRAPHIC:
+                case CSS_VAL_IDEOGRAPHIC:
                     svgstyle->setDominantBaseline(DB_IDEOGRAPHIC);
                     break;
-                case SVGCSS_VAL_ALPHABETIC:
+                case CSS_VAL_ALPHABETIC:
                     svgstyle->setDominantBaseline(DB_ALPHABETIC);
                     break;
-                case SVGCSS_VAL_HANGING:
+                case CSS_VAL_HANGING:
                     svgstyle->setDominantBaseline(DB_HANGING);
                     break;
-                case SVGCSS_VAL_MATHEMATICAL:
+                case CSS_VAL_MATHEMATICAL:
                     svgstyle->setDominantBaseline(DB_MATHEMATICAL);
                     break;
-                case SVGCSS_VAL_CENTRAL:
+                case CSS_VAL_CENTRAL:
                     svgstyle->setDominantBaseline(DB_CENTRAL);
                     break;
                 case CSS_VAL_MIDDLE:
                     svgstyle->setDominantBaseline(DB_MIDDLE);
                     break;
-                case SVGCSS_VAL_TEXT_AFTER_EDGE:
+                case CSS_VAL_TEXT_AFTER_EDGE:
                     svgstyle->setDominantBaseline(DB_TEXT_AFTER_EDGE);
                     break;
-                case SVGCSS_VAL_TEXT_BEFORE_EDGE:
+                case CSS_VAL_TEXT_BEFORE_EDGE:
                     svgstyle->setDominantBaseline(DB_TEXT_BEFORE_EDGE);
                     break;
                 default:
@@ -279,18 +275,17 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
     
             break;
         }
-        case SVGCSS_PROP_COLOR_INTERPOLATION:
+        case CSS_PROP_COLOR_INTERPOLATION:
         {
             HANDLE_INHERIT_AND_INITIAL(colorInterpolation, ColorInterpolation)
             if (!primitiveValue)
                 return;
                 
-            switch (primitiveValue->getIdent())
-            {
-                case SVGCSS_VAL_SRGB:
+            switch (primitiveValue->getIdent()) {
+                case CSS_VAL_SRGB:
                     svgstyle->setColorInterpolation(CI_SRGB);
                     break;
-                case SVGCSS_VAL_LINEARRGB:
+                case CSS_VAL_LINEARRGB:
                     svgstyle->setColorInterpolation(CI_LINEARRGB);
                     break;
                 case CSS_VAL_AUTO:
@@ -301,18 +296,17 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
     
             break;
         }
-        case SVGCSS_PROP_COLOR_INTERPOLATION_FILTERS:
+        case CSS_PROP_COLOR_INTERPOLATION_FILTERS:
         {
             HANDLE_INHERIT_AND_INITIAL(colorInterpolationFilters, ColorInterpolationFilters)
             if (!primitiveValue)
                 return;
                 
-            switch (primitiveValue->getIdent())
-            {
-                case SVGCSS_VAL_SRGB:
+            switch (primitiveValue->getIdent()) {
+                case CSS_VAL_SRGB:
                     svgstyle->setColorInterpolationFilters(CI_SRGB);
                     break;
-                case SVGCSS_VAL_LINEARRGB:
+                case CSS_VAL_LINEARRGB:
                     svgstyle->setColorInterpolationFilters(CI_LINEARRGB);
                     break;
                 case CSS_VAL_AUTO:
@@ -323,18 +317,17 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             
             break;
         }
-        case SVGCSS_PROP_CLIP_RULE:
+        case CSS_PROP_CLIP_RULE:
         {
             HANDLE_INHERIT_AND_INITIAL(clipRule, ClipRule)
             if (!primitiveValue)
                 break;
                 
-            switch (primitiveValue->getIdent())
-            {
-                case SVGCSS_VAL_NONZERO:
+            switch (primitiveValue->getIdent()) {
+                case CSS_VAL_NONZERO:
                     svgstyle->setClipRule(RULE_NONZERO);
                     break;
-                case SVGCSS_VAL_EVENODD:
+                case CSS_VAL_EVENODD:
                     svgstyle->setClipRule(RULE_EVENODD);
                     break;
                 default:
@@ -343,18 +336,17 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
         
             break;
         }
-        case SVGCSS_PROP_FILL_RULE:
+        case CSS_PROP_FILL_RULE:
         {
             HANDLE_INHERIT_AND_INITIAL(fillRule, FillRule)
             if (!primitiveValue)
                 break;
             
-            switch (primitiveValue->getIdent())
-            {
-                case SVGCSS_VAL_NONZERO:
+            switch (primitiveValue->getIdent()) {
+                case CSS_VAL_NONZERO:
                     svgstyle->setFillRule(RULE_NONZERO);
                     break;
-                case SVGCSS_VAL_EVENODD:
+                case CSS_VAL_EVENODD:
                     svgstyle->setFillRule(RULE_EVENODD);
                 default:
                     return;
@@ -362,22 +354,21 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
         
             break;
         }
-        case SVGCSS_PROP_STROKE_LINEJOIN:
+        case CSS_PROP_STROKE_LINEJOIN:
         {
             HANDLE_INHERIT_AND_INITIAL(joinStyle, JoinStyle)
 
             if (!primitiveValue)
                 break;
                 
-            switch (primitiveValue->getIdent())
-            {
-                case SVGCSS_VAL_MITER:
+            switch (primitiveValue->getIdent()) {
+                case CSS_VAL_MITER:
                     svgstyle->setJoinStyle(MiterJoin);
                     break;
                 case CSS_VAL_ROUND:
                     svgstyle->setJoinStyle(RoundJoin);
                     break;
-                case SVGCSS_VAL_BEVEL:
+                case CSS_VAL_BEVEL:
                     svgstyle->setJoinStyle(BevelJoin);
                 default:
                     return;
@@ -385,24 +376,60 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             
             break;
         }
-        case SVGCSS_PROP_IMAGE_RENDERING:
+        case CSS_PROP_IMAGE_RENDERING:
         {
             HANDLE_INHERIT_AND_INITIAL(imageRendering, ImageRendering)
             if (!primitiveValue)
                 return;
             
-            switch (primitiveValue->getIdent())
-            {
-                case SVGCSS_VAL_OPTIMIZESPEED:
+            switch (primitiveValue->getIdent()) {
+                case CSS_VAL_AUTO:
+                    svgstyle->setImageRendering(IR_AUTO);
+                case CSS_VAL_OPTIMIZESPEED:
                     svgstyle->setImageRendering(IR_OPTIMIZESPEED);
-                default:
-                    return;
+                case CSS_VAL_OPTIMIZEQUALITY:
+                    svgstyle->setImageRendering(IR_OPTIMIZEQUALITY);
+            }
+            break;
+        }
+        case CSS_PROP_SHAPE_RENDERING:
+        {
+            HANDLE_INHERIT_AND_INITIAL(shapeRendering, ShapeRendering)
+            if (!primitiveValue)
+                return;
+            
+            switch (primitiveValue->getIdent()) {
+                case CSS_VAL_AUTO:
+                    svgstyle->setShapeRendering(SR_AUTO);
+                case CSS_VAL_OPTIMIZESPEED:
+                    svgstyle->setShapeRendering(SR_OPTIMIZESPEED);
+                case CSS_VAL_CRISPEDGES:
+                    svgstyle->setShapeRendering(SR_CRISPEDGES);
+                case CSS_VAL_GEOMETRICPRECISION:
+                    svgstyle->setShapeRendering(SR_GEOMETRICPRECISION);
+            }
+            break;
+        }
+        case CSS_PROP_TEXT_RENDERING:
+        {
+            HANDLE_INHERIT_AND_INITIAL(textRendering, TextRendering)
+            if (!primitiveValue)
+                return;
+            
+            switch (primitiveValue->getIdent()) {
+                case CSS_VAL_AUTO:
+                    svgstyle->setTextRendering(TR_AUTO);
+                case CSS_VAL_OPTIMIZESPEED:
+                    svgstyle->setTextRendering(TR_OPTIMIZESPEED);
+                case CSS_VAL_OPTIMIZELEGIBILITY:
+                    svgstyle->setTextRendering(TR_OPTIMIZELEGIBILITY);
+                case CSS_VAL_GEOMETRICPRECISION:
+                    svgstyle->setTextRendering(TR_GEOMETRICPRECISION);
             }
-    
             break;
         }
         // end of ident only properties
-        case SVGCSS_PROP_FILL:
+        case CSS_PROP_FILL:
         {
             HANDLE_INHERIT_AND_INITIAL(fillPaint, FillPaint)
             if (!primitiveValue && value) {
@@ -413,7 +440,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             
             break;
         }
-        case SVGCSS_PROP_STROKE:
+        case CSS_PROP_STROKE:
         {
             HANDLE_INHERIT_AND_INITIAL(strokePaint, StrokePaint)
             if (!primitiveValue && value) {
@@ -424,7 +451,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             
             break;
         }
-        case SVGCSS_PROP_STROKE_WIDTH:
+        case CSS_PROP_STROKE_WIDTH:
         {
             HANDLE_INHERIT_AND_INITIAL(strokeWidth, StrokeWidth)
             if (!primitiveValue)
@@ -433,7 +460,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setStrokeWidth(primitiveValue);
             break;
         }
-        case SVGCSS_PROP_STROKE_DASHARRAY:
+        case CSS_PROP_STROKE_DASHARRAY:
         {
             HANDLE_INHERIT_AND_INITIAL(strokeDashArray, StrokeDashArray)
             if (!primitiveValue && value) {
@@ -444,7 +471,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
         
             break;
         }
-        case SVGCSS_PROP_STROKE_DASHOFFSET:
+        case CSS_PROP_STROKE_DASHOFFSET:
         {
             HANDLE_INHERIT_AND_INITIAL(strokeDashOffset, StrokeDashOffset)
             if (!primitiveValue)
@@ -453,7 +480,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setStrokeDashOffset(primitiveValue);
             break;
         }
-        case SVGCSS_PROP_FILL_OPACITY:
+        case CSS_PROP_FILL_OPACITY:
         {
             HANDLE_INHERIT_AND_INITIAL(fillOpacity, FillOpacity)
             if (!primitiveValue)
@@ -471,7 +498,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setFillOpacity(f);
             break;
         }
-        case SVGCSS_PROP_STROKE_OPACITY:
+        case CSS_PROP_STROKE_OPACITY:
         {
             HANDLE_INHERIT_AND_INITIAL(strokeOpacity, StrokeOpacity)
             if (!primitiveValue)
@@ -489,7 +516,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setStrokeOpacity(f);
             break;
         }
-        case SVGCSS_PROP_STOP_OPACITY:
+        case CSS_PROP_STOP_OPACITY:
         {
             HANDLE_INHERIT_AND_INITIAL(stopOpacity, StopOpacity)
             if (!primitiveValue)
@@ -507,7 +534,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setStopOpacity(f);
             break;
         }
-        case SVGCSS_PROP_MARKER_START:
+        case CSS_PROP_MARKER_START:
         {
             HANDLE_INHERIT_AND_INITIAL(startMarker, StartMarker)
             if (!primitiveValue)
@@ -523,7 +550,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setStartMarker(s);
             break;
         }
-        case SVGCSS_PROP_MARKER_MID:
+        case CSS_PROP_MARKER_MID:
         {
             HANDLE_INHERIT_AND_INITIAL(midMarker, MidMarker)
             if (!primitiveValue)
@@ -539,7 +566,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setMidMarker(s);
             break;
         }
-        case SVGCSS_PROP_MARKER_END:
+        case CSS_PROP_MARKER_END:
         {
             HANDLE_INHERIT_AND_INITIAL(endMarker, EndMarker)
             if (!primitiveValue)
@@ -555,15 +582,14 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setEndMarker(s);
             break;
         }
-        case SVGCSS_PROP_STROKE_LINECAP:
+        case CSS_PROP_STROKE_LINECAP:
         {
             HANDLE_INHERIT_AND_INITIAL(capStyle, CapStyle)
             if (!primitiveValue)
                 break;
             
-            switch (primitiveValue->getIdent())
-            {
-                case SVGCSS_VAL_BUTT:
+            switch (primitiveValue->getIdent()) {
+                case CSS_VAL_BUTT:
                     svgstyle->setCapStyle(ButtCap);
                     break;
                 case CSS_VAL_ROUND:
@@ -577,7 +603,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
 
             break;
         }
-        case SVGCSS_PROP_STROKE_MITERLIMIT:
+        case CSS_PROP_STROKE_MITERLIMIT:
         {
             HANDLE_INHERIT_AND_INITIAL(strokeMiterLimit, StrokeMiterLimit)
             if (!primitiveValue)
@@ -593,7 +619,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setStrokeMiterLimit(f);
             break;
         }
-        case SVGCSS_PROP_FILTER:
+        case CSS_PROP_FILTER:
         {
             HANDLE_INHERIT_AND_INITIAL(filter, Filter)
             if (!primitiveValue)
@@ -608,7 +634,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setFilter(s);
             break;
         }
-        case SVGCSS_PROP_MASK:
+        case CSS_PROP_MASK:
         {
             HANDLE_INHERIT_AND_INITIAL(maskElement, MaskElement)
             if (!primitiveValue)
@@ -624,7 +650,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setMaskElement(s);
             break;
         }
-        case SVGCSS_PROP_CLIP_PATH:
+        case CSS_PROP_CLIP_PATH:
         {
             HANDLE_INHERIT_AND_INITIAL(clipPath, ClipPath)
             if (!primitiveValue)
@@ -640,14 +666,13 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setClipPath(s);
             break;
         }
-        case SVGCSS_PROP_TEXT_ANCHOR:
+        case CSS_PROP_TEXT_ANCHOR:
         {
             HANDLE_INHERIT_AND_INITIAL(textAnchor, TextAnchor)
             if (!primitiveValue)
                 break;
             
-            switch (primitiveValue->getIdent())
-            {
+            switch (primitiveValue->getIdent()) {
                 case CSS_VAL_START:
                     svgstyle->setTextAnchor(TA_START);
                     break;
@@ -662,35 +687,14 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             
             break;
         }
-        case SVGCSS_PROP_WRITING_MODE:
+        case CSS_PROP_WRITING_MODE:
         {
             HANDLE_INHERIT_AND_INITIAL(writingMode, WritingMode)
             if (primitiveValue)
-                svgstyle->setWritingMode((EWritingMode)(primitiveValue->getIdent() - SVGCSS_VAL_LR_TB));
-            break;
-        }       
-#if 0
-        case CSS_PROP_COLOR: // colors || inherit
-        {
-            Color col;
-            if (isInherit) {
-                HANDLE_INHERIT_COND(CSS_PROP_COLOR, color, Color)
-                return;
-            } else if (isInitial)
-                col = RenderStyle::initialColor();
-            else {
-                SVGColor *c = static_cast<SVGColor*>(value);
-                if (!c)
-                    return CSSStyleSelector::applyProperty(id, value);
-                
-                col = c->color();
-            }
-        
-            svgstyle->setColor(col);
+                svgstyle->setWritingMode((EWritingMode)(primitiveValue->getIdent() - CSS_VAL_LR_TB));
             break;
         }
-#endif
-        case SVGCSS_PROP_STOP_COLOR:
+        case CSS_PROP_STOP_COLOR:
         {
             HANDLE_INHERIT_AND_INITIAL(stopColor, StopColor);
 
@@ -707,7 +711,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setStopColor(col);
             break;
         }
-       case SVGCSS_PROP_LIGHTING_COLOR:
+       case CSS_PROP_LIGHTING_COLOR:
         {
             HANDLE_INHERIT_AND_INITIAL(lightingColor, LightingColor);
 
@@ -724,7 +728,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setLightingColor(col);
             break;
         }
-        case SVGCSS_PROP_FLOOD_OPACITY:
+        case CSS_PROP_FLOOD_OPACITY:
         {
             HANDLE_INHERIT_AND_INITIAL(floodOpacity, FloodOpacity)
             if (!primitiveValue)
@@ -742,7 +746,7 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setFloodOpacity(f);
             break;
         }
-        case SVGCSS_PROP_FLOOD_COLOR:
+        case CSS_PROP_FLOOD_COLOR:
         {
             Color col;
             if (isInitial)
@@ -761,7 +765,14 @@ void CSSStyleSelector::applySVGProperty(int id, CSSValue* value)
             svgstyle->setFloodColor(col);
             break;
         }
+        case CSS_PROP_GLYPH_ORIENTATION_VERTICAL:
+        case CSS_PROP_GLYPH_ORIENTATION_HORIZONTAL:
+            // support for above properties has not been implemented in the engine yet
+            break;
         default:
+            // If you crash here, it's because you added a css property and are not handling it
+            // in either this switch statement or the one in CSSStyleSelector::applyProperty
+            ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", id);
             return;
     }
 }
diff --git a/WebCore/ksvg2/scripts/cssmakeprops b/WebCore/ksvg2/scripts/cssmakeprops
deleted file mode 100755 (executable)
index 8100d2f..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-#!/usr/bin/perl -w
-#
-#   This file is part of the KDE libraries
-#
-#   Copyright (C) 1999 Lars Knoll (knoll@mpi-hd.mpg.de)
-#                 2004-2005 Nikolas Zimmermann (wildfox@kde.org)
-#
-#   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.
-#
-
-use strict;
-
-my $nsFull = $ARGV[1];
-my $ns = $nsFull; $ns =~ s/K//;
-my $basename = "cssproperties";
-if (defined($ARGV[2]) && $ARGV[2] eq "-f") {
-    my $inputfile = $ARGV[3];
-    $inputfile =~ m/(.*)\.in/;
-    $basename = $1;
-}
-
-my $filec = "$basename.c";
-my $fileh = "$basename.h";
-my $filein = "$basename.in";
-my $filegperf = "$basename.gperf";
-
-open IN, $filein or die "Can't open $filein\n";
-open HEADER, ">$fileh" or die "Can't open $fileh\n";
-open OUT, ">$filegperf" or die "Can't open $filegperf\n";
-
-print OUT "%{\n/* This file is automatically generated from $filein by cssmakeprops, do not edit */\n#include \"$fileh\"\n%}\n";
-print OUT "struct css_prop {\n    const char* name;\n    int id;\n};\n\n";
-print OUT "static const struct css_prop *find${ns}Prop (register const char *str, register unsigned int len);\n\n%%\n";
-
-print HEADER "/* This file is automatically generated from $filein by cssmakeprops, do not edit */\n/* Copyright 1999 Lars Knoll */\n\n#ifndef ${nsFull}_CSSPROPERTIES_H\n#define ${nsFull}_CSSPROPERTIES_H\n\n";
-
-my %amap = ();
-my @a = ();
-
-my $num = 0;
-if ($nsFull ne "KDOM") {
-       $num = 10001; # Bigger than all properties from HTML CSS
-
-       print HEADER "#define ${ns}CSS_PROP_INVALID 0\n";
-       print HEADER "#define ${ns}CSS_PROP_MIN $num\n";
-
-       $num = $num - 1;
-} else {
-       print HEADER "#define CSS_PROP_INVALID 0\n";
-       print HEADER "#define CSS_PROP_MIN 1\n";
-}
-
-while (<IN>) {
-    chomp;
-    my $prop = $_;
-
-       if(not($prop =~ /#/) and (length($prop) > 0)) {
-           $num = $num + 1;
-
-           my $up = uc($prop);
-           push(@a, $up);
-
-               my $pup = $up;
-               $pup =~ s/-/_/g;
-
-           $amap{$pup} = $num;
-               
-               if ($nsFull eq "KDOM") {
-               print OUT $prop . ", CSS_PROP_" . $pup . "\n";
-                   print HEADER "#define CSS_PROP_" . $pup . " " . $num . "\n";
-               } else {
-               print OUT $prop . ", ${ns}CSS_PROP_" . $pup . "\n";
-                   print HEADER "#define ${ns}CSS_PROP_" . $pup . " " . $num . "\n";
-               }
-    }
-}
-
-close(IN);
-
-if ($nsFull eq "KDOM") {
-       print HEADER "#define CSS_PROP_MAX $num\n";
-} else {
-       print HEADER "#define ${ns}CSS_PROP_MAX $num\n";
-}
-
-print OUT "%%\n";
-close OUT;
-
-print HEADER "\nnamespace ${nsFull}\n{\n";
-print HEADER "    const char *getSVGCSSPropertyName(unsigned short id);\n";
-print HEADER "    int getSVGCSSPropertyID(const char *tagStr, int len);\n";
-print HEADER "}\n";
-
-print HEADER "\n#endif\n";
-close HEADER;
-
-my $result = system("gperf -c -a -L ANSI-C -G -D -E -C -o -t --key-positions=\"*\" -Nfind${ns}Prop -Hhash_prop -Wwordlist_prop -D -s 3 $filegperf > $filec");
-if ($result) {
-  unlink "$filec";
-  exit $result;
-}
-
-# Avoid clashes in parser.cpp, which includes both CSSValueKeywords.c & CSSPropertyNames.c
-open F, "<$filec";
-my $tmp = "";
-while (<F>) {
-    s/TOTAL_KEYWORDS/PROP_TOTAL_KEYWORDS/;
-    s/MIN_WORD_LENGTH/PROP_MIN_WORD_LENGTH/;
-    s/MAX_WORD_LENGTH/PROP_MAX_WORD_LENGTH/;
-    s/MIN_HASH_VALUE/PROP_MIN_HASH_VALUE/;
-    s/MAX_HASH_VALUE/PROP_MAX_HASH_VALUE/;
-    s/lookup/lookupProp/g;
-    $tmp = $tmp . $_;
-}
-close F;
-open F, ">$filec";
-print F $tmp;
-close F;
-
-# read the hash mappings (is there a better way?)
-my %hmap = ();
-open(IN, "< $filec");
-my $i = 0;
-while(<IN>) {
-       my $lookFor = "CSS_PROP_";
-       if ($nsFull ne "KDOM") {
-               $lookFor = $ns . $lookFor;
-       }
-
-       if (/"[\w-]+", ${lookFor}([\w_]+)/) {
-               $hmap{$amap{$1}} = $i;
-               $i += 1;
-       }
-}
-close(IN);  
-
-open(OUT, ">> $filec");
-print OUT "\nnamespace ${nsFull}\n{\n";
-print OUT "\n\nstatic const unsigned short propList[] = {\n";
-print OUT "    65535,\n";
-
-while(defined (my $line = shift @a)) {
-    my $l = $line;
-
-       if(not($l =~ /#/) and (length($l) > 0)) {
-               $l =~ y/-/_/;
-       
-               die if !length($hmap{$amap{$l}});
-
-           print OUT "    " .$hmap{$amap{$l}}.",\n";
-       }
-}
-
-my $lookFor = "CSS_PROP_MAX";
-if ($nsFull ne "KDOM") {
-       $lookFor = $ns . $lookFor;
-}
-
-print OUT "    65535\n};\n\n";
-print OUT "const char *getSVGCSSPropertyName(unsigned short id)\n{\n";
-print OUT "    if (!id || id > $lookFor) return \"\";\n";
-print OUT "    return wordlist_prop[propList[id]].name;\n";
-print OUT "}\n";
-print OUT "\nint getSVGCSSPropertyID(const char *tagStr, int len)\n";
-print OUT "{\n";
-print OUT "    const struct css_prop *propPtr = find${ns}Prop(tagStr, len);\n";
-print OUT "    if(!propPtr)\n";
-print OUT "      return 0;\n";
-print OUT "    return propPtr->id;\n";
-print OUT "}\n\n";
-print OUT "}\n";
diff --git a/WebCore/ksvg2/scripts/cssmakevalues b/WebCore/ksvg2/scripts/cssmakevalues
deleted file mode 100755 (executable)
index 1e3c843..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/usr/bin/perl -w
-#
-#   This file is part of the KDE libraries
-#
-#   Copyright (C) 1999 Lars Knoll (knoll@mpi-hd.mpg.de)
-#                 2004-2005 Nikolas Zimmermann (wildfox@kde.org)
-#
-#   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.
-#
-
-use strict;
-
-my $nsFull = $ARGV[1];
-my $ns = $nsFull; $ns =~ s/K//;
-my $basename = "cssvalues";
-if (defined($ARGV[2]) && $ARGV[2] eq "-f") {
-    my $inputfile = $ARGV[3];
-    $inputfile =~ m/(.*)\.in/;
-    $basename = $1;
-}
-
-my $filec = "$basename.c";
-my $fileh = "$basename.h";
-my $filein = "$basename.in";
-my $filegperf = "$basename.gperf";
-
-open IN, $filein or die "Can't open $filein\n";
-open HEADER, ">$fileh" or die "Can't open $fileh\n";
-open OUT, ">$filegperf" or die "Can't open $filegperf\n";
-
-print OUT "%{\n/* This file is automatically generated from $filein by cssmakevalues, do not edit */\n#include \"$fileh\"\n%}\n";
-print OUT "struct css_val {\n    const char* name;\n    int id;\n};\n\n";
-print OUT "static const struct css_val *find${ns}Val (register const char *str, register unsigned int len);\n\n%%\n";
-
-print HEADER "/* This file is automatically generated from $filein by cssmakevalues, do not edit */\n/* Copyright 1999 Lars Knoll */\n\n#ifndef ${nsFull}_CSSVALUES_H\n#define ${nsFull}_CSSVALUES_H\n\n";
-
-my %amap = ();
-
-my $num = 0;
-if ($nsFull ne "KDOM") {
-       $num = 10001; # Bigger than all values from HTML CSS
-
-       print HEADER "#define ${ns}CSS_VAL_INVALID 0\n";
-       print HEADER "#define ${ns}CSS_VAL_MIN $num\n";
-
-    $num = $num - 1;
-} else {
-       print HEADER "#define CSS_VAL_INVALID 0\n";
-       print HEADER "#define CSS_VAL_MIN 1\n";
-}
-
-my @a = ();
-
-while (<IN>) {
-    chomp;
-    my $prop = $_;
-
-       if(not($prop =~ /#/) and (length($prop) > 0)) {
-           $num = $num + 1;
-
-           my $up = uc($prop);
-           push(@a, $up);
-
-               my $pup = $up;
-               $pup =~ s/-/_/g;
-
-           $amap{$pup} = $num;
-               
-               if ($nsFull eq "KDOM") {
-               print OUT $prop . ", CSS_VAL_" . $pup . "\n";
-                   print HEADER "#define CSS_VAL_" . $pup . " " . $num . "\n";
-               } else {
-               print OUT $prop . ", ${ns}CSS_VAL_" . $pup . "\n";
-                   print HEADER "#define ${ns}CSS_VAL_" . $pup . " " . $num . "\n";
-               }
-    }
-}
-
-close(IN);
-
-if ($nsFull eq "KDOM") {
-       print HEADER "#define CSS_VAL_MAX $num\n";
-} else {
-       print HEADER "#define ${ns}CSS_VAL_MAX $num\n";
-}
-
-print OUT "%%\n";
-close OUT;
-
-print HEADER "\nnamespace ${nsFull}\n{\n";
-print HEADER "    const char* getSVGCSSValueName(unsigned short id);\n";
-print HEADER "    int getSVGCSSValueID(const char *tagStr, int len);\n";
-print HEADER "}\n";
-
-print HEADER "\n#endif\n";
-close HEADER;
-
-my $result = system("gperf -c -a -L ANSI-C -G -D -E -C -o -t --key-positions=\"*\" -Nfind${ns}Val -Hhash_val -Wwordlist_val -D -s 3 $filegperf > $filec");
-if ($result) {
-  unlink "$filec";
-  exit $result;
-}
-
-# Avoid clashes in parser.cpp, which includes both CSSValueKeywords.c & CSSPropertyNames.c
-open F, "<$filec";
-my $tmp = "";
-while (<F>) {
-    s/TOTAL_KEYWORDS/VAL_TOTAL_KEYWORDS/;
-    s/MIN_WORD_LENGTH/VAL_MIN_WORD_LENGTH/;
-    s/MAX_WORD_LENGTH/VAL_MAX_WORD_LENGTH/;
-    s/MIN_HASH_VALUE/VAL_MIN_HASH_VALUE/;
-    s/MAX_HASH_VALUE/VAL_MAX_HASH_VALUE/;
-    s/lookup/lookupVal/g;
-    $tmp = $tmp . $_;
-}
-close F;
-open F, ">$filec";
-print F $tmp;
-close F;
-
-# read the hash mappings (is there a better way?)
-my %hmap = ();
-open(IN, "< $filec");
-my $i = 0;
-while(<IN>) {
-       my $lookFor = "CSS_VAL_";
-       if ($nsFull ne "KDOM") {
-               $lookFor = $ns . $lookFor;
-       }
-
-       if (/"[\w-]+", ${lookFor}([\w_]+)/) {
-               $hmap{$amap{$1}} = $i;
-               $i += 1;
-       }
-}
-close(IN);  
-
-open(OUT, ">> $filec");
-print OUT "\nnamespace ${nsFull}\n{\n";
-print OUT "\n\nstatic const unsigned short valList[] = {\n";
-print OUT "    65535,\n";
-
-while(defined (my $line = shift @a)) {
-    my $l = $line;
-
-       if(not($l =~ /#/) and (length($l) > 0)) {
-               $l =~ y/-/_/;
-
-       die if !length($hmap{$amap{$l}});
-
-           print OUT "    " .$hmap{$amap{$l}}.",\n";
-       }
-}
-
-my $lookFor = "CSS_VAL_MAX";
-if ($nsFull ne "KDOM") {
-       $lookFor = $ns . $lookFor;
-}
-
-print OUT "    65535\n};\n\n";
-print OUT "const char *getSVGCSSValueID(unsigned short id)\n{\n";
-print OUT "    if (!id || id > $lookFor) return \"\";\n";
-print OUT "    return wordlist_val[valList[id]].name;\n";
-print OUT "}\n";
-print OUT "\nint getSVGCSSValueID(const char *tagStr, int len)\n";
-print OUT "{\n";
-print OUT "    const struct css_val *valPtr = find${ns}Val(tagStr, len);\n";
-print OUT "    if(!valPtr)\n";
-print OUT "      return 0;\n";
-print OUT "    return valPtr->id;\n";
-print OUT "}\n\n";
-print OUT "}\n";
index 616ecf0..317308a 100644 (file)
@@ -28,7 +28,6 @@
 #include "CSSPropertyNames.h"
 #include "Document.h"
 #include "FloatConversion.h"
-#include "ksvgcssproperties.h"
 #include "SVGParserUtilities.h"
 #include "SVGSVGElement.h"
 #include "SVGURIReference.h"
index a55221a..419e259 100644 (file)
@@ -36,7 +36,6 @@
 #include "SVGNames.h"
 #include "SVGRenderStyle.h"
 #include "SVGSVGElement.h"
-#include "ksvgcssproperties.h"
 #include <wtf/Assertions.h>
 
 namespace WebCore {
@@ -71,22 +70,14 @@ RenderObject* SVGStyledElement::createRenderer(RenderArena* arena, RenderStyle*
     return new (arena) RenderPath(style, this);
 }
 
-static inline int cssPropertyIdForName(const char* propertyName, int propertyLength)
-{
-    int propertyId = getPropertyID(propertyName, propertyLength);
-    if (propertyId == 0)
-        propertyId = SVG::getSVGCSSPropertyID(propertyName, propertyLength);
-    return propertyId;
-}
-
 static inline void mapAttributeToCSSProperty(HashMap<AtomicStringImpl*, int>* propertyNameToIdMap, const QualifiedName& attrName, const char* cssPropertyName = 0)
 {
     int propertyId = 0;
     if (cssPropertyName)
-        propertyId = cssPropertyIdForName(cssPropertyName, strlen(cssPropertyName));
+        propertyId = getPropertyID(cssPropertyName, strlen(cssPropertyName));
     else {
         DeprecatedString propertyName = attrName.localName().deprecatedString();
-        propertyId = cssPropertyIdForName(propertyName.ascii(), propertyName.length());
+        propertyId = getPropertyID(propertyName.ascii(), propertyName.length());
     }
     ASSERT(propertyId > 0);
     propertyNameToIdMap->set(attrName.localName().impl(), propertyId);
@@ -124,7 +115,6 @@ int SVGStyledElement::cssPropertyIdForSVGAttributeName(const QualifiedName& attr
         mapAttributeToCSSProperty(propertyNameToIdMap, flood_opacityAttr);
         mapAttributeToCSSProperty(propertyNameToIdMap, font_familyAttr);
         mapAttributeToCSSProperty(propertyNameToIdMap, font_sizeAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, font_size_adjustAttr);
         mapAttributeToCSSProperty(propertyNameToIdMap, font_stretchAttr);
         mapAttributeToCSSProperty(propertyNameToIdMap, font_styleAttr);
         mapAttributeToCSSProperty(propertyNameToIdMap, font_variantAttr);