2006-05-15 Eric Seidel <eseidel@apple.com>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 May 2006 05:33:34 +0000 (05:33 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 May 2006 05:33:34 +0000 (05:33 +0000)
        Reviewed by hyatt.

        Split css_valueimpl.* and css_ruleimpl.* into separate files (one per class).
        http://bugzilla.opendarwin.org/show_bug.cgi?id=8934

        * WebCore+SVG/RGBColor.cpp:
        (WebCore::RGBColor::RGBColor):
        * WebCore.vcproj/WebCore/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_css.cpp:
        (KJS::DOMCSSRule::classInfo):
        * bindings/js/kjs_css.h:
        * bindings/js/kjs_dom.cpp:
        * bindings/js/kjs_html.cpp:
        * bindings/js/kjs_window.cpp:
        * bindings/objc/DOMCSS.mm:
        * bindings/scripts/CodeGeneratorJS.pm:
        * css/CSSBorderImageValue.cpp: Added.
        (WebCore::CSSBorderImageValue::CSSBorderImageValue):
        * css/CSSBorderImageValue.h: Added.
        * css/CSSCharsetRule.h: Added.
        (WebCore::CSSCharsetRule::CSSCharsetRule):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::valueForShadow):
        (WebCore::):
        * css/CSSComputedStyleDeclaration.h:
        * css/CSSFontFaceRule.cpp: Added.
        (WebCore::CSSFontFaceRule::CSSFontFaceRule):
        * css/CSSFontFaceRule.h: Added.
        (WebCore::CSSFontFaceRule::isFontFaceRule):
        * css/CSSGrammar.y:
        * css/CSSImageValue.cpp: Added.
        (WebCore::CSSImageValue::CSSImageValue):
        * css/CSSImageValue.h: Added.
        * css/CSSImportRule.cpp: Added.
        * css/CSSImportRule.h: Added.
        * css/CSSInheritedValue.cpp: Added.
        * css/CSSInheritedValue.h: Added.
        * css/CSSInitialValue.cpp: Added.
        * css/CSSInitialValue.h: Added.
        * css/CSSMediaRule.cpp: Added.
        (WebCore::CSSMediaRule::CSSMediaRule):
        (WebCore::CSSMediaRule::~CSSMediaRule):
        (WebCore::CSSMediaRule::append):
        (WebCore::CSSMediaRule::deleteRule):
        (WebCore::CSSMediaRule::cssText):
        * css/CSSMediaRule.h: Added.
        (WebCore::CSSMediaRule::media):
        (WebCore::CSSMediaRule::cssRules):
        * css/CSSMutableStyleDeclaration.cpp: Added.
        (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
        (WebCore::CSSMutableStyleDeclaration::setChanged):
        * css/CSSMutableStyleDeclaration.h: Added.
        * css/CSSPageRule.cpp: Added.
        (WebCore::CSSPageRule::CSSPageRule):
        * css/CSSPageRule.h: Added.
        (WebCore::CSSPageRule::isPageRule):
        * css/CSSPrimitiveValue.cpp: Added.
        * css/CSSPrimitiveValue.h: Added.
        * css/CSSProperty.cpp: Added.
        (WebCore::CSSProperty::cssText):
        * css/CSSProperty.h: Added.
        (WebCore::CSSProperty::CSSProperty):
        * css/CSSQuirkPrimitiveValue.h: Added.
        * css/CSSRule.cpp: Added.
        * css/CSSRule.h: Added.
        (WebCore::CSSRule::CSSRule):
        * css/CSSRuleList.cpp: Added.
        (WebCore::CSSRuleList::CSSRuleList):
        (WebCore::CSSRuleList::~CSSRuleList):
        (WebCore::CSSRuleList::deleteRule):
        (WebCore::CSSRuleList::append):
        (WebCore::CSSRuleList::insertRule):
        * css/CSSRuleList.h: Added.
        (WebCore::CSSRuleList::item):
        * css/CSSStyleDeclaration.cpp: Added.
        (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
        (WebCore::CSSStyleDeclaration::diff):
        * css/CSSStyleDeclaration.h: Added.
        * css/CSSStyleRule.cpp: Added.
        (WebCore::CSSStyleRule::CSSStyleRule):
        (WebCore::CSSStyleRule::selectorText):
        * css/CSSStyleRule.h: Added.
        * css/CSSStyleSheet.cpp:
        (WebCore::CSSStyleSheet::ownerRule):
        * css/CSSUnknownRule.h: Added.
        (WebCore::CSSUnknownRule::CSSUnknownRule):
        * css/CSSValue.h: Added.
        * css/CSSValueList.cpp: Added.
        * css/CSSValueList.h: Added.
        * css/Counter.h: Added.
        * css/DashboardRegion.h: Added.
        * css/FontFamilyValue.cpp: Added.
        * css/FontFamilyValue.h: Added.
        (WebCore::FontFamilyValue::genericFamilyType):
        * css/FontValue.cpp: Added.
        (WebCore::FontValue::cssText):
        * css/FontValue.h: Added.
        * css/MediaList.cpp:
        * css/Pair.h: Added.
        (WebCore::Pair::~Pair):
        * css/RectImpl.h: Added.
        (WebCore::RectImpl::~RectImpl):
        * css/ShadowValue.cpp: Added.
        (WebCore::ShadowValue::ShadowValue):
        * css/ShadowValue.h: Added.
        * css/css_base.cpp:
        * css/css_ruleimpl.cpp: Removed.
        * css/css_ruleimpl.h: Removed.
        * css/css_valueimpl.cpp: Removed.
        * css/css_valueimpl.h: Removed.
        * css/cssparser.cpp:
        (WebCore::CSSParser::parseColor):
        (WebCore::CSSParser::parseFontFamily):
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::locateCousinList):
        (WebCore::CSSStyleSelector::checkSelector):
        (WebCore::CSSRuleSet::addRulesFromSheet):
        (WebCore::CSSStyleSelector::applyProperty):
        (WebCore::CSSStyleSelector::mapBackgroundImage):
        * css/cssstyleselector.h:
        * dom/CSSMappedAttributeDeclaration.h:
        (WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration):
        * dom/Document.cpp:
        * editing/ApplyStyleCommand.cpp:
        * editing/CompositeEditCommand.h:
        * editing/EditCommand.cpp:
        * editing/InsertLineBreakCommand.cpp:
        (WebCore::InsertLineBreakCommand::doApply):
        * editing/InsertLineBreakCommand.h:
        * editing/InsertTextCommand.cpp:
        (WebCore::InsertTextCommand::input):
        * editing/RemoveCSSPropertyCommand.cpp:
        (WebCore::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand):
        (WebCore::RemoveCSSPropertyCommand::~RemoveCSSPropertyCommand):
        * editing/RemoveCSSPropertyCommand.h:
        (WebCore::RemoveCSSPropertyCommand::styleDeclaration):
        * html/HTMLBodyElement.cpp:
        * html/HTMLElement.cpp:
        * html/HTMLScriptElement.h:
        * html/HTMLTokenizer.h:
        * kcanvas/KCanvasFilters.h:
        (WebCore::KCanvasFEColorMatrix::values):
        (WebCore::KCanvasFEColorMatrix::setValues):
        (WebCore::KCanvasFEConvolveMatrix::kernel):
        (WebCore::KCanvasFEConvolveMatrix::setKernel):
        * kcanvas/KCanvasPath.h:
        * kcanvas/KCanvasTreeDebug.h:
        (WebCore::operator<<):
        * kcanvas/RenderPath.h:
        * ksvg2/css/SVGCSSParser.cpp:
        (WebCore::CSSParser::parseSVGValue):
        (WebCore::CSSParser::parseSVGStrokeDasharray):
        (WebCore::CSSParser::parseSVGPaint):
        (WebCore::CSSParser::parseSVGColor):
        * ksvg2/css/SVGCSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applySVGProperty):
        * ksvg2/css/SVGRenderStyleDefs.h:
        * ksvg2/ecma/Ecma.cpp:
        * ksvg2/misc/KCanvasRenderingStyle.cpp:
        * ksvg2/misc/KCanvasRenderingStyle.h:
        * ksvg2/svg/SVGAnimationElement.cpp:
        * ksvg2/svg/SVGColor.cpp:
        * ksvg2/svg/SVGColor.h:
        * ksvg2/svg/SVGCursorElement.h:
        * ksvg2/svg/SVGFEColorMatrixElement.cpp:
        (SVGFEColorMatrixElement::filterEffect):
        * page/DOMWindow.cpp:
        * page/Frame.cpp:
        * page/FramePrivate.h:
        * platform/DeprecatedValueList.h:
        * rendering/RenderTextField.cpp:

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

104 files changed:
WebCore/ChangeLog
WebCore/WebCore+SVG/RGBColor.cpp
WebCore/WebCore.vcproj/WebCore/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/kjs_css.cpp
WebCore/bindings/js/kjs_css.h
WebCore/bindings/js/kjs_dom.cpp
WebCore/bindings/js/kjs_html.cpp
WebCore/bindings/js/kjs_window.cpp
WebCore/bindings/objc/DOMCSS.mm
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/css/CSSBorderImageValue.cpp [new file with mode: 0644]
WebCore/css/CSSBorderImageValue.h [new file with mode: 0644]
WebCore/css/CSSCharsetRule.h [new file with mode: 0644]
WebCore/css/CSSComputedStyleDeclaration.cpp
WebCore/css/CSSComputedStyleDeclaration.h
WebCore/css/CSSFontFaceRule.cpp [new file with mode: 0644]
WebCore/css/CSSFontFaceRule.h [new file with mode: 0644]
WebCore/css/CSSGrammar.y
WebCore/css/CSSImageValue.cpp [new file with mode: 0644]
WebCore/css/CSSImageValue.h [new file with mode: 0644]
WebCore/css/CSSImportRule.cpp [new file with mode: 0644]
WebCore/css/CSSImportRule.h [new file with mode: 0644]
WebCore/css/CSSInheritedValue.cpp [new file with mode: 0644]
WebCore/css/CSSInheritedValue.h [new file with mode: 0644]
WebCore/css/CSSInitialValue.cpp [new file with mode: 0644]
WebCore/css/CSSInitialValue.h [new file with mode: 0644]
WebCore/css/CSSMediaRule.cpp [new file with mode: 0644]
WebCore/css/CSSMediaRule.h [new file with mode: 0644]
WebCore/css/CSSMutableStyleDeclaration.cpp [new file with mode: 0644]
WebCore/css/CSSMutableStyleDeclaration.h [new file with mode: 0644]
WebCore/css/CSSPageRule.cpp [new file with mode: 0644]
WebCore/css/CSSPageRule.h [new file with mode: 0644]
WebCore/css/CSSPrimitiveValue.cpp [new file with mode: 0644]
WebCore/css/CSSPrimitiveValue.h [new file with mode: 0644]
WebCore/css/CSSProperty.cpp [new file with mode: 0644]
WebCore/css/CSSProperty.h [new file with mode: 0644]
WebCore/css/CSSQuirkPrimitiveValue.h [new file with mode: 0644]
WebCore/css/CSSRule.cpp [new file with mode: 0644]
WebCore/css/CSSRule.h [new file with mode: 0644]
WebCore/css/CSSRuleList.cpp [new file with mode: 0644]
WebCore/css/CSSRuleList.h [new file with mode: 0644]
WebCore/css/CSSStyleDeclaration.cpp [new file with mode: 0644]
WebCore/css/CSSStyleDeclaration.h [new file with mode: 0644]
WebCore/css/CSSStyleRule.cpp [new file with mode: 0644]
WebCore/css/CSSStyleRule.h [new file with mode: 0644]
WebCore/css/CSSStyleSheet.cpp
WebCore/css/CSSUnknownRule.h [new file with mode: 0644]
WebCore/css/CSSValue.h [new file with mode: 0644]
WebCore/css/CSSValueList.cpp [new file with mode: 0644]
WebCore/css/CSSValueList.h [new file with mode: 0644]
WebCore/css/Counter.h [new file with mode: 0644]
WebCore/css/DashboardRegion.h [new file with mode: 0644]
WebCore/css/FontFamilyValue.cpp [new file with mode: 0644]
WebCore/css/FontFamilyValue.h [new file with mode: 0644]
WebCore/css/FontValue.cpp [new file with mode: 0644]
WebCore/css/FontValue.h [new file with mode: 0644]
WebCore/css/MediaList.cpp
WebCore/css/Pair.h [new file with mode: 0644]
WebCore/css/RectImpl.h [new file with mode: 0644]
WebCore/css/ShadowValue.cpp [new file with mode: 0644]
WebCore/css/ShadowValue.h [new file with mode: 0644]
WebCore/css/css_base.cpp
WebCore/css/css_ruleimpl.cpp [deleted file]
WebCore/css/css_ruleimpl.h [deleted file]
WebCore/css/css_valueimpl.cpp [deleted file]
WebCore/css/css_valueimpl.h [deleted file]
WebCore/css/cssparser.cpp
WebCore/css/cssstyleselector.cpp
WebCore/css/cssstyleselector.h
WebCore/dom/CSSMappedAttributeDeclaration.h
WebCore/dom/Document.cpp
WebCore/editing/ApplyStyleCommand.cpp
WebCore/editing/CompositeEditCommand.h
WebCore/editing/EditCommand.cpp
WebCore/editing/InsertLineBreakCommand.cpp
WebCore/editing/InsertLineBreakCommand.h
WebCore/editing/InsertTextCommand.cpp
WebCore/editing/RemoveCSSPropertyCommand.cpp
WebCore/editing/RemoveCSSPropertyCommand.h
WebCore/html/HTMLBodyElement.cpp
WebCore/html/HTMLElement.cpp
WebCore/html/HTMLScriptElement.h
WebCore/html/HTMLTokenizer.h
WebCore/kcanvas/KCanvasFilters.h
WebCore/kcanvas/KCanvasPath.h
WebCore/kcanvas/KCanvasTreeDebug.h
WebCore/kcanvas/RenderPath.h
WebCore/ksvg2/css/SVGCSSParser.cpp
WebCore/ksvg2/css/SVGCSSStyleSelector.cpp
WebCore/ksvg2/css/SVGRenderStyleDefs.h
WebCore/ksvg2/ecma/Ecma.cpp
WebCore/ksvg2/misc/KCanvasRenderingStyle.cpp
WebCore/ksvg2/misc/KCanvasRenderingStyle.h
WebCore/ksvg2/svg/SVGAnimationElement.cpp
WebCore/ksvg2/svg/SVGColor.cpp
WebCore/ksvg2/svg/SVGColor.h
WebCore/ksvg2/svg/SVGCursorElement.h
WebCore/ksvg2/svg/SVGFEColorMatrixElement.cpp
WebCore/page/DOMWindow.cpp
WebCore/page/Frame.cpp
WebCore/page/FramePrivate.h
WebCore/platform/DeprecatedValueList.h
WebCore/rendering/RenderTextField.cpp

index 530b240aa189453df5a2c41ae7487d64f2b76791..910fa7443d6a08ad65f292f77374bced9e7bc17d 100644 (file)
@@ -1,3 +1,178 @@
+2006-05-15  Eric Seidel  <eseidel@apple.com>
+
+        Reviewed by hyatt.
+
+        Split css_valueimpl.* and css_ruleimpl.* into separate files (one per class).
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=8934
+
+        * WebCore+SVG/RGBColor.cpp:
+        (WebCore::RGBColor::RGBColor):
+        * WebCore.vcproj/WebCore/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/kjs_css.cpp:
+        (KJS::DOMCSSRule::classInfo):
+        * bindings/js/kjs_css.h:
+        * bindings/js/kjs_dom.cpp:
+        * bindings/js/kjs_html.cpp:
+        * bindings/js/kjs_window.cpp:
+        * bindings/objc/DOMCSS.mm:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        * css/CSSBorderImageValue.cpp: Added.
+        (WebCore::CSSBorderImageValue::CSSBorderImageValue):
+        * css/CSSBorderImageValue.h: Added.
+        * css/CSSCharsetRule.h: Added.
+        (WebCore::CSSCharsetRule::CSSCharsetRule):
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::valueForShadow):
+        (WebCore::):
+        * css/CSSComputedStyleDeclaration.h:
+        * css/CSSFontFaceRule.cpp: Added.
+        (WebCore::CSSFontFaceRule::CSSFontFaceRule):
+        * css/CSSFontFaceRule.h: Added.
+        (WebCore::CSSFontFaceRule::isFontFaceRule):
+        * css/CSSGrammar.y:
+        * css/CSSImageValue.cpp: Added.
+        (WebCore::CSSImageValue::CSSImageValue):
+        * css/CSSImageValue.h: Added.
+        * css/CSSImportRule.cpp: Added.
+        * css/CSSImportRule.h: Added.
+        * css/CSSInheritedValue.cpp: Added.
+        * css/CSSInheritedValue.h: Added.
+        * css/CSSInitialValue.cpp: Added.
+        * css/CSSInitialValue.h: Added.
+        * css/CSSMediaRule.cpp: Added.
+        (WebCore::CSSMediaRule::CSSMediaRule):
+        (WebCore::CSSMediaRule::~CSSMediaRule):
+        (WebCore::CSSMediaRule::append):
+        (WebCore::CSSMediaRule::deleteRule):
+        (WebCore::CSSMediaRule::cssText):
+        * css/CSSMediaRule.h: Added.
+        (WebCore::CSSMediaRule::media):
+        (WebCore::CSSMediaRule::cssRules):
+        * css/CSSMutableStyleDeclaration.cpp: Added.
+        (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
+        (WebCore::CSSMutableStyleDeclaration::setChanged):
+        * css/CSSMutableStyleDeclaration.h: Added.
+        * css/CSSPageRule.cpp: Added.
+        (WebCore::CSSPageRule::CSSPageRule):
+        * css/CSSPageRule.h: Added.
+        (WebCore::CSSPageRule::isPageRule):
+        * css/CSSPrimitiveValue.cpp: Added.
+        * css/CSSPrimitiveValue.h: Added.
+        * css/CSSProperty.cpp: Added.
+        (WebCore::CSSProperty::cssText):
+        * css/CSSProperty.h: Added.
+        (WebCore::CSSProperty::CSSProperty):
+        * css/CSSQuirkPrimitiveValue.h: Added.
+        * css/CSSRule.cpp: Added.
+        * css/CSSRule.h: Added.
+        (WebCore::CSSRule::CSSRule):
+        * css/CSSRuleList.cpp: Added.
+        (WebCore::CSSRuleList::CSSRuleList):
+        (WebCore::CSSRuleList::~CSSRuleList):
+        (WebCore::CSSRuleList::deleteRule):
+        (WebCore::CSSRuleList::append):
+        (WebCore::CSSRuleList::insertRule):
+        * css/CSSRuleList.h: Added.
+        (WebCore::CSSRuleList::item):
+        * css/CSSStyleDeclaration.cpp: Added.
+        (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
+        (WebCore::CSSStyleDeclaration::diff):
+        * css/CSSStyleDeclaration.h: Added.
+        * css/CSSStyleRule.cpp: Added.
+        (WebCore::CSSStyleRule::CSSStyleRule):
+        (WebCore::CSSStyleRule::selectorText):
+        * css/CSSStyleRule.h: Added.
+        * css/CSSStyleSheet.cpp:
+        (WebCore::CSSStyleSheet::ownerRule):
+        * css/CSSUnknownRule.h: Added.
+        (WebCore::CSSUnknownRule::CSSUnknownRule):
+        * css/CSSValue.h: Added.
+        * css/CSSValueList.cpp: Added.
+        * css/CSSValueList.h: Added.
+        * css/Counter.h: Added.
+        * css/DashboardRegion.h: Added.
+        * css/FontFamilyValue.cpp: Added.
+        * css/FontFamilyValue.h: Added.
+        (WebCore::FontFamilyValue::genericFamilyType):
+        * css/FontValue.cpp: Added.
+        (WebCore::FontValue::cssText):
+        * css/FontValue.h: Added.
+        * css/MediaList.cpp:
+        * css/Pair.h: Added.
+        (WebCore::Pair::~Pair):
+        * css/RectImpl.h: Added.
+        (WebCore::RectImpl::~RectImpl):
+        * css/ShadowValue.cpp: Added.
+        (WebCore::ShadowValue::ShadowValue):
+        * css/ShadowValue.h: Added.
+        * css/css_base.cpp:
+        * css/css_ruleimpl.cpp: Removed.
+        * css/css_ruleimpl.h: Removed.
+        * css/css_valueimpl.cpp: Removed.
+        * css/css_valueimpl.h: Removed.
+        * css/cssparser.cpp:
+        (WebCore::CSSParser::parseColor):
+        (WebCore::CSSParser::parseFontFamily):
+        * css/cssstyleselector.cpp:
+        (WebCore::CSSStyleSelector::locateCousinList):
+        (WebCore::CSSStyleSelector::checkSelector):
+        (WebCore::CSSRuleSet::addRulesFromSheet):
+        (WebCore::CSSStyleSelector::applyProperty):
+        (WebCore::CSSStyleSelector::mapBackgroundImage):
+        * css/cssstyleselector.h:
+        * dom/CSSMappedAttributeDeclaration.h:
+        (WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration):
+        * dom/Document.cpp:
+        * editing/ApplyStyleCommand.cpp:
+        * editing/CompositeEditCommand.h:
+        * editing/EditCommand.cpp:
+        * editing/InsertLineBreakCommand.cpp:
+        (WebCore::InsertLineBreakCommand::doApply):
+        * editing/InsertLineBreakCommand.h:
+        * editing/InsertTextCommand.cpp:
+        (WebCore::InsertTextCommand::input):
+        * editing/RemoveCSSPropertyCommand.cpp:
+        (WebCore::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand):
+        (WebCore::RemoveCSSPropertyCommand::~RemoveCSSPropertyCommand):
+        * editing/RemoveCSSPropertyCommand.h:
+        (WebCore::RemoveCSSPropertyCommand::styleDeclaration):
+        * html/HTMLBodyElement.cpp:
+        * html/HTMLElement.cpp:
+        * html/HTMLScriptElement.h:
+        * html/HTMLTokenizer.h:
+        * kcanvas/KCanvasFilters.h:
+        (WebCore::KCanvasFEColorMatrix::values):
+        (WebCore::KCanvasFEColorMatrix::setValues):
+        (WebCore::KCanvasFEConvolveMatrix::kernel):
+        (WebCore::KCanvasFEConvolveMatrix::setKernel):
+        * kcanvas/KCanvasPath.h:
+        * kcanvas/KCanvasTreeDebug.h:
+        (WebCore::operator<<):
+        * kcanvas/RenderPath.h:
+        * ksvg2/css/SVGCSSParser.cpp:
+        (WebCore::CSSParser::parseSVGValue):
+        (WebCore::CSSParser::parseSVGStrokeDasharray):
+        (WebCore::CSSParser::parseSVGPaint):
+        (WebCore::CSSParser::parseSVGColor):
+        * ksvg2/css/SVGCSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::applySVGProperty):
+        * ksvg2/css/SVGRenderStyleDefs.h:
+        * ksvg2/ecma/Ecma.cpp:
+        * ksvg2/misc/KCanvasRenderingStyle.cpp:
+        * ksvg2/misc/KCanvasRenderingStyle.h:
+        * ksvg2/svg/SVGAnimationElement.cpp:
+        * ksvg2/svg/SVGColor.cpp:
+        * ksvg2/svg/SVGColor.h:
+        * ksvg2/svg/SVGCursorElement.h:
+        * ksvg2/svg/SVGFEColorMatrixElement.cpp:
+        (SVGFEColorMatrixElement::filterEffect):
+        * page/DOMWindow.cpp:
+        * page/Frame.cpp:
+        * page/FramePrivate.h:
+        * platform/DeprecatedValueList.h:
+        * rendering/RenderTextField.cpp:
+
 2006-05-15  Darin Adler  <darin@apple.com>
 
         * WebCore.xcodeproj/project.pbxproj: Removed duplicate files that were
index 3550cdf965ecf3d4b18a9f903d2058fd45ac409d..cd1ce4561f4d4c8664673b7465e8629417b15716 100644 (file)
 #include "config.h"
 #if SVG_SUPPORT
 #include "RGBColor.h"
-#include "css_valueimpl.h"
+#include "CSSPrimitiveValue.h"
 
-using namespace WebCore;
+namespace WebCore {
 
-RGBColor::RGBColor(const RGBA32 &color) : Shared<RGBColor>(), m_color(color)
+RGBColor::RGBColor(const RGBA32 &color)
+    : Shared<RGBColor>()
+    , m_color(color)
 {
 }
 
-RGBColor::RGBColor(const Color &color) : Shared<RGBColor>(), m_color(color)
+RGBColor::RGBColor(const Color &color)
+    : Shared<RGBColor>()
+    , m_color(color)
 {
 }
 
@@ -54,6 +58,8 @@ CSSPrimitiveValue *RGBColor::blue() const
     return new CSSPrimitiveValue(float(m_color.alpha() ? m_color.blue() : 0), CSSPrimitiveValue::CSS_DIMENSION);
 }
 
+}
+
 // vim:ts=4:noet
 #endif // SVG_SUPPORT
 
index f329526db29c5b307793443b2de5158c773962ae..d4e73e76f07fd3facb6a5b0f4d50f71750bc1f52 100644 (file)
                                RelativePath="..\..\css\css_base.h"\r
                                >\r
                        </File>\r
-                       <File\r
-                               RelativePath="..\..\css\css_ruleimpl.cpp"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\css\css_ruleimpl.h"\r
-                               >\r
-                       </File>\r
                        <File\r
                                RelativePath="..\..\css\CSSStyleSheet.cpp"\r
                                >\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\css\css_valueimpl.cpp"\r
+                               RelativePath="..\..\css\CSSBorderImageValue.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSBorderImageValue.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSCharsetRule.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSFontFaceRule.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSFontFaceRule.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSImageValue.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSImageValue.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSImportRule.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSImportRule.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSInheritedValue.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSInheritedValue.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSInitialValue.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSInitialValue.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSMediaRule.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSMediaRule.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSMutableStyleDeclaration.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSMutableStyleDeclaration.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSPageRule.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSPageRule.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSPrimitiveValue.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSPrimitiveValue.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSProperty.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSProperty.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSQuirkPrimitiveValue.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSRule.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSRule.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSRuleList.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSRuleList.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSStyleDeclaration.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSStyleDeclaration.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSStyleRule.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSStyleRule.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSStyleRule.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSUnknownRule.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSValue.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSValueList.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\CSSValueList.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\Counter.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\DashboardRegion.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\FontFamilyValue.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\FontFamilyValue.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\FontValue.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\FontValue.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\Pair.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\css\RectImpl.h"\r
+                               >\r
+                       </File>                 \r
+                       <File\r
+                               RelativePath="..\..\css\ShadowValue.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\css\css_valueimpl.h"\r
+                               RelativePath="..\..\css\ShadowValue.h"\r
                                >\r
                        </File>\r
                        <File\r
index 57bf5c3b80f32a55dd7999ba10f17cc57c7746e6..392f212eb42786fa631fc7881e4f85e960a06c57 100644 (file)
                A7B97B850979C3A1000E8EB1 /* WKTableTransferFilter.cikernel in Resources */ = {isa = PBXBuildFile; fileRef = A7B97B740979C3A1000E8EB1 /* WKTableTransferFilter.cikernel */; };
                A7B97B860979C3A1000E8EB1 /* WKTableTransferFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B97B750979C3A1000E8EB1 /* WKTableTransferFilter.h */; };
                A7B97B870979C3A1000E8EB1 /* WKTableTransferFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B97B760979C3A1000E8EB1 /* WKTableTransferFilter.m */; };
+               A80E6CE40A1989CA007FB8C5 /* CSSValueList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CBA0A1989CA007FB8C5 /* CSSValueList.cpp */; };
+               A80E6CE50A1989CA007FB8C5 /* CSSBorderImageValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CBB0A1989CA007FB8C5 /* CSSBorderImageValue.cpp */; };
+               A80E6CE60A1989CA007FB8C5 /* CSSPrimitiveValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CBC0A1989CA007FB8C5 /* CSSPrimitiveValue.h */; };
+               A80E6CE70A1989CA007FB8C5 /* CSSFontFaceRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CBD0A1989CA007FB8C5 /* CSSFontFaceRule.cpp */; };
+               A80E6CE80A1989CA007FB8C5 /* ShadowValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CBE0A1989CA007FB8C5 /* ShadowValue.h */; };
+               A80E6CE90A1989CA007FB8C5 /* CSSValueList.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CBF0A1989CA007FB8C5 /* CSSValueList.h */; };
+               A80E6CEA0A1989CA007FB8C5 /* CSSQuirkPrimitiveValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CC00A1989CA007FB8C5 /* CSSQuirkPrimitiveValue.h */; };
+               A80E6CEB0A1989CA007FB8C5 /* CSSImportRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CC10A1989CA007FB8C5 /* CSSImportRule.cpp */; };
+               A80E6CEC0A1989CA007FB8C5 /* FontFamilyValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CC20A1989CA007FB8C5 /* FontFamilyValue.cpp */; };
+               A80E6CED0A1989CA007FB8C5 /* FontValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CC30A1989CA007FB8C5 /* FontValue.h */; };
+               A80E6CEE0A1989CA007FB8C5 /* CSSValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CC40A1989CA007FB8C5 /* CSSValue.h */; };
+               A80E6CEF0A1989CA007FB8C5 /* CSSStyleRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CC50A1989CA007FB8C5 /* CSSStyleRule.cpp */; };
+               A80E6CF00A1989CA007FB8C5 /* CSSInheritedValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CC60A1989CA007FB8C5 /* CSSInheritedValue.cpp */; };
+               A80E6CF10A1989CA007FB8C5 /* FontValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CC70A1989CA007FB8C5 /* FontValue.cpp */; };
+               A80E6CF20A1989CA007FB8C5 /* CSSRuleList.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CC80A1989CA007FB8C5 /* CSSRuleList.h */; };
+               A80E6CF30A1989CA007FB8C5 /* FontFamilyValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CC90A1989CA007FB8C5 /* FontFamilyValue.h */; };
+               A80E6CF40A1989CA007FB8C5 /* ShadowValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CCA0A1989CA007FB8C5 /* ShadowValue.cpp */; };
+               A80E6CF50A1989CA007FB8C5 /* CSSPageRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CCB0A1989CA007FB8C5 /* CSSPageRule.cpp */; };
+               A80E6CF60A1989CA007FB8C5 /* CSSImportRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CCC0A1989CA007FB8C5 /* CSSImportRule.h */; };
+               A80E6CF70A1989CA007FB8C5 /* CSSProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CCD0A1989CA007FB8C5 /* CSSProperty.cpp */; };
+               A80E6CF80A1989CA007FB8C5 /* CSSUnknownRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CCE0A1989CA007FB8C5 /* CSSUnknownRule.h */; };
+               A80E6CF90A1989CA007FB8C5 /* CSSCharsetRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CCF0A1989CA007FB8C5 /* CSSCharsetRule.h */; };
+               A80E6CFA0A1989CA007FB8C5 /* CSSImageValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CD00A1989CA007FB8C5 /* CSSImageValue.h */; };
+               A80E6CFB0A1989CA007FB8C5 /* Pair.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CD10A1989CA007FB8C5 /* Pair.h */; };
+               A80E6CFC0A1989CA007FB8C5 /* CSSMediaRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CD20A1989CA007FB8C5 /* CSSMediaRule.cpp */; };
+               A80E6CFD0A1989CA007FB8C5 /* CSSFontFaceRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CD30A1989CA007FB8C5 /* CSSFontFaceRule.h */; };
+               A80E6CFE0A1989CA007FB8C5 /* CSSImageValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CD40A1989CA007FB8C5 /* CSSImageValue.cpp */; };
+               A80E6CFF0A1989CA007FB8C5 /* CSSProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CD50A1989CA007FB8C5 /* CSSProperty.h */; };
+               A80E6D000A1989CA007FB8C5 /* CSSPageRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CD60A1989CA007FB8C5 /* CSSPageRule.h */; };
+               A80E6D010A1989CA007FB8C5 /* CSSInheritedValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CD70A1989CA007FB8C5 /* CSSInheritedValue.h */; };
+               A80E6D020A1989CA007FB8C5 /* CSSInitialValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CD80A1989CA007FB8C5 /* CSSInitialValue.cpp */; };
+               A80E6D030A1989CA007FB8C5 /* CSSMediaRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CD90A1989CA007FB8C5 /* CSSMediaRule.h */; };
+               A80E6D040A1989CA007FB8C5 /* Counter.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CDA0A1989CA007FB8C5 /* Counter.h */; };
+               A80E6D050A1989CA007FB8C5 /* CSSPrimitiveValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CDB0A1989CA007FB8C5 /* CSSPrimitiveValue.cpp */; };
+               A80E6D060A1989CA007FB8C5 /* CSSRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CDC0A1989CA007FB8C5 /* CSSRule.cpp */; };
+               A80E6D070A1989CA007FB8C5 /* CSSBorderImageValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CDD0A1989CA007FB8C5 /* CSSBorderImageValue.h */; };
+               A80E6D080A1989CA007FB8C5 /* CSSInitialValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CDE0A1989CA007FB8C5 /* CSSInitialValue.h */; };
+               A80E6D090A1989CA007FB8C5 /* CSSRuleList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CDF0A1989CA007FB8C5 /* CSSRuleList.cpp */; };
+               A80E6D0A0A1989CA007FB8C5 /* RectImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CE00A1989CA007FB8C5 /* RectImpl.h */; };
+               A80E6D0B0A1989CA007FB8C5 /* DashboardRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CE10A1989CA007FB8C5 /* DashboardRegion.h */; };
+               A80E6D0C0A1989CA007FB8C5 /* CSSStyleRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CE20A1989CA007FB8C5 /* CSSStyleRule.h */; };
+               A80E6D0D0A1989CA007FB8C5 /* CSSRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CE30A1989CA007FB8C5 /* CSSRule.h */; };
+               A80E6DFB0A199067007FB8C5 /* CSSMutableStyleDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6DF90A199067007FB8C5 /* CSSMutableStyleDeclaration.cpp */; };
+               A80E6DFC0A199067007FB8C5 /* CSSMutableStyleDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6DFA0A199067007FB8C5 /* CSSMutableStyleDeclaration.h */; };
+               A80E6E0F0A19911C007FB8C5 /* CSSStyleDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6E0D0A19911C007FB8C5 /* CSSStyleDeclaration.h */; };
+               A80E6E100A19911C007FB8C5 /* CSSStyleDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6E0E0A19911C007FB8C5 /* CSSStyleDeclaration.cpp */; };
                A81369CA097374F600D74463 /* HTMLIsIndexElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A81369AE097374F500D74463 /* HTMLIsIndexElement.h */; };
                A81369CB097374F600D74463 /* HTMLIsIndexElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81369AF097374F500D74463 /* HTMLIsIndexElement.cpp */; };
                A81369CC097374F600D74463 /* HTMLInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A81369B0097374F500D74463 /* HTMLInputElement.h */; };
                BCEA478E097CAAC80094C9E4 /* css_base.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA477B097CAAC80094C9E4 /* css_base.h */; };
                BCEA478F097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA477C097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp */; };
                BCEA4790097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA477D097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h */; };
-               BCEA4792097CAAC80094C9E4 /* css_ruleimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA477F097CAAC80094C9E4 /* css_ruleimpl.cpp */; };
-               BCEA4793097CAAC80094C9E4 /* css_ruleimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4780097CAAC80094C9E4 /* css_ruleimpl.h */; };
-               BCEA4796097CAAC80094C9E4 /* css_valueimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA4783097CAAC80094C9E4 /* css_valueimpl.cpp */; };
-               BCEA4797097CAAC80094C9E4 /* css_valueimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4784097CAAC80094C9E4 /* css_valueimpl.h */; };
                BCEA4798097CAAC80094C9E4 /* csshelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA4785097CAAC80094C9E4 /* csshelper.cpp */; };
                BCEA479A097CAAC80094C9E4 /* cssparser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA4787097CAAC80094C9E4 /* cssparser.cpp */; };
                BCEA479B097CAAC80094C9E4 /* cssparser.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4788097CAAC80094C9E4 /* cssparser.h */; };
                A7B97B740979C3A1000E8EB1 /* WKTableTransferFilter.cikernel */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = WKTableTransferFilter.cikernel; sourceTree = "<group>"; };
                A7B97B750979C3A1000E8EB1 /* WKTableTransferFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WKTableTransferFilter.h; sourceTree = "<group>"; };
                A7B97B760979C3A1000E8EB1 /* WKTableTransferFilter.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WKTableTransferFilter.m; sourceTree = "<group>"; };
+               A80E6CBA0A1989CA007FB8C5 /* CSSValueList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSValueList.cpp; sourceTree = "<group>"; };
+               A80E6CBB0A1989CA007FB8C5 /* CSSBorderImageValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSBorderImageValue.cpp; sourceTree = "<group>"; };
+               A80E6CBC0A1989CA007FB8C5 /* CSSPrimitiveValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSPrimitiveValue.h; sourceTree = "<group>"; };
+               A80E6CBD0A1989CA007FB8C5 /* CSSFontFaceRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontFaceRule.cpp; sourceTree = "<group>"; };
+               A80E6CBE0A1989CA007FB8C5 /* ShadowValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ShadowValue.h; sourceTree = "<group>"; };
+               A80E6CBF0A1989CA007FB8C5 /* CSSValueList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSValueList.h; sourceTree = "<group>"; };
+               A80E6CC00A1989CA007FB8C5 /* CSSQuirkPrimitiveValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSQuirkPrimitiveValue.h; sourceTree = "<group>"; };
+               A80E6CC10A1989CA007FB8C5 /* CSSImportRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSImportRule.cpp; sourceTree = "<group>"; };
+               A80E6CC20A1989CA007FB8C5 /* FontFamilyValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontFamilyValue.cpp; sourceTree = "<group>"; };
+               A80E6CC30A1989CA007FB8C5 /* FontValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontValue.h; sourceTree = "<group>"; };
+               A80E6CC40A1989CA007FB8C5 /* CSSValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSValue.h; sourceTree = "<group>"; };
+               A80E6CC50A1989CA007FB8C5 /* CSSStyleRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSStyleRule.cpp; sourceTree = "<group>"; };
+               A80E6CC60A1989CA007FB8C5 /* CSSInheritedValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSInheritedValue.cpp; sourceTree = "<group>"; };
+               A80E6CC70A1989CA007FB8C5 /* FontValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontValue.cpp; sourceTree = "<group>"; };
+               A80E6CC80A1989CA007FB8C5 /* CSSRuleList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSRuleList.h; sourceTree = "<group>"; };
+               A80E6CC90A1989CA007FB8C5 /* FontFamilyValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontFamilyValue.h; sourceTree = "<group>"; };
+               A80E6CCA0A1989CA007FB8C5 /* ShadowValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ShadowValue.cpp; sourceTree = "<group>"; };
+               A80E6CCB0A1989CA007FB8C5 /* CSSPageRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSPageRule.cpp; sourceTree = "<group>"; };
+               A80E6CCC0A1989CA007FB8C5 /* CSSImportRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSImportRule.h; sourceTree = "<group>"; };
+               A80E6CCD0A1989CA007FB8C5 /* CSSProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSProperty.cpp; sourceTree = "<group>"; };
+               A80E6CCE0A1989CA007FB8C5 /* CSSUnknownRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSUnknownRule.h; sourceTree = "<group>"; };
+               A80E6CCF0A1989CA007FB8C5 /* CSSCharsetRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSCharsetRule.h; sourceTree = "<group>"; };
+               A80E6CD00A1989CA007FB8C5 /* CSSImageValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSImageValue.h; sourceTree = "<group>"; };
+               A80E6CD10A1989CA007FB8C5 /* Pair.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Pair.h; sourceTree = "<group>"; };
+               A80E6CD20A1989CA007FB8C5 /* CSSMediaRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSMediaRule.cpp; sourceTree = "<group>"; };
+               A80E6CD30A1989CA007FB8C5 /* CSSFontFaceRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSFontFaceRule.h; sourceTree = "<group>"; };
+               A80E6CD40A1989CA007FB8C5 /* CSSImageValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSImageValue.cpp; sourceTree = "<group>"; };
+               A80E6CD50A1989CA007FB8C5 /* CSSProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSProperty.h; sourceTree = "<group>"; };
+               A80E6CD60A1989CA007FB8C5 /* CSSPageRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSPageRule.h; sourceTree = "<group>"; };
+               A80E6CD70A1989CA007FB8C5 /* CSSInheritedValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSInheritedValue.h; sourceTree = "<group>"; };
+               A80E6CD80A1989CA007FB8C5 /* CSSInitialValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSInitialValue.cpp; sourceTree = "<group>"; };
+               A80E6CD90A1989CA007FB8C5 /* CSSMediaRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSMediaRule.h; sourceTree = "<group>"; };
+               A80E6CDA0A1989CA007FB8C5 /* Counter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Counter.h; sourceTree = "<group>"; };
+               A80E6CDB0A1989CA007FB8C5 /* CSSPrimitiveValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSPrimitiveValue.cpp; sourceTree = "<group>"; };
+               A80E6CDC0A1989CA007FB8C5 /* CSSRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSRule.cpp; sourceTree = "<group>"; };
+               A80E6CDD0A1989CA007FB8C5 /* CSSBorderImageValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSBorderImageValue.h; sourceTree = "<group>"; };
+               A80E6CDE0A1989CA007FB8C5 /* CSSInitialValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSInitialValue.h; sourceTree = "<group>"; };
+               A80E6CDF0A1989CA007FB8C5 /* CSSRuleList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSRuleList.cpp; sourceTree = "<group>"; };
+               A80E6CE00A1989CA007FB8C5 /* RectImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RectImpl.h; sourceTree = "<group>"; };
+               A80E6CE10A1989CA007FB8C5 /* DashboardRegion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DashboardRegion.h; sourceTree = "<group>"; };
+               A80E6CE20A1989CA007FB8C5 /* CSSStyleRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSStyleRule.h; sourceTree = "<group>"; };
+               A80E6CE30A1989CA007FB8C5 /* CSSRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSRule.h; sourceTree = "<group>"; };
+               A80E6DF90A199067007FB8C5 /* CSSMutableStyleDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSMutableStyleDeclaration.cpp; sourceTree = "<group>"; };
+               A80E6DFA0A199067007FB8C5 /* CSSMutableStyleDeclaration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSMutableStyleDeclaration.h; sourceTree = "<group>"; };
+               A80E6E0D0A19911C007FB8C5 /* CSSStyleDeclaration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSStyleDeclaration.h; sourceTree = "<group>"; };
+               A80E6E0E0A19911C007FB8C5 /* CSSStyleDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSStyleDeclaration.cpp; sourceTree = "<group>"; };
                A810E39308A4160F00333D98 /* KCanvasTreeDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasTreeDebug.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A810E39408A4160F00333D98 /* KCanvasTreeDebug.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasTreeDebug.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8122C7E08D564B000844FA3 /* GetSVGDocument.idl */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = text; path = GetSVGDocument.idl; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                BCEA477C097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSComputedStyleDeclaration.cpp; sourceTree = "<group>"; };
                BCEA477D097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSComputedStyleDeclaration.h; sourceTree = "<group>"; };
                BCEA477E097CAAC80094C9E4 /* CSSGrammar.y */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.yacc; path = CSSGrammar.y; sourceTree = "<group>"; };
-               BCEA477F097CAAC80094C9E4 /* css_ruleimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = css_ruleimpl.cpp; sourceTree = "<group>"; };
-               BCEA4780097CAAC80094C9E4 /* css_ruleimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = css_ruleimpl.h; sourceTree = "<group>"; };
-               BCEA4783097CAAC80094C9E4 /* css_valueimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = css_valueimpl.cpp; sourceTree = "<group>"; };
-               BCEA4784097CAAC80094C9E4 /* css_valueimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = css_valueimpl.h; sourceTree = "<group>"; };
                BCEA4785097CAAC80094C9E4 /* csshelper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = csshelper.cpp; sourceTree = "<group>"; };
                BCEA4786097CAAC80094C9E4 /* csshelper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = csshelper.h; sourceTree = "<group>"; };
                BCEA4787097CAAC80094C9E4 /* cssparser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cssparser.cpp; sourceTree = "<group>"; };
                F523D18402DE42E8018635CA /* css */ = {
                        isa = PBXGroup;
                        children = (
+                               A80E6CDA0A1989CA007FB8C5 /* Counter.h */,
                                930705C709E0C95F00B17FE4 /* Counter.idl */,
                                BCEA477A097CAAC80094C9E4 /* css_base.cpp */,
                                BCEA477B097CAAC80094C9E4 /* css_base.h */,
-                               BCEA477F097CAAC80094C9E4 /* css_ruleimpl.cpp */,
-                               BCEA4780097CAAC80094C9E4 /* css_ruleimpl.h */,
-                               BCEA4783097CAAC80094C9E4 /* css_valueimpl.cpp */,
-                               BCEA4784097CAAC80094C9E4 /* css_valueimpl.h */,
+                               A80E6CBB0A1989CA007FB8C5 /* CSSBorderImageValue.cpp */,
+                               A80E6CDD0A1989CA007FB8C5 /* CSSBorderImageValue.h */,
+                               A80E6CCF0A1989CA007FB8C5 /* CSSCharsetRule.h */,
                                BCEA477C097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp */,
                                BCEA477D097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h */,
+                               A80E6CBD0A1989CA007FB8C5 /* CSSFontFaceRule.cpp */,
+                               A80E6CD30A1989CA007FB8C5 /* CSSFontFaceRule.h */,
                                BCEA477E097CAAC80094C9E4 /* CSSGrammar.y */,
                                BCEA4785097CAAC80094C9E4 /* csshelper.cpp */,
                                BCEA4786097CAAC80094C9E4 /* csshelper.h */,
+                               A80E6CD40A1989CA007FB8C5 /* CSSImageValue.cpp */,
+                               A80E6CD00A1989CA007FB8C5 /* CSSImageValue.h */,
+                               A80E6CC10A1989CA007FB8C5 /* CSSImportRule.cpp */,
+                               A80E6CCC0A1989CA007FB8C5 /* CSSImportRule.h */,
+                               A80E6CC60A1989CA007FB8C5 /* CSSInheritedValue.cpp */,
+                               A80E6CD70A1989CA007FB8C5 /* CSSInheritedValue.h */,
+                               A80E6CD80A1989CA007FB8C5 /* CSSInitialValue.cpp */,
+                               A80E6CDE0A1989CA007FB8C5 /* CSSInitialValue.h */,
+                               A80E6CD20A1989CA007FB8C5 /* CSSMediaRule.cpp */,
+                               A80E6CD90A1989CA007FB8C5 /* CSSMediaRule.h */,
+                               A80E6DF90A199067007FB8C5 /* CSSMutableStyleDeclaration.cpp */,
+                               A80E6DFA0A199067007FB8C5 /* CSSMutableStyleDeclaration.h */,
+                               A80E6CCB0A1989CA007FB8C5 /* CSSPageRule.cpp */,
+                               A80E6CD60A1989CA007FB8C5 /* CSSPageRule.h */,
                                BCEA4787097CAAC80094C9E4 /* cssparser.cpp */,
                                BCEA4788097CAAC80094C9E4 /* cssparser.h */,
+                               A80E6CDB0A1989CA007FB8C5 /* CSSPrimitiveValue.cpp */,
+                               A80E6CBC0A1989CA007FB8C5 /* CSSPrimitiveValue.h */,
                                9307059009E0C75800B17FE4 /* CSSPrimitiveValue.idl */,
+                               A80E6CCD0A1989CA007FB8C5 /* CSSProperty.cpp */,
+                               A80E6CD50A1989CA007FB8C5 /* CSSProperty.h */,
                                BCEA4789097CAAC80094C9E4 /* CSSPropertyNames.in */,
+                               A80E6CC00A1989CA007FB8C5 /* CSSQuirkPrimitiveValue.h */,
+                               A80E6CDC0A1989CA007FB8C5 /* CSSRule.cpp */,
+                               A80E6CE30A1989CA007FB8C5 /* CSSRule.h */,
                                14CF7A7009F5CF9A00EB3665 /* CSSRule.idl */,
+                               A80E6CDF0A1989CA007FB8C5 /* CSSRuleList.cpp */,
+                               A80E6CC80A1989CA007FB8C5 /* CSSRuleList.h */,
+                               A80E6E0E0A19911C007FB8C5 /* CSSStyleDeclaration.cpp */,
+                               A80E6E0D0A19911C007FB8C5 /* CSSStyleDeclaration.h */,
                                142011AE0A003117008303F9 /* CSSStyleDeclaration.idl */,
+                               A80E6CC50A1989CA007FB8C5 /* CSSStyleRule.cpp */,
+                               A80E6CE20A1989CA007FB8C5 /* CSSStyleRule.h */,
                                BCEA478A097CAAC80094C9E4 /* cssstyleselector.cpp */,
                                BCEA478B097CAAC80094C9E4 /* cssstyleselector.h */,
                                A8EA80000A19516E00A8EF5F /* CSSStyleSheet.cpp */,
                                A8EA7FFF0A19516E00A8EF5F /* CSSStyleSheet.h */,
+                               A80E6CCE0A1989CA007FB8C5 /* CSSUnknownRule.h */,
+                               A80E6CC40A1989CA007FB8C5 /* CSSValue.h */,
                                14CF787109F587CA00EB3665 /* CSSValue.idl */,
                                BCEA478C097CAAC80094C9E4 /* CSSValueKeywords.in */,
+                               A80E6CBA0A1989CA007FB8C5 /* CSSValueList.cpp */,
+                               A80E6CBF0A1989CA007FB8C5 /* CSSValueList.h */,
+                               A80E6CE10A1989CA007FB8C5 /* DashboardRegion.h */,
+                               A80E6CC20A1989CA007FB8C5 /* FontFamilyValue.cpp */,
+                               A80E6CC90A1989CA007FB8C5 /* FontFamilyValue.h */,
+                               A80E6CC70A1989CA007FB8C5 /* FontValue.cpp */,
+                               A80E6CC30A1989CA007FB8C5 /* FontValue.h */,
                                93CA4C9909DF93FA00DF8677 /* html4.css */,
                                93CA4C9A09DF93FA00DF8677 /* make-css-file-arrays.pl */,
                                93CA4C9B09DF93FA00DF8677 /* makeprop */,
                                93CA4C9D09DF93FA00DF8677 /* makevalues */,
                                A8EA80010A19516E00A8EF5F /* MediaList.cpp */,
                                A8EA80060A19516E00A8EF5F /* MediaList.h */,
+                               A80E6CD10A1989CA007FB8C5 /* Pair.h */,
                                93CA4C9F09DF93FA00DF8677 /* quirks.css */,
+                               A80E6CE00A1989CA007FB8C5 /* RectImpl.h */,
+                               A80E6CCA0A1989CA007FB8C5 /* ShadowValue.cpp */,
+                               A80E6CBE0A1989CA007FB8C5 /* ShadowValue.h */,
                                A8EA80050A19516E00A8EF5F /* StyleSheet.cpp */,
                                A8EA80040A19516E00A8EF5F /* StyleSheet.h */,
                                A8EA80030A19516E00A8EF5F /* StyleSheetList.cpp */,
                                BC1A37C2097C715F0019F3D8 /* DOMViewsInternal.h in Headers */,
                                BCEA478E097CAAC80094C9E4 /* css_base.h in Headers */,
                                BCEA4790097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h in Headers */,
-                               BCEA4793097CAAC80094C9E4 /* css_ruleimpl.h in Headers */,
-                               BCEA4797097CAAC80094C9E4 /* css_valueimpl.h in Headers */,
                                BCEA479B097CAAC80094C9E4 /* cssparser.h in Headers */,
                                BCEA479E097CAAC80094C9E4 /* cssstyleselector.h in Headers */,
                                BCEA4853097D93020094C9E4 /* bidi.h in Headers */,
                                A8EA800A0A19516E00A8EF5F /* StyleSheetList.h in Headers */,
                                A8EA800C0A19516E00A8EF5F /* StyleSheet.h in Headers */,
                                A8EA800E0A19516E00A8EF5F /* MediaList.h in Headers */,
+                               A80E6CE60A1989CA007FB8C5 /* CSSPrimitiveValue.h in Headers */,
+                               A80E6CE80A1989CA007FB8C5 /* ShadowValue.h in Headers */,
+                               A80E6CE90A1989CA007FB8C5 /* CSSValueList.h in Headers */,
+                               A80E6CEA0A1989CA007FB8C5 /* CSSQuirkPrimitiveValue.h in Headers */,
+                               A80E6CED0A1989CA007FB8C5 /* FontValue.h in Headers */,
+                               A80E6CEE0A1989CA007FB8C5 /* CSSValue.h in Headers */,
+                               A80E6CF20A1989CA007FB8C5 /* CSSRuleList.h in Headers */,
+                               A80E6CF30A1989CA007FB8C5 /* FontFamilyValue.h in Headers */,
+                               A80E6CF60A1989CA007FB8C5 /* CSSImportRule.h in Headers */,
+                               A80E6CF80A1989CA007FB8C5 /* CSSUnknownRule.h in Headers */,
+                               A80E6CF90A1989CA007FB8C5 /* CSSCharsetRule.h in Headers */,
+                               A80E6CFA0A1989CA007FB8C5 /* CSSImageValue.h in Headers */,
+                               A80E6CFB0A1989CA007FB8C5 /* Pair.h in Headers */,
+                               A80E6CFD0A1989CA007FB8C5 /* CSSFontFaceRule.h in Headers */,
+                               A80E6CFF0A1989CA007FB8C5 /* CSSProperty.h in Headers */,
+                               A80E6D000A1989CA007FB8C5 /* CSSPageRule.h in Headers */,
+                               A80E6D010A1989CA007FB8C5 /* CSSInheritedValue.h in Headers */,
+                               A80E6D030A1989CA007FB8C5 /* CSSMediaRule.h in Headers */,
+                               A80E6D040A1989CA007FB8C5 /* Counter.h in Headers */,
+                               A80E6D070A1989CA007FB8C5 /* CSSBorderImageValue.h in Headers */,
+                               A80E6D080A1989CA007FB8C5 /* CSSInitialValue.h in Headers */,
+                               A80E6D0A0A1989CA007FB8C5 /* RectImpl.h in Headers */,
+                               A80E6D0B0A1989CA007FB8C5 /* DashboardRegion.h in Headers */,
+                               A80E6D0C0A1989CA007FB8C5 /* CSSStyleRule.h in Headers */,
+                               A80E6D0D0A1989CA007FB8C5 /* CSSRule.h in Headers */,
+                               A80E6DFC0A199067007FB8C5 /* CSSMutableStyleDeclaration.h in Headers */,
+                               A80E6E0F0A19911C007FB8C5 /* CSSStyleDeclaration.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                BC1A37C1097C715F0019F3D8 /* DOMViews.mm in Sources */,
                                BCEA478D097CAAC80094C9E4 /* css_base.cpp in Sources */,
                                BCEA478F097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp in Sources */,
-                               BCEA4792097CAAC80094C9E4 /* css_ruleimpl.cpp in Sources */,
-                               BCEA4796097CAAC80094C9E4 /* css_valueimpl.cpp in Sources */,
                                BCEA4798097CAAC80094C9E4 /* csshelper.cpp in Sources */,
                                BCEA479A097CAAC80094C9E4 /* cssparser.cpp in Sources */,
                                BCEA479D097CAAC80094C9E4 /* cssstyleselector.cpp in Sources */,
                                A8EA80090A19516E00A8EF5F /* MediaList.cpp in Sources */,
                                A8EA800B0A19516E00A8EF5F /* StyleSheetList.cpp in Sources */,
                                A8EA800D0A19516E00A8EF5F /* StyleSheet.cpp in Sources */,
+                               A80E6CE40A1989CA007FB8C5 /* CSSValueList.cpp in Sources */,
+                               A80E6CE50A1989CA007FB8C5 /* CSSBorderImageValue.cpp in Sources */,
+                               A80E6CE70A1989CA007FB8C5 /* CSSFontFaceRule.cpp in Sources */,
+                               A80E6CEB0A1989CA007FB8C5 /* CSSImportRule.cpp in Sources */,
+                               A80E6CEC0A1989CA007FB8C5 /* FontFamilyValue.cpp in Sources */,
+                               A80E6CEF0A1989CA007FB8C5 /* CSSStyleRule.cpp in Sources */,
+                               A80E6CF00A1989CA007FB8C5 /* CSSInheritedValue.cpp in Sources */,
+                               A80E6CF10A1989CA007FB8C5 /* FontValue.cpp in Sources */,
+                               A80E6CF40A1989CA007FB8C5 /* ShadowValue.cpp in Sources */,
+                               A80E6CF50A1989CA007FB8C5 /* CSSPageRule.cpp in Sources */,
+                               A80E6CF70A1989CA007FB8C5 /* CSSProperty.cpp in Sources */,
+                               A80E6CFC0A1989CA007FB8C5 /* CSSMediaRule.cpp in Sources */,
+                               A80E6CFE0A1989CA007FB8C5 /* CSSImageValue.cpp in Sources */,
+                               A80E6D020A1989CA007FB8C5 /* CSSInitialValue.cpp in Sources */,
+                               A80E6D050A1989CA007FB8C5 /* CSSPrimitiveValue.cpp in Sources */,
+                               A80E6D060A1989CA007FB8C5 /* CSSRule.cpp in Sources */,
+                               A80E6D090A1989CA007FB8C5 /* CSSRuleList.cpp in Sources */,
+                               A80E6DFB0A199067007FB8C5 /* CSSMutableStyleDeclaration.cpp in Sources */,
+                               A80E6E100A19911C007FB8C5 /* CSSStyleDeclaration.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 06890b1d9741edc4ae9695db421604d9fa58fbf5..f727cdc942a8fbcc90659a59d719f3855fb28d12 100644 (file)
 #include "config.h"
 #include "kjs_css.h"
 
+#include "CSSCharsetRule.h"
+#include "CSSFontFaceRule.h"
+#include "CSSImportRule.h"
+#include "CSSMediaRule.h"
+#include "CSSPageRule.h"
+#include "CSSRule.h"
+#include "CSSRuleList.h"
+#include "CSSStyleRule.h"
+#include "CSSValueList.h"
 #include "Document.h"
 #include "HTMLNames.h"
 #include "HTMLStyleElement.h"
@@ -32,8 +41,6 @@
 #include "MediaList.h"
 #include "StyleSheetList.h"
 #include "css_base.h"
-#include "css_ruleimpl.h"
-#include "css_valueimpl.h"
 #include "kjs_dom.h"
 
 #include "kjs_css.lut.h"
@@ -734,7 +741,7 @@ const ClassInfo DOMCSSRule::charset_info = { "CSSCharsetRule", &DOMCSSRule::info
 
 const ClassInfo* DOMCSSRule::classInfo() const
 {
-  CSSRule &cssRule = *m_impl;
+  CSSRulecssRule = *m_impl;
   switch (cssRule.type()) {
   case CSSRule::STYLE_RULE:
     return &style_info;
index 23e839f8ceb4e6b2d3b2922bd9cbf5e3365cd3a7..e70ba73d93b95d32be48f6491499ad4b90cd7fcd 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "Color.h"
 #include "kjs_binding.h"
+#include "RectImpl.h"
 
 namespace WebCore {
     class Counter;
@@ -37,7 +38,6 @@ namespace WebCore {
     class CSSValueList;
     class JSCSSStyleDeclaration;
     class MediaList;
-    class RectImpl;
     class StyleSheet;
     class StyleSheetList;
 }
index 4730618d5c3abd8d3fb00837802c8a749bc6347a..8f7f931b365a5928d9bf925fea18facf77bf4eba 100644 (file)
@@ -55,7 +55,6 @@
 #include "ProcessingInstruction.h"
 #include "Range.h"
 #include "RenderCanvas.h"
-#include "css_ruleimpl.h"
 #include "dom2_eventsimpl.h"
 #include "kjs_css.h"
 #include "kjs_events.h"
index 9e32fcd4d80dab52a9449ffa5febbb40bf9a7ba3..c82e30a36a192ff29c6d030613e705db37bf9c8e 100644 (file)
@@ -83,7 +83,6 @@
 #include "NameNodeList.h"
 #include "RenderLayer.h"
 #include "Text.h"
-#include "css_ruleimpl.h"
 #include "dom2_eventsimpl.h"
 #include "kjs_css.h"
 #include "kjs_events.h"
index 52f53c8c01974429d31c20f73672d5e3d5ee1e9d..43028fff1d8cf7bc23c71ba70b8b1a6043934b7d 100644 (file)
@@ -47,7 +47,6 @@
 #include "RenderCanvas.h"
 #include "Screen.h"
 #include "SelectionController.h"
-#include "css_ruleimpl.h"
 #include "dom2_eventsimpl.h"
 #include "htmlediting.h"
 #include "kjs_css.h"
index e39637dbd9233e9372584bdb47af0319fad73186..0c5dd6bc8470a72ef92d74ca2d47bdbc80af2341 100644 (file)
 #import "config.h"
 #import "DOMCSS.h"
 
+#import "CSSCharsetRule.h"
+#import "CSSFontFaceRule.h"
+#import "CSSImportRule.h"
+#import "CSSMediaRule.h"
+#import "CSSPageRule.h"
+#import "CSSRule.h"
+#import "CSSRuleList.h"
+#import "CSSStyleRule.h"
 #import "CSSStyleSheet.h"
+#import "CSSValueList.h"
+#import "Counter.h"
 #import "DOMInternal.h"
 #import "DOMWindow.h"
 #import "Document.h"
 #import "HTMLStyleElement.h"
 #import "MediaList.h"
 #import "ProcessingInstruction.h"
+#import "RectImpl.h"
 #import "StyleSheet.h"
 #import "StyleSheetList.h"
-#import "css_ruleimpl.h"
+
 #import <objc/objc-class.h>
 
 using namespace WebCore;
index 27b98d717d9c1ec7364ee965be9d5728358ff66f..aed26ac712c14cbf9766dcb70a290a6ed9c3af79 100644 (file)
@@ -146,20 +146,7 @@ sub AddIncludesForType
   # When we're finished with the one-file-per-class 
   # reorganization, we don't need these special cases.
   
-  if ($type eq "CSSRuleList" or
-           $type eq "CSSRule") {
-    $implIncludes{"css_ruleimpl.h"} = 1;
-  } elsif ($type eq "CSSPrimitiveValue" or 
-           $type eq "CSSValue" or
-           $type eq "Counter" or 
-           $type eq "Rect" or 
-           $type eq "RGBColor") {
-    $implIncludes{"css_valueimpl.h"} = 1;
-  } elsif ($type eq "CSSStyleDeclaration") {
-    $implIncludes{"css_valueimpl.h"} = 1;
-  } elsif ($type eq "HTMLDocument") {
-    $implIncludes{"HTMLDocument.h"} = 1;
-  } elsif ($type eq "MutationEvent" or
+  if ($type eq "MutationEvent" or
            $type eq "KeyboardEvent" or
            $type eq "MouseEvent" or
            $type eq "Event" or
@@ -179,7 +166,7 @@ sub AddIncludesForType
     $implIncludes{"CanvasGradient.h"} = 1;
     $implIncludes{"PlatformString.h"} = 1;
   } elsif ($codeGenerator->IsPrimitiveType($type) or
-           $type eq "DOMString" or $type eq "DOMObject") {
+           $type eq "DOMString" or $type eq "DOMObject" or $type eq "RGBColor" or $type eq "Rect") {
   } else {
     # default, include the same named file
     $implIncludes{"${type}.h"} = 1;
@@ -982,7 +969,6 @@ sub NativeToJSValue
   } elsif ($type eq "CSSStyleSheet" or $type eq "StyleSheet" or $type eq "MediaList") {
     $implIncludes{"CSSStyleSheet.h"} = 1;
     $implIncludes{"MediaList.h"} = 1;
-    $implIncludes{"css_ruleimpl.h"} = 1;
     $implIncludes{"kjs_css.h"} = 1;
     return "toJS(exec, $value)";
   } elsif ($type eq "StyleSheetList") {
@@ -990,10 +976,11 @@ sub NativeToJSValue
      $implIncludes{"kjs_css.h"} = 1;
      return "toJS(exec, $value, impl)";
   } elsif ($type eq "CSSRuleList") {
-    $implIncludes{"css_ruleimpl.h"} = 1;
-    return "toJS(exec, $value)";  
-  } elsif ($type eq "CSSStyleDeclaration" or $type eq "Rect") {
-    $implIncludes{"css_valueimpl.h"} = 1;
+     $implIncludes{"CSSRuleList.h"} = 1;
+     return "toJS(exec, $value)";  
+   } elsif ($type eq "CSSStyleDeclaration" or $type eq "Rect") {
+    $implIncludes{"CSSStyleDeclaration.h"} = 1;
+    $implIncludes{"RectImpl.h"} = 1;
     $implIncludes{"kjs_css.h"} = 1;
     return "toJS(exec, $value)";
   } elsif ($type eq "RGBColor") {
@@ -1003,14 +990,6 @@ sub NativeToJSValue
     $implIncludes{"kjs_dom.h"} = 1;
     $implIncludes{"HTMLCanvasElement.h"} = 1;
     return "toJS(exec, $value)";
-  } elsif ($type eq "CanvasGradient" or 
-           $type eq "Counter" or 
-           $type eq "Range" or
-           $type eq "XPathExpression" or
-           $type eq "XPathNSResolver" or
-           $type eq "XPathResult") {
-    $implIncludes{"JS$type.h"} = 1;
-    return "toJS(exec, $value)";
   } elsif ($type eq "NodeIterator" or
           $type eq "TreeWalker") {
     $implIncludes{"kjs_traversal.h"} = 1;
@@ -1021,10 +1000,9 @@ sub NativeToJSValue
   } elsif ($type eq "DOMObject") {
     $implIncludes{"JSCanvasRenderingContext2DBase.h"} = 1;
     return "toJS(exec, $value)";
+  } else {
     $implIncludes{"JS$type.h"} = 1;
     return "toJS(exec, $value)";
-  } else {
-    die "Don't know how to convert a value of type $type to a JS Value";
   }
   
   die ("$value " . $signature->type);
diff --git a/WebCore/css/CSSBorderImageValue.cpp b/WebCore/css/CSSBorderImageValue.cpp
new file mode 100644 (file)
index 0000000..dff511c
--- /dev/null
@@ -0,0 +1,63 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSBorderImageValue.h"
+
+#include "CSSImageValue.h"
+#include "RectImpl.h"
+
+namespace WebCore {
+
+CSSBorderImageValue::CSSBorderImageValue(PassRefPtr<CSSImageValue> image,
+    PassRefPtr<RectImpl> imageRect, int horizontalRule, int verticalRule)
+    : m_image(image)
+    , m_imageSliceRect(imageRect)
+    , m_horizontalSizeRule(horizontalRule)
+    , m_verticalSizeRule(verticalRule)
+{
+}
+
+String CSSBorderImageValue::cssText() const
+{
+    // Image first.
+    String text(m_image->cssText());
+    text += " ";
+    
+    // Now the rect, but it isn't really a rect, so we dump manually
+    text += m_imageSliceRect->top()->cssText();
+    text += " ";
+    text += m_imageSliceRect->right()->cssText();
+    text += " ";
+    text += m_imageSliceRect->bottom()->cssText();
+    text += " ";
+    text += m_imageSliceRect->left()->cssText();
+    
+    // Now the keywords.
+    text += " ";
+    text += CSSPrimitiveValue(m_horizontalSizeRule).cssText();
+    text += " ";
+    text += CSSPrimitiveValue(m_verticalSizeRule).cssText();
+
+    return text;
+}
+
+}
diff --git a/WebCore/css/CSSBorderImageValue.h b/WebCore/css/CSSBorderImageValue.h
new file mode 100644 (file)
index 0000000..a7823a0
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSBorderImageValue_H
+#define CSSBorderImageValue_H
+
+#include "CSSValue.h"
+
+namespace WebCore {
+
+class CSSImageValue;
+class RectImpl;
+
+class CSSBorderImageValue : public CSSValue
+{
+public:
+    CSSBorderImageValue();
+    CSSBorderImageValue(PassRefPtr<CSSImageValue>, PassRefPtr<RectImpl>, int horizontalRule, int verticalRule);
+
+    virtual String cssText() const;
+
+public:
+    // The border image.
+    RefPtr<CSSImageValue> m_image;
+
+    // These four values are used to make "cuts" in the image.  They can be numbers
+    // or percentages.
+    RefPtr<RectImpl> m_imageSliceRect;
+    
+    // Values for how to handle the scaling/stretching/tiling of the image slices.
+    int m_horizontalSizeRule; // Rule for how to adjust the widths of the top/middle/bottom
+    int m_verticalSizeRule; // Rule for how to adjust the heights of the left/middle/right
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSCharsetRule.h b/WebCore/css/CSSCharsetRule.h
new file mode 100644 (file)
index 0000000..8616c4b
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSCharsetRule_H
+#define CSSCharsetRule_H
+
+#include "CSSRule.h"
+
+namespace WebCore {
+
+class CSSCharsetRule : public CSSRule
+{
+public:
+    CSSCharsetRule(StyleBase* parent) : CSSRule(parent) { m_type = CHARSET_RULE; }
+
+    virtual bool isCharsetRule() { return true; }
+    virtual String cssText() const;
+
+    String encoding() const { return m_encoding; }
+    void setEncoding(String _encoding) { m_encoding = _encoding; }
+
+protected:
+    String m_encoding;
+};
+
+} // namespace
+
+#endif
index 3400e2be4003e8dca3f111cb4c0d3d38d2febaa6..dec0e16d548c83a8780d3b16619ad5b6f9dd14c8 100644 (file)
 #include "CSSComputedStyleDeclaration.h"
 
 #include "CachedImage.h"
+#include "DashboardRegion.h"
 #include "Document.h"
 #include "ExceptionCode.h"
+#include "CSSMutableStyleDeclaration.h"
+#include "CSSPrimitiveValue.h"
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
+#include "CSSValueList.h"
+#include "Pair.h"
 #include "RenderObject.h"
+#include "ShadowValue.h"
 
 extern WebCore::String getPropertyName(unsigned short id);
 
@@ -208,16 +214,16 @@ static CSSValue *valueForTextAlign(ETextAlign align)
     return 0;
 }
 
-static CSSValue* valueForShadow(const ShadowData *shadow)
+static CSSValue* valueForShadow(const ShadowDatashadow)
 {
     if (!shadow)
         return new CSSPrimitiveValue(CSS_VAL_NONE);
-    CSSValueList *list = new CSSValueList;
-    for (const ShadowData *s = shadow; s; s = s->next) {
-        CSSPrimitiveValue *x = new CSSPrimitiveValue(s->x, CSSPrimitiveValue::CSS_PX);
-        CSSPrimitiveValue *y = new CSSPrimitiveValue(s->y, CSSPrimitiveValue::CSS_PX);
-        CSSPrimitiveValue *blur = new CSSPrimitiveValue(s->blur, CSSPrimitiveValue::CSS_PX);
-        CSSPrimitiveValue *color = new CSSPrimitiveValue(s->color.rgb());
+    CSSValueListlist = new CSSValueList;
+    for (const ShadowDatas = shadow; s; s = s->next) {
+        CSSPrimitiveValuex = new CSSPrimitiveValue(s->x, CSSPrimitiveValue::CSS_PX);
+        CSSPrimitiveValuey = new CSSPrimitiveValue(s->y, CSSPrimitiveValue::CSS_PX);
+        CSSPrimitiveValueblur = new CSSPrimitiveValue(s->blur, CSSPrimitiveValue::CSS_PX);
+        CSSPrimitiveValuecolor = new CSSPrimitiveValue(s->color.rgb());
         list->append(new ShadowValue(x, y, blur, color));
     }
     return list;
@@ -1267,6 +1273,33 @@ String CSSComputedStyleDeclaration::item(unsigned i) const
     return getPropertyName(computedProperties[i]);
 }
 
+// This is the list of properties we want to copy in the copyInheritableProperties() function.
+// It is the intersection of the list of inherited CSS properties and the
+// properties for which we have a computed implementation in this file.
+const int inheritableProperties[] = {
+    CSS_PROP_BORDER_COLLAPSE,
+    CSS_PROP_BORDER_SPACING,
+    CSS_PROP_COLOR,
+    CSS_PROP_FONT_FAMILY,
+    CSS_PROP_FONT_SIZE,
+    CSS_PROP_FONT_STYLE,
+    CSS_PROP_FONT_VARIANT,
+    CSS_PROP_FONT_WEIGHT,
+    CSS_PROP_LETTER_SPACING,
+    CSS_PROP_LINE_HEIGHT,
+    CSS_PROP_TEXT_ALIGN,
+    CSS_PROP__WEBKIT_TEXT_DECORATIONS_IN_EFFECT,
+    CSS_PROP_TEXT_INDENT,
+    CSS_PROP__WEBKIT_TEXT_SIZE_ADJUST,
+    CSS_PROP_TEXT_TRANSFORM,
+    CSS_PROP_ORPHANS,
+    CSS_PROP_WHITE_SPACE,
+    CSS_PROP_WIDOWS,
+    CSS_PROP_WORD_SPACING,
+};
+
+const unsigned numInheritableProperties = sizeof(inheritableProperties) / sizeof(inheritableProperties[0]);
+
 PassRefPtr<CSSMutableStyleDeclaration> CSSComputedStyleDeclaration::copyInheritableProperties() const
 {
     return copyPropertiesInSet(inheritableProperties, numInheritableProperties);
index d9b50782a386170938ad0bf73ddf6f07bb8bbb0c..671d684556c1bcccb5881ee193ecf84299c6e45c 100644 (file)
 #ifndef CSS_COMPUTEDSTYLE_H
 #define CSS_COMPUTEDSTYLE_H
 
-#include "css_valueimpl.h"
+#include "CSSStyleDeclaration.h"
+#include "Node.h"
 
 namespace WebCore {
 
+class CSSMutableStyleDeclaration;
 class CSSProperty;
 class RenderObject;
 class RenderStyle;
diff --git a/WebCore/css/CSSFontFaceRule.cpp b/WebCore/css/CSSFontFaceRule.cpp
new file mode 100644 (file)
index 0000000..9c9cfde
--- /dev/null
@@ -0,0 +1,40 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSFontFaceRule.h"
+
+#include "CSSMutableStyleDeclaration.h"
+
+namespace WebCore {
+
+CSSFontFaceRule::CSSFontFaceRule(StyleBase* parent)
+    : CSSRule(parent)
+{
+    m_type = FONT_FACE_RULE;
+}
+
+CSSFontFaceRule::~CSSFontFaceRule()
+{
+}
+
+}
diff --git a/WebCore/css/CSSFontFaceRule.h b/WebCore/css/CSSFontFaceRule.h
new file mode 100644 (file)
index 0000000..1324a66
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSFontFaceRule_H
+#define CSSFontFaceRule_H
+
+#include "CSSRule.h"
+
+namespace WebCore {
+
+class CSSMutableStyleDeclaration;
+
+class CSSFontFaceRule : public CSSRule
+{
+public:
+    CSSFontFaceRule(StyleBase* parent);
+    virtual ~CSSFontFaceRule();
+
+    CSSMutableStyleDeclaration* style() const { return m_style.get(); }
+
+    virtual bool isFontFaceRule() { return true; }
+
+protected:
+    RefPtr<CSSMutableStyleDeclaration> m_style;
+};
+
+} // namespace
+
+#endif
index 9f53919b33a9353c527d56abd1d4969b3df3a8f9..6f09033d9ad04d839c7a89a12b53d88ec3f8b139 100644 (file)
 
 #include "config.h"
 
+#include "CSSMediaRule.h"
+#include "CSSPrimitiveValue.h"
+#include "CSSRule.h"
+#include "CSSRuleList.h"
 #include "CSSStyleSheet.h"
 #include "Document.h"
 #include "HTMLNames.h"
 #include "MediaList.h"
 #include "PlatformString.h"
-#include "css_ruleimpl.h"
-#include "css_valueimpl.h"
 #include "cssparser.h"
 #include <assert.h>
 #include <stdlib.h>
@@ -120,12 +122,12 @@ static inline int getValueID(const char* tagStr, int len)
 %pure_parser
 
 %union {
-    CSSRule *rule;
-    CSSSelector *selector;
+    CSSRulerule;
+    CSSSelectorselector;
     bool ok;
     MediaList *mediaList;
-    CSSMediaRule *mediaRule;
-    CSSRuleList *ruleList;
+    CSSMediaRulemediaRule;
+    CSSRuleListruleList;
     ParseString string;
     float val;
     int prop_id;
@@ -135,7 +137,7 @@ static inline int getValueID(const char* tagStr, int len)
     int i;
     char tok;
     Value value;
-    ValueList *valueList;
+    ValueListvalueList;
 }
 
 %{
diff --git a/WebCore/css/CSSImageValue.cpp b/WebCore/css/CSSImageValue.cpp
new file mode 100644 (file)
index 0000000..b5d5731
--- /dev/null
@@ -0,0 +1,69 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSImageValue.h"
+
+#include "Cache.h"
+#include "CachedImage.h"
+#include "CSSValueKeywords.h"
+#include "DocLoader.h"
+
+namespace WebCore {
+
+CSSImageValue::CSSImageValue(const String& url, StyleBase* style)
+    : CSSPrimitiveValue(url, CSS_URI)
+    , m_image(0)
+    , m_accessedImage(false)
+{
+}
+
+CSSImageValue::CSSImageValue()
+    : CSSPrimitiveValue(CSS_VAL_NONE)
+    , m_image(0)
+    , m_accessedImage(true)
+{
+}
+
+CSSImageValue::~CSSImageValue()
+{
+    if (m_image)
+        m_image->deref(this);
+}
+
+CachedImage* CSSImageValue::image(DocLoader* loader)
+{
+    if (!m_accessedImage) {
+        m_accessedImage = true;
+
+        if (loader)
+            m_image = loader->requestImage(getStringValue());
+        else
+            m_image = Cache::requestImage(0, getStringValue());
+        
+        if (m_image)
+            m_image->ref(this);
+    }
+    
+    return m_image;
+}
+
+}
diff --git a/WebCore/css/CSSImageValue.h b/WebCore/css/CSSImageValue.h
new file mode 100644 (file)
index 0000000..e775ba8
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSImageValue_H
+#define CSSImageValue_H
+
+#include "CSSPrimitiveValue.h"
+#include "CachedObjectClient.h"
+
+namespace WebCore {
+
+class DocLoader;
+
+class CSSImageValue : public CSSPrimitiveValue, public CachedObjectClient
+{
+public:
+    CSSImageValue();
+    CSSImageValue(const String& url, StyleBase*);
+    virtual ~CSSImageValue();
+
+    CachedImage* image(DocLoader*);
+
+protected:
+    CachedImage* m_image;
+    bool m_accessedImage;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSImportRule.cpp b/WebCore/css/CSSImportRule.cpp
new file mode 100644 (file)
index 0000000..d25b960
--- /dev/null
@@ -0,0 +1,124 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSImportRule.h"
+
+#include "CachedCSSStyleSheet.h"
+#include "CSSStyleSheet.h"
+#include "DocLoader.h"
+#include "KURL.h"
+#include "MediaList.h"
+
+namespace WebCore {
+
+CSSImportRule::CSSImportRule(StyleBase* parent, const String& href, MediaList* media)
+    : CSSRule(parent)
+    , m_strHref(href)
+    , m_lstMedia(media)
+    , m_cachedSheet(0)
+    , m_loading(false)
+{
+    m_type = IMPORT_RULE;
+
+    if (m_lstMedia)
+        m_lstMedia->setParent(this);
+    else
+        m_lstMedia = new MediaList(this, String());
+}
+
+CSSImportRule::~CSSImportRule()
+{
+    if (m_lstMedia)
+        m_lstMedia->setParent(0);
+    if (m_styleSheet)
+        m_styleSheet->setParent(0);
+    if (m_cachedSheet)
+        m_cachedSheet->deref(this);
+}
+
+void CSSImportRule::setStyleSheet(const String &url, const String &sheet)
+{
+    if (m_styleSheet)
+        m_styleSheet->setParent(0);
+    m_styleSheet = new CSSStyleSheet(this, url);
+
+    CSSStyleSheet *parent = parentStyleSheet();
+    m_styleSheet->parseString(sheet, !parent || parent->useStrictParsing());
+    m_loading = false;
+
+    checkLoaded();
+}
+
+bool CSSImportRule::isLoading() const
+{
+    return m_loading || (m_styleSheet && m_styleSheet->isLoading());
+}
+
+void CSSImportRule::insertedIntoParent()
+{
+    StyleBase* root = this;
+    StyleBase* parent;
+    while ((parent = root->parent()))
+        root = parent;
+    if (!root->isCSSStyleSheet())
+        return;
+    DocLoader* docLoader = static_cast<CSSStyleSheet*>(root)->docLoader();
+    if (!docLoader)
+        return;
+
+    String absHref = m_strHref;
+    CSSStyleSheet* parentSheet = parentStyleSheet();
+    if (!parentSheet->href().isNull())
+        // use parent styleheet's URL as the base URL
+        absHref = KURL(parentSheet->href().deprecatedString(), m_strHref.deprecatedString()).url();
+
+    // Check for a cycle in our import chain.  If we encounter a stylesheet
+    // in our parent chain with the same URL, then just bail.
+    for (parent = static_cast<StyleBase*>(this)->parent(); parent; parent = parent->parent())
+        if (absHref == parent->baseURL())
+            return;
+    
+    // ### pass correct charset here!!
+    m_cachedSheet = docLoader->requestStyleSheet(absHref, DeprecatedString::null);
+    if (m_cachedSheet) {
+        m_loading = true;
+        m_cachedSheet->ref(this);
+    }
+}
+
+String CSSImportRule::cssText() const
+{
+    String result = "@import url(\"";
+    result += m_strHref;
+    result += "\")";
+
+    if (m_lstMedia) {
+        result += " ";
+        result += m_lstMedia->mediaText();
+    }
+    result += ";";
+
+    return result;
+}
+
+}
diff --git a/WebCore/css/CSSImportRule.h b/WebCore/css/CSSImportRule.h
new file mode 100644 (file)
index 0000000..078a446
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSImportRule_H
+#define CSSImportRule_H
+
+#include "CSSRule.h"
+#include "CachedObjectClient.h"
+
+namespace WebCore {
+
+class CachedCSSStyleSheet;
+
+class CSSImportRule : public CSSRule, public CachedObjectClient
+{
+public:
+    CSSImportRule(StyleBase* parent, const String& href, MediaList*);
+    virtual ~CSSImportRule();
+
+    String href() const { return m_strHref; }
+    MediaList* media() const { return m_lstMedia.get(); }
+    CSSStyleSheet* styleSheet() const { return m_styleSheet.get(); }
+
+    virtual bool isImportRule() { return true; }
+    virtual String cssText() const;
+  
+    bool isLoading() const;
+
+    // from CachedObjectClient
+    virtual void setStyleSheet(const String& url, const String& sheet);
+
+    virtual void insertedIntoParent();
+
+protected:
+    String m_strHref;
+    RefPtr<MediaList> m_lstMedia;
+    RefPtr<CSSStyleSheet> m_styleSheet;
+    CachedCSSStyleSheet* m_cachedSheet;
+    bool m_loading;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSInheritedValue.cpp b/WebCore/css/CSSInheritedValue.cpp
new file mode 100644 (file)
index 0000000..56c0944
--- /dev/null
@@ -0,0 +1,37 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSInheritedValue.h"
+
+namespace WebCore {
+
+unsigned short CSSInheritedValue::cssValueType() const
+{
+    return CSS_INHERIT;
+}
+
+String CSSInheritedValue::cssText() const
+{
+    return "inherit";
+}
+
+}
diff --git a/WebCore/css/CSSInheritedValue.h b/WebCore/css/CSSInheritedValue.h
new file mode 100644 (file)
index 0000000..828879d
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSInheritedValue_H
+#define CSSInheritedValue_H
+
+#include "CSSValue.h"
+
+namespace WebCore {
+
+class CSSInheritedValue : public CSSValue
+{
+public:
+    virtual unsigned short cssValueType() const;
+    virtual String cssText() const;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSInitialValue.cpp b/WebCore/css/CSSInitialValue.cpp
new file mode 100644 (file)
index 0000000..a5e5eec
--- /dev/null
@@ -0,0 +1,37 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSInitialValue.h"
+
+namespace WebCore {
+
+unsigned short CSSInitialValue::cssValueType() const
+{ 
+    return CSS_INITIAL; 
+}
+
+String CSSInitialValue::cssText() const
+{
+    return "initial";
+}
+
+}
diff --git a/WebCore/css/CSSInitialValue.h b/WebCore/css/CSSInitialValue.h
new file mode 100644 (file)
index 0000000..767e6f2
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSInitialValue_H
+#define CSSInitialValue_H
+
+#include "CSSValue.h"
+
+namespace WebCore {
+
+class CSSInitialValue : public CSSValue
+{
+public:
+    virtual unsigned short cssValueType() const;
+    virtual String cssText() const;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSMediaRule.cpp b/WebCore/css/CSSMediaRule.cpp
new file mode 100644 (file)
index 0000000..0eb2171
--- /dev/null
@@ -0,0 +1,112 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSMediaRule.h"
+
+#include "cssparser.h"
+#include "CSSRuleList.h"
+#include "MediaList.h"
+
+namespace WebCore {
+
+CSSMediaRule::CSSMediaRule(StyleBase* parent, MediaList* mediaList, CSSRuleList* ruleList)
+    : CSSRule(parent)
+    , m_lstMedia(mediaList)
+    , m_lstCSSRules(ruleList)
+{
+    m_type = MEDIA_RULE;
+}
+
+CSSMediaRule::CSSMediaRule(StyleBase* parent)
+    : CSSRule(parent)
+    , m_lstMedia(0)
+    , m_lstCSSRules(new CSSRuleList())
+
+{
+    m_type = MEDIA_RULE;
+}
+
+CSSMediaRule::CSSMediaRule(StyleBase* parent, const String &media)
+    : CSSRule(parent)
+    , m_lstMedia(new MediaList(this, media))
+    , m_lstCSSRules(new CSSRuleList())
+{
+    m_type = MEDIA_RULE;
+}
+
+CSSMediaRule::~CSSMediaRule()
+{
+    if (m_lstMedia)
+        m_lstMedia->setParent(0);
+
+    int length = m_lstCSSRules->length();
+    for (int i = 0; i < length; i++)
+        m_lstCSSRules->item(i)->setParent(0);
+}
+
+unsigned CSSMediaRule::append(CSSRule* rule)
+{
+    if (!rule)
+        return 0;
+
+    rule->setParent(this);
+    return m_lstCSSRules->insertRule(rule, m_lstCSSRules->length());
+}
+
+unsigned CSSMediaRule::insertRule(const String& rule, unsigned index)
+{
+    CSSParser p(useStrictParsing());
+    RefPtr<CSSRule> newRule = p.parseRule(parentStyleSheet(), rule);
+    if (!newRule)
+        return 0;
+    newRule->setParent(this);
+    return m_lstCSSRules->insertRule(newRule.get(), index);
+}
+
+void CSSMediaRule::deleteRule(unsigned index)
+{
+    m_lstCSSRules->deleteRule(index);
+}
+
+String CSSMediaRule::cssText() const
+{
+    String result = "@media ";
+    if (m_lstMedia) {
+        result += m_lstMedia->mediaText();
+        result += " ";
+    }
+    result += "{ \n";
+    
+    if (m_lstCSSRules) {
+        unsigned len = m_lstCSSRules->length();
+        for (unsigned i = 0; i < len; i++) {
+            result += "  ";
+            result += m_lstCSSRules->item(i)->cssText();
+            result += "\n";
+        }
+    }
+    
+    result += "}";
+    return result;
+}
+}
diff --git a/WebCore/css/CSSMediaRule.h b/WebCore/css/CSSMediaRule.h
new file mode 100644 (file)
index 0000000..d32c1fd
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSMediaRule_H
+#define CSSMediaRule_H
+
+#include "CSSRule.h"
+
+namespace WebCore {
+
+class CSSRuleList;
+
+class CSSMediaRule : public CSSRule
+{
+public:
+    CSSMediaRule(StyleBase* parent);
+    CSSMediaRule(StyleBase* parent, const String &media);
+    CSSMediaRule(StyleBase* parent, MediaList* mediaList, CSSRuleList* ruleList);
+    virtual ~CSSMediaRule();
+
+    MediaList* media() const { return m_lstMedia.get(); }
+    CSSRuleList* cssRules() { return m_lstCSSRules.get(); }
+
+    unsigned insertRule(const String& rule, unsigned index);
+    void deleteRule(unsigned index);
+
+    virtual bool isMediaRule() { return true; }
+    virtual String cssText() const;
+
+    /* Not part of the DOM */
+    unsigned append(CSSRule* rule);
+
+protected:
+    RefPtr<MediaList> m_lstMedia;
+    RefPtr<CSSRuleList> m_lstCSSRules;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSMutableStyleDeclaration.cpp b/WebCore/css/CSSMutableStyleDeclaration.cpp
new file mode 100644 (file)
index 0000000..4b4f416
--- /dev/null
@@ -0,0 +1,491 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSMutableStyleDeclaration.h"
+
+#include "CSSImageValue.h"
+#include "cssparser.h"
+#include "CSSPropertyNames.h"
+#include "CSSProperty.h"
+#include "CSSStyleSheet.h"
+#include "Document.h"
+#include "ExceptionCode.h"
+#include "Node.h"
+#include "StyledElement.h"
+
+// Not in any header, so just declare it here for now.
+WebCore::String getPropertyName(unsigned short id);
+
+namespace WebCore {
+
+CSSMutableStyleDeclaration::CSSMutableStyleDeclaration()
+    : m_node(0)
+{
+}
+
+CSSMutableStyleDeclaration::CSSMutableStyleDeclaration(CSSRule* parent)
+    : CSSStyleDeclaration(parent)
+    , m_node(0)
+{
+}
+
+CSSMutableStyleDeclaration::CSSMutableStyleDeclaration(CSSRule* parent, const DeprecatedValueList<CSSProperty>& values)
+    : CSSStyleDeclaration(parent)
+    , m_values(values)
+    , m_node(0)
+{
+    // FIXME: This allows duplicate properties.
+}
+
+CSSMutableStyleDeclaration::CSSMutableStyleDeclaration(CSSRule* parent, const CSSProperty * const *properties, int numProperties)
+    : CSSStyleDeclaration(parent)
+    , m_node(0)
+{
+    for (int i = 0; i < numProperties; ++i)
+        m_values.append(*properties[i]);
+    // FIXME: This allows duplicate properties.
+}
+
+CSSMutableStyleDeclaration& CSSMutableStyleDeclaration::operator=(const CSSMutableStyleDeclaration& o)
+{
+    // don't attach it to the same node, just leave the current m_node value
+    m_values = o.m_values;
+    return *this;
+}
+
+String CSSMutableStyleDeclaration::getPropertyValue(int propertyID) const
+{
+    RefPtr<CSSValue> value = getPropertyCSSValue(propertyID);
+    if (value)
+        return value->cssText();
+
+    // Shorthand and 4-values properties
+    switch ( propertyID ) {
+    case CSS_PROP_BACKGROUND_POSITION:
+    {
+        // ## Is this correct? The code in cssparser.cpp is confusing
+        const int properties[2] = { CSS_PROP_BACKGROUND_POSITION_X,
+                                    CSS_PROP_BACKGROUND_POSITION_Y };
+        return getShortHandValue( properties, 2 );
+    }
+    case CSS_PROP_BACKGROUND:
+    {
+        const int properties[5] = { CSS_PROP_BACKGROUND_IMAGE, CSS_PROP_BACKGROUND_REPEAT,
+                                    CSS_PROP_BACKGROUND_ATTACHMENT, CSS_PROP_BACKGROUND_POSITION,
+                                    CSS_PROP_BACKGROUND_COLOR };
+        return getShortHandValue( properties, 5 );
+    }
+    case CSS_PROP_BORDER:
+    {
+        const int properties[3] = { CSS_PROP_BORDER_WIDTH, CSS_PROP_BORDER_STYLE,
+                                    CSS_PROP_BORDER_COLOR };
+        return getShortHandValue( properties, 3 );
+    }
+    case CSS_PROP_BORDER_TOP:
+    {
+        const int properties[3] = { CSS_PROP_BORDER_TOP_WIDTH, CSS_PROP_BORDER_TOP_STYLE,
+                                    CSS_PROP_BORDER_TOP_COLOR};
+        return getShortHandValue( properties, 3 );
+    }
+    case CSS_PROP_BORDER_RIGHT:
+    {
+        const int properties[3] = { CSS_PROP_BORDER_RIGHT_WIDTH, CSS_PROP_BORDER_RIGHT_STYLE,
+                                    CSS_PROP_BORDER_RIGHT_COLOR};
+        return getShortHandValue( properties, 3 );
+    }
+    case CSS_PROP_BORDER_BOTTOM:
+    {
+        const int properties[3] = { CSS_PROP_BORDER_BOTTOM_WIDTH, CSS_PROP_BORDER_BOTTOM_STYLE,
+                                    CSS_PROP_BORDER_BOTTOM_COLOR};
+        return getShortHandValue( properties, 3 );
+    }
+    case CSS_PROP_BORDER_LEFT:
+    {
+        const int properties[3] = { CSS_PROP_BORDER_LEFT_WIDTH, CSS_PROP_BORDER_LEFT_STYLE,
+                                    CSS_PROP_BORDER_LEFT_COLOR};
+        return getShortHandValue( properties, 3 );
+    }
+    case CSS_PROP_OUTLINE:
+    {
+        const int properties[3] = { CSS_PROP_OUTLINE_WIDTH, CSS_PROP_OUTLINE_STYLE,
+                                    CSS_PROP_OUTLINE_COLOR };
+        return getShortHandValue( properties, 3 );
+    }
+    case CSS_PROP_BORDER_COLOR:
+    {
+        const int properties[4] = { CSS_PROP_BORDER_TOP_COLOR, CSS_PROP_BORDER_RIGHT_COLOR,
+                                    CSS_PROP_BORDER_BOTTOM_COLOR, CSS_PROP_BORDER_LEFT_COLOR };
+        return get4Values( properties );
+    }
+    case CSS_PROP_BORDER_WIDTH:
+    {
+        const int properties[4] = { CSS_PROP_BORDER_TOP_WIDTH, CSS_PROP_BORDER_RIGHT_WIDTH,
+                                    CSS_PROP_BORDER_BOTTOM_WIDTH, CSS_PROP_BORDER_LEFT_WIDTH };
+        return get4Values( properties );
+    }
+    case CSS_PROP_BORDER_STYLE:
+    {
+        const int properties[4] = { CSS_PROP_BORDER_TOP_STYLE, CSS_PROP_BORDER_RIGHT_STYLE,
+                                    CSS_PROP_BORDER_BOTTOM_STYLE, CSS_PROP_BORDER_LEFT_STYLE };
+        return get4Values( properties );
+    }
+    case CSS_PROP_MARGIN:
+    {
+        const int properties[4] = { CSS_PROP_MARGIN_TOP, CSS_PROP_MARGIN_RIGHT,
+                                    CSS_PROP_MARGIN_BOTTOM, CSS_PROP_MARGIN_LEFT };
+        return get4Values( properties );
+    }
+    case CSS_PROP_PADDING:
+    {
+        const int properties[4] = { CSS_PROP_PADDING_TOP, CSS_PROP_PADDING_RIGHT,
+                                    CSS_PROP_PADDING_BOTTOM, CSS_PROP_PADDING_LEFT };
+        return get4Values( properties );
+    }
+    case CSS_PROP_LIST_STYLE:
+    {
+        const int properties[3] = { CSS_PROP_LIST_STYLE_TYPE, CSS_PROP_LIST_STYLE_POSITION,
+                                    CSS_PROP_LIST_STYLE_IMAGE };
+        return getShortHandValue( properties, 3 );
+    }
+    }
+    return String();
+}
+
+String CSSMutableStyleDeclaration::get4Values( const int* properties ) const
+{
+    String res;
+    for (int i = 0; i < 4; ++i) {
+        if (!isPropertyImplicit(properties[i])) {
+            RefPtr<CSSValue> value = getPropertyCSSValue(properties[i]);
+            if (!value) // apparently all 4 properties must be specified.
+                return String();
+            if (!res.isNull())
+                res += " ";
+            res += value->cssText();
+        }
+    }
+    return res;
+}
+
+String CSSMutableStyleDeclaration::getShortHandValue( const int* properties, int number ) const
+{
+    String res;
+    for (int i = 0; i < number; ++i) {
+        if (!isPropertyImplicit(properties[i])) {
+            RefPtr<CSSValue> value = getPropertyCSSValue(properties[i]);
+            if (value) { // TODO provide default value if !value
+                if (!res.isNull())
+                    res += " ";
+                res += value->cssText();
+            }
+        }
+    }
+    return res;
+}
+
+PassRefPtr<CSSValue> CSSMutableStyleDeclaration::getPropertyCSSValue(int propertyID) const
+{
+    DeprecatedValueListConstIterator<CSSProperty> end;
+    for (DeprecatedValueListConstIterator<CSSProperty> it = m_values.fromLast(); it != end; --it)
+        if (propertyID == (*it).m_id)
+            return (*it).value();
+    return 0;
+}
+
+String CSSMutableStyleDeclaration::removeProperty(int propertyID, bool notifyChanged, ExceptionCode& ec)
+{
+    ec = 0;
+
+    String value;
+
+    DeprecatedValueListIterator<CSSProperty> end;
+    for (DeprecatedValueListIterator<CSSProperty> it = m_values.fromLast(); it != end; --it)
+        if (propertyID == (*it).m_id) {
+            value = (*it).value()->cssText();
+            m_values.remove(it);
+            if (notifyChanged)
+                setChanged();
+            break;
+        }
+
+    return value;
+}
+
+void CSSMutableStyleDeclaration::clear()
+{
+    m_values.clear();
+    setChanged();
+}
+
+void CSSMutableStyleDeclaration::setChanged()
+{
+    if (m_node) {
+        m_node->setChanged();
+        // FIXME: Ideally, this should be factored better and there
+        // should be a subclass of CSSMutableStyleDeclaration just
+        // for inline style declarations that handles this
+        if (m_node->isStyledElement() && this == static_cast<StyledElement*>(m_node)->inlineStyleDecl())
+            static_cast<StyledElement*>(m_node)->invalidateStyleAttribute();
+        return;
+    }
+
+    // ### quick&dirty hack for KDE 3.0... make this MUCH better! (Dirk)
+    StyleBase* root = this;
+    while (StyleBase *parent = root->parent())
+        root = parent;
+    if (root->isCSSStyleSheet())
+        static_cast<CSSStyleSheet*>(root)->doc()->updateStyleSelector();
+}
+
+bool CSSMutableStyleDeclaration::getPropertyPriority(int propertyID) const
+{
+    DeprecatedValueListConstIterator<CSSProperty> end;
+    for (DeprecatedValueListConstIterator<CSSProperty> it = m_values.begin(); it != end; ++it)
+        if (propertyID == (*it).id())
+            return (*it).isImportant();
+    return false;
+}
+
+int CSSMutableStyleDeclaration::getPropertyShorthand(int propertyID) const
+{
+    DeprecatedValueListConstIterator<CSSProperty> end;
+    for (DeprecatedValueListConstIterator<CSSProperty> it = m_values.begin(); it != end; ++it)
+        if (propertyID == (*it).id())
+            return (*it).shorthandID();
+    return false;
+}
+
+bool CSSMutableStyleDeclaration::isPropertyImplicit(int propertyID) const
+{
+    DeprecatedValueListConstIterator<CSSProperty> end;
+    for (DeprecatedValueListConstIterator<CSSProperty> it = m_values.begin(); it != end; ++it)
+        if (propertyID == (*it).id())
+            return (*it).isImplicit();
+    return false;
+}
+
+void CSSMutableStyleDeclaration::setProperty(int propertyID, const String &value, bool important, ExceptionCode& ec)
+{
+    setProperty(propertyID, value, important, true, ec);
+}
+
+String CSSMutableStyleDeclaration::removeProperty(int propertyID, ExceptionCode& ec)
+{
+    return removeProperty(propertyID, true, ec);
+}
+
+bool CSSMutableStyleDeclaration::setProperty(int propertyID, const String &value, bool important, bool notifyChanged, ExceptionCode& ec)
+{
+    ec = 0;
+
+    removeProperty(propertyID);
+
+    CSSParser parser(useStrictParsing());
+    bool success = parser.parseValue(this, propertyID, value, important);
+    if (!success) {
+        ec = SYNTAX_ERR;
+    } else if (notifyChanged)
+        setChanged();
+    return success;
+}
+
+bool CSSMutableStyleDeclaration::setProperty(int propertyID, int value, bool important, bool notifyChanged)
+{
+    removeProperty(propertyID);
+    m_values.append(CSSProperty(propertyID, new CSSPrimitiveValue(value), important));
+    if (notifyChanged)
+        setChanged();
+    return true;
+}
+
+void CSSMutableStyleDeclaration::setStringProperty(int propertyId, const String &value, CSSPrimitiveValue::UnitTypes type, bool important)
+{
+    removeProperty(propertyId);
+    m_values.append(CSSProperty(propertyId, new CSSPrimitiveValue(value, type), important));
+    setChanged();
+}
+
+void CSSMutableStyleDeclaration::setImageProperty(int propertyId, const String &URL, bool important)
+{
+    removeProperty(propertyId);
+    m_values.append(CSSProperty(propertyId, new CSSImageValue(URL, this), important));
+    setChanged();
+}
+
+void CSSMutableStyleDeclaration::parseDeclaration(const String &styleDeclaration)
+{
+    m_values.clear();
+    CSSParser parser(useStrictParsing());
+    parser.parseDeclaration(this, styleDeclaration);
+    setChanged();
+}
+
+void CSSMutableStyleDeclaration::addParsedProperties(const CSSProperty * const *properties, int numProperties)
+{
+    for (int i = 0; i < numProperties; ++i) {
+        removeProperty(properties[i]->id(), false);
+        m_values.append(*properties[i]);
+    }
+    // FIXME: This probably should have a call to setChanged() if something changed. We may also wish to add
+    // a notifyChanged argument to this function to follow the model of other functions in this class.
+}
+
+void CSSMutableStyleDeclaration::setLengthProperty(int id, const String &value, bool important, bool /* multiLength*/)
+{
+    bool parseMode = useStrictParsing();
+    setStrictParsing(false);
+    setProperty(id, value, important);
+    setStrictParsing(parseMode);
+}
+
+unsigned CSSMutableStyleDeclaration::length() const
+{
+    return m_values.count();
+}
+
+String CSSMutableStyleDeclaration::item(unsigned i) const
+{
+    if (i >= m_values.count())
+       return String();
+    return getPropertyName(m_values[i].id());
+}
+
+String CSSMutableStyleDeclaration::cssText() const
+{
+    String result = "";
+    
+    DeprecatedValueListConstIterator<CSSProperty> end;
+    for (DeprecatedValueListConstIterator<CSSProperty> it = m_values.begin(); it != end; ++it)
+        result += (*it).cssText();
+
+    return result;
+}
+
+void CSSMutableStyleDeclaration::setCssText(const String& text, ExceptionCode& ec)
+{
+    ec = 0;
+    m_values.clear();
+    CSSParser parser(useStrictParsing());
+    parser.parseDeclaration(this, text);
+    // FIXME: Detect syntax errors and set ec.
+    setChanged();
+}
+
+void CSSMutableStyleDeclaration::merge(CSSMutableStyleDeclaration *other, bool argOverridesOnConflict)
+{
+    DeprecatedValueListConstIterator<CSSProperty> end;
+    for (DeprecatedValueListConstIterator<CSSProperty> it = other->valuesIterator(); it != end; ++it) {
+        const CSSProperty &property = *it;
+        RefPtr<CSSValue> value = getPropertyCSSValue(property.id());
+        if (value) {
+            if (!argOverridesOnConflict)
+                continue;
+            removeProperty(property.id());
+        }
+        m_values.append(property);
+    }
+    // FIXME: This probably should have a call to setChanged() if something changed. We may also wish to add
+    // a notifyChanged argument to this function to follow the model of other functions in this class.
+}
+
+// This is the list of properties we want to copy in the copyInheritableProperties() function.
+// It is the intersection of the list of inherited CSS properties and the
+// properties for which we have a computed implementation in this file.
+const int inheritableProperties[] = {
+    CSS_PROP_BORDER_COLLAPSE,
+    CSS_PROP_BORDER_SPACING,
+    CSS_PROP_COLOR,
+    CSS_PROP_FONT_FAMILY,
+    CSS_PROP_FONT_SIZE,
+    CSS_PROP_FONT_STYLE,
+    CSS_PROP_FONT_VARIANT,
+    CSS_PROP_FONT_WEIGHT,
+    CSS_PROP_LETTER_SPACING,
+    CSS_PROP_LINE_HEIGHT,
+    CSS_PROP_TEXT_ALIGN,
+    CSS_PROP__WEBKIT_TEXT_DECORATIONS_IN_EFFECT,
+    CSS_PROP_TEXT_INDENT,
+    CSS_PROP__WEBKIT_TEXT_SIZE_ADJUST,
+    CSS_PROP_TEXT_TRANSFORM,
+    CSS_PROP_ORPHANS,
+    CSS_PROP_WHITE_SPACE,
+    CSS_PROP_WIDOWS,
+    CSS_PROP_WORD_SPACING,
+};
+
+const unsigned numInheritableProperties = sizeof(inheritableProperties) / sizeof(inheritableProperties[0]);
+
+// This is the list of properties we want to copy in the copyBlockProperties() function.
+// It is the list of CSS properties that apply specially to block-level elements.
+static const int blockProperties[] = {
+    CSS_PROP_ORPHANS,
+    CSS_PROP_OVERFLOW, // This can be also be applied to replaced elements
+    CSS_PROP_PAGE_BREAK_AFTER,
+    CSS_PROP_PAGE_BREAK_BEFORE,
+    CSS_PROP_PAGE_BREAK_INSIDE,
+    CSS_PROP_TEXT_ALIGN,
+    CSS_PROP_TEXT_INDENT,
+    CSS_PROP_WIDOWS
+};
+
+const unsigned numBlockProperties = sizeof(blockProperties) / sizeof(blockProperties[0]);
+
+PassRefPtr<CSSMutableStyleDeclaration> CSSMutableStyleDeclaration::copyBlockProperties() const
+{
+    return copyPropertiesInSet(blockProperties, numBlockProperties);
+}
+
+void CSSMutableStyleDeclaration::removeBlockProperties()
+{
+    removePropertiesInSet(blockProperties, numBlockProperties);
+}
+
+void CSSMutableStyleDeclaration::removeInheritableProperties()
+{
+    removePropertiesInSet(inheritableProperties, numInheritableProperties);
+}
+
+void CSSMutableStyleDeclaration::removePropertiesInSet(const int *set, unsigned length)
+{
+    bool changed = false;
+    for (unsigned i = 0; i < length; i++) {
+        RefPtr<CSSValue> value = getPropertyCSSValue(set[i]);
+        if (value) {
+            m_values.remove(CSSProperty(set[i], value.release(), false));
+            changed = true;
+        }
+    }
+    if (changed)
+        setChanged();
+}
+
+PassRefPtr<CSSMutableStyleDeclaration> CSSMutableStyleDeclaration::makeMutable()
+{
+    return this;
+}
+
+PassRefPtr<CSSMutableStyleDeclaration> CSSMutableStyleDeclaration::copy() const
+{
+    return new CSSMutableStyleDeclaration(0, m_values);
+}
+
+}
diff --git a/WebCore/css/CSSMutableStyleDeclaration.h b/WebCore/css/CSSMutableStyleDeclaration.h
new file mode 100644 (file)
index 0000000..04b8be3
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSMutableStyleDeclaration_H
+#define CSSMutableStyleDeclaration_H
+
+#include "CSSStyleDeclaration.h"
+#include "CSSPrimitiveValue.h" // for CSSPrimitiveValue::UnitTypes
+#include "DeprecatedValueList.h"
+
+namespace WebCore {
+
+class Node;
+
+class CSSMutableStyleDeclaration : public CSSStyleDeclaration
+{
+public:
+    CSSMutableStyleDeclaration();
+    CSSMutableStyleDeclaration(CSSRule* parentRule);
+    CSSMutableStyleDeclaration(CSSRule* parentRule, const DeprecatedValueList<CSSProperty>&);
+    CSSMutableStyleDeclaration(CSSRule* parentRule, const CSSProperty * const *, int numProperties);
+
+    CSSMutableStyleDeclaration &operator=(const CSSMutableStyleDeclaration &);
+
+    void setNode(Node* node) { m_node = node; }
+
+    virtual String cssText() const;
+    virtual void setCssText(const String&, ExceptionCode&);
+
+    virtual unsigned length() const;
+    virtual String item(unsigned index) const;
+
+    virtual PassRefPtr<CSSValue> getPropertyCSSValue(int propertyID) const;
+    virtual String getPropertyValue(int propertyID) const;
+    virtual bool getPropertyPriority(int propertyID) const;
+    virtual int getPropertyShorthand(int propertyID) const;
+    virtual bool isPropertyImplicit(int propertyID) const;
+
+    virtual void setProperty(int propertyId, const String& value, bool important, ExceptionCode&);
+    virtual String removeProperty(int propertyID, ExceptionCode&);
+
+    virtual PassRefPtr<CSSMutableStyleDeclaration> copy() const;
+    virtual PassRefPtr<CSSMutableStyleDeclaration> makeMutable();
+
+    DeprecatedValueListConstIterator<CSSProperty> valuesIterator() const { return m_values.begin(); }
+
+    bool setProperty(int propertyID, int value, bool important = false, bool notifyChanged = true);
+    bool setProperty(int propertyID, const String& value, bool important, bool notifyChanged, ExceptionCode&);
+    bool setProperty(int propertyId, const String& value, bool important = false, bool notifyChanged = true)
+        { ExceptionCode ec; return setProperty(propertyId, value, important, notifyChanged, ec); }
+
+    String removeProperty(int propertyID, bool notifyChanged, ExceptionCode&);
+    String removeProperty(int propertyID, bool notifyChanged = true)
+        { ExceptionCode ec; return removeProperty(propertyID, notifyChanged, ec); }
+
+    void clear();
+
+    void setChanged();
+    // setLengthProperty treats integers as pixels! (Needed for conversion of HTML attributes.)
+    void setLengthProperty(int propertyId, const String& value, bool important, bool multiLength = false);
+    void setStringProperty(int propertyId, const String& value, CSSPrimitiveValue::UnitTypes, bool important = false); // parsed string value
+    void setImageProperty(int propertyId, const String& URL, bool important = false);
+    // The following parses an entire new style declaration.
+    void parseDeclaration(const String& styleDeclaration);
+
+    // Besides adding the properties, this also removes any existing properties with these IDs.
+    // It does no notification since it's called by the parser.
+    void addParsedProperties(const CSSProperty * const *, int numProperties);
+    PassRefPtr<CSSMutableStyleDeclaration> copyBlockProperties() const;
+    void removeBlockProperties();
+    void removeInheritableProperties();
+    void removePropertiesInSet(const int* set, unsigned length);
+
+    void merge(CSSMutableStyleDeclaration*, bool argOverridesOnConflict = true);
+private:
+    String getShortHandValue(const int* properties, int number) const;
+    String get4Values(const int* properties) const;
+    DeprecatedValueList<CSSProperty> m_values;
+    Node* m_node;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSPageRule.cpp b/WebCore/css/CSSPageRule.cpp
new file mode 100644 (file)
index 0000000..ec22f3a
--- /dev/null
@@ -0,0 +1,51 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSPageRule.h"
+
+#include "CSSMutableStyleDeclaration.h"
+
+namespace WebCore {
+
+CSSPageRule::CSSPageRule(StyleBase* parent)
+    : CSSRule(parent)
+{
+    m_type = PAGE_RULE;
+}
+
+CSSPageRule::~CSSPageRule()
+{
+}
+
+String CSSPageRule::selectorText() const
+{
+    // ###
+    return String();
+}
+
+void CSSPageRule::setSelectorText(String /*str*/)
+{
+    // ###
+}
+
+}
diff --git a/WebCore/css/CSSPageRule.h b/WebCore/css/CSSPageRule.h
new file mode 100644 (file)
index 0000000..0202729
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSPageRule_H
+#define CSSPageRule_H
+
+#include "CSSRule.h"
+
+namespace WebCore {
+
+class CSSMutableStyleDeclaration;
+
+class CSSPageRule : public CSSRule
+{
+public:
+    CSSPageRule(StyleBase* parent);
+    virtual ~CSSPageRule();
+
+    CSSMutableStyleDeclaration* style() const { return m_style.get(); }
+
+    virtual bool isPageRule() { return true; }
+
+    WebCore::String selectorText() const;
+    void setSelectorText(String str);
+
+protected:
+    RefPtr<CSSMutableStyleDeclaration> m_style;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSPrimitiveValue.cpp b/WebCore/css/CSSPrimitiveValue.cpp
new file mode 100644 (file)
index 0000000..82c4b50
--- /dev/null
@@ -0,0 +1,517 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSPrimitiveValue.h"
+
+#include "Color.h"
+#include "Counter.h"
+#include "CSSValueKeywords.h"
+#include "DashboardRegion.h"
+#include "ExceptionCode.h"
+#include "Pair.h"
+#include "render_style.h"
+
+namespace WebCore {
+
+// Quotes the string if it needs quoting.
+// We use single quotes for now beause markup.cpp uses double quotes.
+static String quoteStringIfNeeded(const String &string)
+{
+    // For now, just do this for strings that start with "#" to fix Korean font names that start with "#".
+    // Post-Tiger, we should isLegalIdentifier instead after working out all the ancillary issues.
+    if (string[0] != '#')
+        return string;
+
+    // FIXME: Also need to transform control characters into \ sequences.
+    String s = string;
+    s.replace('\\', "\\\\");
+    s.replace('\'', "\\'");
+    return "'" + s + "'";
+}
+
+CSSPrimitiveValue::CSSPrimitiveValue()
+{
+    m_type = 0;
+}
+
+CSSPrimitiveValue::CSSPrimitiveValue(int ident)
+{
+    m_value.ident = ident;
+    m_type = CSS_IDENT;
+}
+
+CSSPrimitiveValue::CSSPrimitiveValue(double num, UnitTypes type)
+{
+    m_value.num = num;
+    m_type = type;
+}
+
+CSSPrimitiveValue::CSSPrimitiveValue(const String& str, UnitTypes type)
+{
+    if ((m_value.string = str.impl()))
+        m_value.string->ref();
+    m_type = type;
+}
+
+CSSPrimitiveValue::CSSPrimitiveValue(PassRefPtr<Counter> c)
+{
+    m_value.counter = c.release();
+    m_type = CSS_COUNTER;
+}
+
+CSSPrimitiveValue::CSSPrimitiveValue(PassRefPtr<RectImpl> r)
+{
+    m_value.rect = r.release();
+    m_type = CSS_RECT;
+}
+
+#if __APPLE__
+CSSPrimitiveValue::CSSPrimitiveValue(PassRefPtr<DashboardRegion> r)
+{
+    m_value.region = r.release();
+    m_type = CSS_DASHBOARD_REGION;
+}
+#endif
+
+CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color)
+{
+    m_value.rgbcolor = color;
+    m_type = CSS_RGBCOLOR;
+}
+
+CSSPrimitiveValue::CSSPrimitiveValue(PassRefPtr<Pair> p)
+{
+    m_value.pair = p.release();
+    m_type = CSS_PAIR;
+}
+
+CSSPrimitiveValue::~CSSPrimitiveValue()
+{
+    cleanup();
+}
+
+void CSSPrimitiveValue::cleanup()
+{
+    switch(m_type) {
+    case CSS_STRING:
+    case CSS_URI:
+    case CSS_ATTR:
+        if (m_value.string)
+            m_value.string->deref();
+        break;
+    case CSS_COUNTER:
+        m_value.counter->deref();
+        break;
+    case CSS_RECT:
+        m_value.rect->deref();
+        break;
+    case CSS_PAIR:
+        m_value.pair->deref();
+        break;
+#if __APPLE__
+    case CSS_DASHBOARD_REGION:
+        if (m_value.region)
+            m_value.region->deref();
+        break;
+#endif
+    default:
+        break;
+    }
+
+    m_type = 0;
+}
+
+int CSSPrimitiveValue::computeLengthInt(RenderStyle *style)
+{
+    double result = computeLengthFloat(style);
+    
+    // This conversion is imprecise, often resulting in values of, e.g., 44.99998.  We
+    // need to go ahead and round if we're really close to the next integer value.
+    result += result < 0 ? -0.01 : +0.01;
+    
+    if (result > INT_MAX || result < INT_MIN)
+        return 0;
+    return (int)result;    
+}
+
+int CSSPrimitiveValue::computeLengthInt(RenderStyle *style, double multiplier)
+{
+    double result = multiplier * computeLengthFloat(style);
+    
+    // This conversion is imprecise, often resulting in values of, e.g., 44.99998.  We
+    // need to go ahead and round if we're really close to the next integer value.
+    result += result < 0 ? -0.01 : +0.01;
+    
+    if (result > INT_MAX || result < INT_MIN)
+        return 0;
+    return (int)result;  
+}
+
+const int intMaxForLength = 0x7ffffff; // max value for a 28-bit int
+const int intMinForLength = (-0x7ffffff-1); // min value for a 28-bit int
+
+// Lengths expect an int that is only 28-bits, so we have to check for a different overflow.
+int CSSPrimitiveValue::computeLengthIntForLength(RenderStyle *style)
+{
+    double result = computeLengthFloat(style);
+    
+    // This conversion is imprecise, often resulting in values of, e.g., 44.99998.  We
+    // need to go ahead and round if we're really close to the next integer value.
+    result += result < 0 ? -0.01 : +0.01;
+    
+    if (result > intMaxForLength || result < intMinForLength)
+        return 0;
+    return (int)result;    
+}
+
+// Lengths expect an int that is only 28-bits, so we have to check for a different overflow.
+int CSSPrimitiveValue::computeLengthIntForLength(RenderStyle *style, double multiplier)
+{
+    double result = multiplier * computeLengthFloat(style);
+    
+    // This conversion is imprecise, often resulting in values of, e.g., 44.99998.  We
+    // need to go ahead and round if we're really close to the next integer value.
+    result += result < 0 ? -0.01 : +0.01;
+    
+    if (result > intMaxForLength || result < intMinForLength)
+        return 0;
+    return (int)result;  
+}
+
+short CSSPrimitiveValue::computeLengthShort(RenderStyle *style)
+{
+    double result = computeLengthFloat(style);
+    
+    // This conversion is imprecise, often resulting in values of, e.g., 44.99998.  We
+    // need to go ahead and round if we're really close to the next integer value.
+    result += result < 0 ? -0.01 : +0.01;
+    
+    if (result > SHRT_MAX || result < SHRT_MIN)
+        return 0;
+    return (short)result;    
+}
+
+short CSSPrimitiveValue::computeLengthShort(RenderStyle *style, double multiplier)
+{
+    double result = multiplier * computeLengthFloat(style);
+    
+    // This conversion is imprecise, often resulting in values of, e.g., 44.99998.  We
+    // need to go ahead and round if we're really close to the next integer value.
+    result += result < 0 ? -0.01 : +0.01;
+    
+    if (result > SHRT_MAX || result < SHRT_MIN)
+        return 0;
+    return (short)result;  
+}
+
+double CSSPrimitiveValue::computeLengthFloat(RenderStyle *style, bool applyZoomFactor)
+{
+    unsigned short type = primitiveType();
+
+    // We always assume 96 CSS pixels in a CSS inch. This is the cold hard truth of the Web.
+    // At high DPI, we may scale a CSS pixel, but the ratio of the CSS pixel to the so-called
+    // "absolute" CSS length units like inch and pt is always fixed and never changes.
+    double cssPixelsPerInch = 96.;
+
+    double factor = 1.;
+    switch(type) {
+    case CSS_EMS:
+        factor = applyZoomFactor ?
+          style->fontDescription().computedSize() :
+          style->fontDescription().specifiedSize();
+        break;
+    case CSS_EXS: {
+        // FIXME: We have a bug right now where the zoom will be applied multiple times to EX units.
+        // We really need to compute EX using fontMetrics for the original specifiedSize and not use
+        // our actual constructed rendering font.
+        factor = style->font().xHeight();
+        break;
+    }
+    case CSS_PX:
+        break;
+    case CSS_CM:
+        factor = cssPixelsPerInch/2.54; // (2.54 cm/in)
+        break;
+    case CSS_MM:
+        factor = cssPixelsPerInch/25.4;
+        break;
+    case CSS_IN:
+        factor = cssPixelsPerInch;
+        break;
+    case CSS_PT:
+        factor = cssPixelsPerInch/72.;
+        break;
+    case CSS_PC:
+        // 1 pc == 12 pt
+        factor = cssPixelsPerInch*12./72.;
+        break;
+    default:
+        return -1;
+    }
+
+    return getFloatValue() * factor;
+}
+
+void CSSPrimitiveValue::setFloatValue( unsigned short unitType, double floatValue, ExceptionCode& ec)
+{
+    ec = 0;
+    cleanup();
+    // ### check if property supports this type
+    if (m_type > CSS_DIMENSION) {
+        ec = SYNTAX_ERR;
+        return;
+    }
+    //if(m_type > CSS_DIMENSION) throw DOMException(INVALID_ACCESS_ERR);
+    m_value.num = floatValue;
+    m_type = unitType;
+}
+
+double scaleFactorForConversion(unsigned short unitType)
+{
+    double cssPixelsPerInch = 96.0;
+    double factor = 1.0;
+    
+    switch(unitType) {
+        case CSSPrimitiveValue::CSS_PX:
+            break;
+        case CSSPrimitiveValue::CSS_CM:
+            factor = cssPixelsPerInch / 2.54; // (2.54 cm/in)
+            break;
+        case CSSPrimitiveValue::CSS_MM:
+            factor = cssPixelsPerInch / 25.4;
+            break;
+        case CSSPrimitiveValue::CSS_IN:
+            factor = cssPixelsPerInch;
+            break;
+        case CSSPrimitiveValue::CSS_PT:
+            factor = cssPixelsPerInch / 72.0;
+            break;
+        case CSSPrimitiveValue::CSS_PC:
+            factor = cssPixelsPerInch * 12.0 / 72.0; // 1 pc == 12 pt
+            break;
+        default:
+            break;
+    }
+    
+    return factor;
+}
+
+double CSSPrimitiveValue::getFloatValue(unsigned short unitType)
+{
+    if (unitType == m_type || unitType < CSS_PX || unitType > CSS_PC)
+        return m_value.num;
+    
+    double convertedValue = m_value.num;
+    
+    // First convert the value from m_type into CSSPixels
+    double factor = scaleFactorForConversion(m_type);
+    convertedValue *= factor;
+    
+    // Now convert from CSSPixels to the specified unitType
+    factor = scaleFactorForConversion(unitType);
+    convertedValue /= factor;
+    
+    return convertedValue;
+}
+
+void CSSPrimitiveValue::setStringValue( unsigned short stringType, const String &stringValue, ExceptionCode& ec)
+{
+    ec = 0;
+    cleanup();
+    //if(m_type < CSS_STRING) throw DOMException(INVALID_ACCESS_ERR);
+    //if(m_type > CSS_ATTR) throw DOMException(INVALID_ACCESS_ERR);
+    if (m_type < CSS_STRING || m_type > CSS_ATTR) {
+        ec = SYNTAX_ERR;
+        return;
+    }
+    if (stringType != CSS_IDENT) {
+        m_value.string = stringValue.impl();
+        m_value.string->ref();
+        m_type = stringType;
+    }
+    // ### parse ident
+}
+
+String CSSPrimitiveValue::getStringValue() const
+{
+    switch (m_type) {
+        case CSS_STRING:
+        case CSS_ATTR:
+        case CSS_URI:
+            return m_value.string;
+        case CSS_IDENT:
+            return getValueName(m_value.ident);
+        default:
+            // FIXME: The CSS 2.1 spec says you should throw an exception here.
+            break;
+    }
+    
+    return String();
+}
+
+unsigned short CSSPrimitiveValue::cssValueType() const
+{
+    return CSS_PRIMITIVE_VALUE;
+}
+
+bool CSSPrimitiveValue::parseString( const String &/*string*/, bool )
+{
+    // ###
+    return false;
+}
+
+int CSSPrimitiveValue::getIdent()
+{
+    if(m_type != CSS_IDENT) return 0;
+    return m_value.ident;
+}
+
+String CSSPrimitiveValue::cssText() const
+{
+    // ### return the original value instead of a generated one (e.g. color
+    // name if it was specified) - check what spec says about this
+    String text;
+    switch ( m_type ) {
+        case CSS_UNKNOWN:
+            // ###
+            break;
+        case CSS_NUMBER:
+            text = String::number(m_value.num);
+            break;
+        case CSS_PERCENTAGE:
+            text = String::number(m_value.num) + "%";
+            break;
+        case CSS_EMS:
+            text = String::number(m_value.num) + "em";
+            break;
+        case CSS_EXS:
+            text = String::number(m_value.num) + "ex";
+            break;
+        case CSS_PX:
+            text = String::number(m_value.num) + "px";
+            break;
+        case CSS_CM:
+            text = String::number(m_value.num) + "cm";
+            break;
+        case CSS_MM:
+            text = String::number(m_value.num) + "mm";
+            break;
+        case CSS_IN:
+            text = String::number(m_value.num) + "in";
+            break;
+        case CSS_PT:
+            text = String::number(m_value.num) + "pt";
+            break;
+        case CSS_PC:
+            text = String::number(m_value.num) + "pc";
+            break;
+        case CSS_DEG:
+            text = String::number(m_value.num) + "deg";
+            break;
+        case CSS_RAD:
+            text = String::number(m_value.num) + "rad";
+            break;
+        case CSS_GRAD:
+            text = String::number(m_value.num) + "grad";
+            break;
+        case CSS_MS:
+            text = String::number(m_value.num) + "ms";
+            break;
+        case CSS_S:
+            text = String::number(m_value.num) + "s";
+            break;
+        case CSS_HZ:
+            text = String::number(m_value.num) + "hz";
+            break;
+        case CSS_KHZ:
+            text = String::number(m_value.num) + "khz";
+            break;
+        case CSS_DIMENSION:
+            // ###
+            break;
+        case CSS_STRING:
+            text = quoteStringIfNeeded(m_value.string);
+            break;
+        case CSS_URI:
+            text = "url(" + String(m_value.string) + ")";
+            break;
+        case CSS_IDENT:
+            text = getValueName(m_value.ident);
+            break;
+        case CSS_ATTR:
+            // ###
+            break;
+        case CSS_COUNTER:
+            // ###
+            break;
+        case CSS_RECT: {
+            RectImpl* rectVal = getRectValue();
+            text = "rect(";
+            text += rectVal->top()->cssText() + " ";
+            text += rectVal->right()->cssText() + " ";
+            text += rectVal->bottom()->cssText() + " ";
+            text += rectVal->left()->cssText() + ")";
+            break;
+        }
+        case CSS_RGBCOLOR: {
+            Color color(m_value.rgbcolor);
+            if (color.alpha() < 0xFF)
+                text = "rgba(";
+            else
+                text = "rgb(";
+            text += String::number(color.red()) + ", ";
+            text += String::number(color.green()) + ", ";
+            text += String::number(color.blue());
+            if (color.alpha() < 0xFF)
+                text += ", " + String::number((float)color.alpha() / 0xFF);
+            text += ")";
+            break;
+        }
+        case CSS_PAIR:
+            text = m_value.pair->first()->cssText();
+            text += " ";
+            text += m_value.pair->second()->cssText();
+            break;
+#if __APPLE__
+        case CSS_DASHBOARD_REGION:
+            for (DashboardRegion* region = getDashboardRegionValue(); region; region = region->m_next.get()) {
+                text = "dashboard-region(";
+                text += region->m_label;
+                if (region->m_isCircle)
+                    text += " circle ";
+                else if (region->m_isRectangle)
+                    text += " rectangle ";
+                else
+                    break;
+                text += region->top()->cssText() + " ";
+                text += region->right()->cssText() + " ";
+                text += region->bottom()->cssText() + " ";
+                text += region->left()->cssText();
+                text += ")";
+            }
+            break;
+#endif
+    }
+    return text;
+}
+
+}
diff --git a/WebCore/css/CSSPrimitiveValue.h b/WebCore/css/CSSPrimitiveValue.h
new file mode 100644 (file)
index 0000000..48fb458
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSPrimitiveValue_H
+#define CSSPrimitiveValue_H
+
+#include "CSSValue.h"
+
+namespace WebCore {
+
+class Counter;
+class DashboardRegion;
+class Pair;
+class RectImpl;
+class RenderStyle;
+
+typedef int ExceptionCode;
+
+class CSSPrimitiveValue : public CSSValue
+{
+public:
+    enum UnitTypes {
+        CSS_UNKNOWN = 0,
+        CSS_NUMBER = 1,
+        CSS_PERCENTAGE = 2,
+        CSS_EMS = 3,
+        CSS_EXS = 4,
+        CSS_PX = 5,
+        CSS_CM = 6,
+        CSS_MM = 7,
+        CSS_IN = 8,
+        CSS_PT = 9,
+        CSS_PC = 10,
+        CSS_DEG = 11,
+        CSS_RAD = 12,
+        CSS_GRAD = 13,
+        CSS_MS = 14,
+        CSS_S = 15,
+        CSS_HZ = 16,
+        CSS_KHZ = 17,
+        CSS_DIMENSION = 18,
+        CSS_STRING = 19,
+        CSS_URI = 20,
+        CSS_IDENT = 21,
+        CSS_ATTR = 22,
+        CSS_COUNTER = 23,
+        CSS_RECT = 24,
+        CSS_RGBCOLOR = 25,
+        CSS_PAIR = 100, // We envision this being exposed as a means of getting computed style values for pairs (border-spacing/radius, background-position, etc.)
+        CSS_DASHBOARD_REGION = 101 // FIXME: What on earth is this doing as a primitive value? It should not be!
+    };
+
+    // FIXME: int vs. unsigned overloading is too tricky for color vs. ident
+    CSSPrimitiveValue();
+    CSSPrimitiveValue(int ident);
+    CSSPrimitiveValue(double, UnitTypes);
+    CSSPrimitiveValue(const String&, UnitTypes);
+    CSSPrimitiveValue(PassRefPtr<Counter>);
+    CSSPrimitiveValue(PassRefPtr<RectImpl>);
+    CSSPrimitiveValue(unsigned color); // RGB value
+    CSSPrimitiveValue(PassRefPtr<Pair>);
+
+#if __APPLE__
+    CSSPrimitiveValue(PassRefPtr<DashboardRegion>); // FIXME: Why is dashboard region a primitive value? This makes no sense.
+#endif
+
+    virtual ~CSSPrimitiveValue();
+
+    void cleanup();
+
+    unsigned short primitiveType() const { return m_type; }
+
+    /*
+     * computes a length in pixels out of the given CSSValue. Need the RenderStyle to get
+     * the fontinfo in case val is defined in em or ex.
+     *
+     * The metrics have to be a bit different for screen and printer output.
+     * For screen output we assume 1 inch == 72 px, for printer we assume 300 dpi
+     *
+     * this is screen/printer dependent, so we probably need a config option for this,
+     * and some tool to calibrate.
+     */
+    int computeLengthInt(RenderStyle*);
+    int computeLengthInt(RenderStyle*, double multiplier);
+    int computeLengthIntForLength(RenderStyle*);
+    int computeLengthIntForLength(RenderStyle*, double multiplier);
+    short computeLengthShort(RenderStyle*);
+    short computeLengthShort(RenderStyle*, double multiplier);
+    double computeLengthFloat(RenderStyle*, bool applyZoomFactor = true);
+
+    // use with care!!!
+    void setPrimitiveType(unsigned short type) { m_type = type; }
+    void setFloatValue(unsigned short unitType, double floatValue, ExceptionCode&);
+    double getFloatValue(unsigned short unitType);
+    double getFloatValue() { return m_value.num; }
+
+    void setStringValue(unsigned short stringType, const String& stringValue, ExceptionCode&);
+    String getStringValue() const;
+    
+    Counter* getCounterValue () const {
+        return m_type != CSS_COUNTER ? 0 : m_value.counter;
+    }
+
+    RectImpl* getRectValue () const {
+        return m_type != CSS_RECT ? 0 : m_value.rect;
+    }
+
+    unsigned getRGBColorValue() const {
+        return m_type != CSS_RGBCOLOR ? 0 : m_value.rgbcolor;
+    }
+
+    Pair* getPairValue() const {
+        return m_type != CSS_PAIR ? 0 : m_value.pair;
+    }
+
+#if __APPLE__
+    DashboardRegion *getDashboardRegionValue () const {
+        return m_type != CSS_DASHBOARD_REGION ? 0 : m_value.region;
+    }
+#endif
+
+    virtual bool isPrimitiveValue() const { return true; }
+    virtual unsigned short cssValueType() const;
+
+    int getIdent();
+
+    virtual bool parseString(const String&, bool = false);
+    virtual String cssText() const;
+
+    virtual bool isQuirkValue() { return false; }
+
+protected:
+    int m_type;
+    union {
+        int ident;
+        double num;
+        StringImpl* string;
+        Counter* counter;
+        RectImpl* rect;
+        unsigned rgbcolor;
+        Pair* pair;
+#if __APPLE__
+        DashboardRegion* region;
+#endif
+    } m_value;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSProperty.cpp b/WebCore/css/CSSProperty.cpp
new file mode 100644 (file)
index 0000000..93625d0
--- /dev/null
@@ -0,0 +1,40 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSProperty.h"
+
+// Not in any header, so just declare it here for now.
+WebCore::String getPropertyName(unsigned short id);
+
+namespace WebCore {
+
+String CSSProperty::cssText() const
+{
+    return getPropertyName(id()) + ": " + m_value->cssText() + (isImportant() ? " !important" : "") + "; ";
+}
+
+bool operator==(const CSSProperty &a, const CSSProperty &b)
+{
+    return a.m_id == b.m_id && a.m_important == b.m_important && a.m_value == b.m_value;
+}
+
+}
diff --git a/WebCore/css/CSSProperty.h b/WebCore/css/CSSProperty.h
new file mode 100644 (file)
index 0000000..49f2076
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSProperty_H
+#define CSSProperty_H
+
+#include "CSSValue.h"
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+class CSSProperty {
+public:
+    CSSProperty(int propID, PassRefPtr<CSSValue> value, bool important = false, int shorthandID = 0, bool implicit = false)
+        : m_id(propID)
+        , m_shorthandID(shorthandID)
+        , m_important(important)
+        , m_implicit(implicit)
+        , m_value(value)
+    {
+    }
+    
+    CSSProperty &operator=(const CSSProperty& o)
+    {
+        m_id = o.m_id;
+        m_shorthandID = o.m_shorthandID;
+        m_important = o.m_important;
+        m_value = o.m_value;
+        return *this;
+    }
+    
+    int id() const { return m_id; }
+    int shorthandID() const { return m_shorthandID; }
+    
+    bool isImportant() const { return m_important; }
+    bool isImplicit() const { return m_implicit; }
+
+    CSSValue* value() const { return m_value.get(); }
+    
+    String cssText() const;
+
+    // make sure the following fits in 4 bytes.
+    int m_id;
+    int m_shorthandID;  // If this property was set as part of a shorthand, gives the shorthand.
+    bool m_important : 1;
+    bool m_implicit : 1; // Whether or not the property was set implicitly as the result of a shorthand.
+
+    friend bool operator==(const CSSProperty &, const CSSProperty &);
+
+    RefPtr<CSSValue> m_value;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSQuirkPrimitiveValue.h b/WebCore/css/CSSQuirkPrimitiveValue.h
new file mode 100644 (file)
index 0000000..a3a5c57
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSQuirkPrimitiveValue_H
+#define CSSQuirkPrimitiveValue_H
+
+#include "CSSPrimitiveValue.h"
+
+namespace WebCore {
+
+// This value is used to handle quirky margins in reflow roots (body, td, and th) like WinIE.
+// The basic idea is that a stylesheet can use the value __qem (for quirky em) instead of em
+// in a stylesheet.  When the quirky value is used, if you're in quirks mode, the margin will
+// collapse away inside a table cell.
+class CSSQuirkPrimitiveValue : public CSSPrimitiveValue
+{
+public:
+    CSSQuirkPrimitiveValue(double num, UnitTypes type)
+        : CSSPrimitiveValue(num, type) {}
+
+    virtual bool isQuirkValue() { return true; }
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSRule.cpp b/WebCore/css/CSSRule.cpp
new file mode 100644 (file)
index 0000000..376f829
--- /dev/null
@@ -0,0 +1,51 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSRule.h"
+
+#include "CSSStyleSheet.h"
+
+namespace WebCore {
+
+CSSStyleSheet* CSSRule::parentStyleSheet() const
+{
+    return (parent() && parent()->isCSSStyleSheet()) ? static_cast<CSSStyleSheet*>(parent()) : 0;
+}
+
+CSSRule* CSSRule::parentRule() const
+{
+    return (parent() && parent()->isRule()) ? static_cast<CSSRule*>(parent()) : 0;
+}
+
+String CSSRule::cssText() const
+{
+    // ###
+    return String();
+}
+
+void CSSRule::setCssText(String /*str*/)
+{
+    // ###
+}
+
+}
diff --git a/WebCore/css/CSSRule.h b/WebCore/css/CSSRule.h
new file mode 100644 (file)
index 0000000..19d18b8
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSRule_H
+#define CSSRule_H
+
+#include "css_base.h" // for StyleBase
+
+namespace WebCore {
+
+class CSSStyleSheet;
+
+class CSSRule : public StyleBase
+{
+public:
+    enum CSSRuleType { 
+        UNKNOWN_RULE, 
+        STYLE_RULE, 
+        CHARSET_RULE, 
+        IMPORT_RULE, 
+        MEDIA_RULE, 
+        FONT_FACE_RULE, 
+        PAGE_RULE 
+    };
+    
+    CSSRule(StyleBase* parent) : StyleBase(parent), m_type(UNKNOWN_RULE) { }
+
+    virtual bool isRule() { return true; }
+    unsigned short type() const { return m_type; }
+
+    CSSStyleSheet* parentStyleSheet() const;
+    CSSRule* parentRule() const;
+
+    virtual String cssText() const;
+    void setCssText(String str);
+
+protected:
+    CSSRuleType m_type;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSRuleList.cpp b/WebCore/css/CSSRuleList.cpp
new file mode 100644 (file)
index 0000000..bb2ce0d
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSRuleList.h"
+
+#include "CSSRule.h"
+#include "css_base.h" // for StyleList
+
+namespace WebCore {
+
+CSSRuleList::CSSRuleList()
+{
+}
+
+CSSRuleList::CSSRuleList(StyleList* lst)
+{
+    if (lst) {
+        unsigned len = lst->length();
+        for (unsigned i = 0; i < len; ++i) {
+            StyleBase* style = lst->item(i);
+            if (style->isRule())
+                append(static_cast<CSSRule*>(style));
+        }
+    }
+}
+
+CSSRuleList::~CSSRuleList()
+{
+    CSSRule* rule;
+    while (!m_lstCSSRules.isEmpty() && (rule = m_lstCSSRules.take(0)))
+        rule->deref();
+}
+
+void CSSRuleList::deleteRule(unsigned index)
+{
+    CSSRule* rule = m_lstCSSRules.take(index);
+    if (rule)
+        rule->deref();
+    else
+        ; // ### Throw INDEX_SIZE_ERR exception here (TODO)
+}
+
+void CSSRuleList::append(CSSRule* rule)
+{
+    insertRule(rule, m_lstCSSRules.count()) ;
+}
+
+unsigned CSSRuleList::insertRule(CSSRule* rule, unsigned index)
+{
+    if (rule && m_lstCSSRules.insert(index, rule)) {
+        rule->ref();
+        return index;
+    }
+
+    // ### Should throw INDEX_SIZE_ERR exception instead! (TODO)
+    return 0;
+}
+
+}
diff --git a/WebCore/css/CSSRuleList.h b/WebCore/css/CSSRuleList.h
new file mode 100644 (file)
index 0000000..e982b62
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSRuleList_H
+#define CSSRuleList_H
+
+#include "Shared.h"
+#include "DeprecatedPtrList.h"
+
+namespace WebCore {
+
+class CSSRule;
+class StyleList;
+
+class CSSRuleList : public Shared<CSSRuleList>
+{
+public:
+    CSSRuleList();
+    CSSRuleList(StyleList*);
+    ~CSSRuleList();
+
+    unsigned length() const { return m_lstCSSRules.count(); }
+    CSSRule* item (unsigned index) { return m_lstCSSRules.at(index); }
+
+    /* not part of the DOM */
+    unsigned insertRule (CSSRule* rule, unsigned index);
+    void deleteRule (unsigned index);
+    void append(CSSRule* rule);
+
+protected:
+    DeprecatedPtrList<CSSRule> m_lstCSSRules;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSStyleDeclaration.cpp b/WebCore/css/CSSStyleDeclaration.cpp
new file mode 100644 (file)
index 0000000..9c3043b
--- /dev/null
@@ -0,0 +1,172 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSStyleDeclaration.h"
+
+#include "CSSMutableStyleDeclaration.h"
+#include "CSSProperty.h"
+#include "CSSPropertyNames.h"
+#include "CSSRule.h"
+#include "DeprecatedValueList.h"
+#include "ksvgcssproperties.h"
+
+// Not in any header, so just declare it here for now.
+WebCore::String getPropertyName(unsigned short id);
+
+namespace WebCore {
+
+// Defined in CSSGrammar.y, but not in any header, so just declare it here for now.
+int getPropertyID(const char* str, int len);
+
+static int propertyID(const String& s)
+{
+    char buffer[maxCSSPropertyNameLength];
+
+    unsigned len = s.length();
+    if (len > maxCSSPropertyNameLength)
+        return 0;
+
+    for (unsigned i = 0; i != len; ++i) {
+        UChar c = s[i];
+        if (c == 0 || c >= 0x7F)
+            return 0; // illegal character
+        buffer[i] = c;
+    }
+
+    int id = getPropertyID(buffer, len);
+#if SVG_SUPPORT
+    if (id == 0)
+        id = SVG::getSVGCSSPropertyID(buffer, len);
+#endif
+    return id;
+}
+
+CSSStyleDeclaration::CSSStyleDeclaration(CSSRule* parent)
+    : StyleBase(parent)
+{
+}
+
+bool CSSStyleDeclaration::isStyleDeclaration()
+{
+    return true;
+}
+
+PassRefPtr<CSSValue> CSSStyleDeclaration::getPropertyCSSValue(const String& propertyName)
+{
+    int propID = propertyID(propertyName);
+    if (!propID)
+        return 0;
+    return getPropertyCSSValue(propID);
+}
+
+String CSSStyleDeclaration::getPropertyValue(const String &propertyName)
+{
+    int propID = propertyID(propertyName);
+    if (!propID)
+        return String();
+    return getPropertyValue(propID);
+}
+
+String CSSStyleDeclaration::getPropertyPriority(const String &propertyName)
+{
+    int propID = propertyID(propertyName);
+    if (!propID)
+        return String();
+    return getPropertyPriority(propID) ? "important" : "";
+}
+
+String CSSStyleDeclaration::getPropertyShorthand(const String &propertyName)
+{
+    int propID = propertyID(propertyName);
+    if (!propID)
+        return String();
+    int shorthandID = getPropertyShorthand(propID);
+    if (!shorthandID)
+        return String();
+    return getPropertyName(shorthandID);
+}
+
+bool CSSStyleDeclaration::isPropertyImplicit(const String &propertyName)
+{
+    int propID = propertyID(propertyName);
+    if (!propID)
+        return false;
+    return isPropertyImplicit(propID);
+}
+
+void CSSStyleDeclaration::setProperty(const String& propertyName, const String& value, const String& priority, ExceptionCode& ec)
+{
+    int propID = propertyID(propertyName);
+    if (!propID) // set exception?
+        return;
+    bool important = priority.find("important", 0, false) != -1;
+    setProperty(propID, value, important, ec);
+}
+
+String CSSStyleDeclaration::removeProperty(const String& propertyName, ExceptionCode& ec)
+{
+    int propID = propertyID(propertyName);
+    if (!propID)
+        return String();
+    return removeProperty(propID, ec);
+}
+
+bool CSSStyleDeclaration::isPropertyName(const String &propertyName)
+{
+    return propertyID(propertyName);
+}
+
+CSSRule *CSSStyleDeclaration::parentRule() const
+{
+    return (parent() && parent()->isRule()) ? static_cast<CSSRule *>(parent()) : 0;
+}
+
+void CSSStyleDeclaration::diff(CSSMutableStyleDeclaration *style) const
+{
+    if (!style)
+        return;
+
+    DeprecatedValueList<int> properties;
+    DeprecatedValueListConstIterator<CSSProperty> end;
+    for (DeprecatedValueListConstIterator<CSSProperty> it(style->valuesIterator()); it != end; ++it) {
+        const CSSProperty& property = *it;
+        RefPtr<CSSValue> value = getPropertyCSSValue(property.id());
+        if (value && (value->cssText() == property.value()->cssText()))
+            properties.append(property.id());
+    }
+    
+    for (DeprecatedValueListIterator<int> it(properties.begin()); it != properties.end(); ++it)
+        style->removeProperty(*it);
+}
+
+PassRefPtr<CSSMutableStyleDeclaration> CSSStyleDeclaration::copyPropertiesInSet(const int *set, unsigned length) const
+{
+    DeprecatedValueList<CSSProperty> list;
+    for (unsigned i = 0; i < length; i++) {
+        RefPtr<CSSValue> value = getPropertyCSSValue(set[i]);
+        if (value)
+            list.append(CSSProperty(set[i], value.release(), false));
+    }
+    return new CSSMutableStyleDeclaration(0, list);
+}
+
+}
diff --git a/WebCore/css/CSSStyleDeclaration.h b/WebCore/css/CSSStyleDeclaration.h
new file mode 100644 (file)
index 0000000..806c18e
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSStyleDeclaration_H
+#define CSSStyleDeclaration_H
+
+#include "css_base.h" // for StyleBase
+
+namespace WebCore {
+
+class CSSMutableStyleDeclaration;
+
+typedef int ExceptionCode;
+
+class CSSStyleDeclaration : public StyleBase {
+public:
+    virtual bool isStyleDeclaration();
+
+    static bool isPropertyName(const String& propertyName);
+
+    CSSRule* parentRule() const;
+
+    virtual String cssText() const = 0;
+    virtual void setCssText(const String&, ExceptionCode&) = 0;
+
+    virtual unsigned length() const = 0;
+    virtual String item(unsigned index) const = 0;
+
+    PassRefPtr<CSSValue> getPropertyCSSValue(const String& propertyName);
+    String getPropertyValue(const String& propertyName);
+    String getPropertyPriority(const String& propertyName);
+    String getPropertyShorthand(const String& propertyName);
+    bool isPropertyImplicit(const String& propertyName);
+    
+    virtual PassRefPtr<CSSValue> getPropertyCSSValue(int propertyID) const = 0;
+    virtual String getPropertyValue(int propertyID) const = 0;
+    virtual bool getPropertyPriority(int propertyID) const = 0;
+    virtual int getPropertyShorthand(int propertyID) const = 0;
+    virtual bool isPropertyImplicit(int propertyID) const = 0;
+
+    void setProperty(const String& propertyName, const String& value, const String& priority, ExceptionCode&);
+    String removeProperty(const String& propertyName, ExceptionCode&);
+    virtual void setProperty(int propertyId, const String& value, bool important, ExceptionCode&) = 0;
+    virtual String removeProperty(int propertyID, ExceptionCode&) = 0;
+
+    virtual PassRefPtr<CSSMutableStyleDeclaration> copy() const = 0;
+    virtual PassRefPtr<CSSMutableStyleDeclaration> makeMutable() = 0;
+    void diff(CSSMutableStyleDeclaration*) const;
+
+    PassRefPtr<CSSMutableStyleDeclaration> copyPropertiesInSet(const int* set, unsigned length) const;
+
+protected:
+    CSSStyleDeclaration(CSSRule* parentRule = 0);
+
+private:
+    CSSStyleDeclaration(const CSSStyleDeclaration &);
+    CSSStyleDeclaration& operator=(const CSSStyleDeclaration &);
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSStyleRule.cpp b/WebCore/css/CSSStyleRule.cpp
new file mode 100644 (file)
index 0000000..50d3633
--- /dev/null
@@ -0,0 +1,85 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSStyleRule.h"
+
+#include "CSSMutableStyleDeclaration.h"
+
+namespace WebCore {
+
+CSSStyleRule::CSSStyleRule(StyleBase* parent)
+    : CSSRule(parent)
+    , m_selector(0)
+{
+    m_type = STYLE_RULE;
+}
+
+CSSStyleRule::~CSSStyleRule()
+{
+    if (m_style)
+        m_style->setParent(0);
+    delete m_selector;
+}
+
+String CSSStyleRule::selectorText() const
+{
+    if (m_selector) {
+        String str;
+        for (CSSSelector* s = m_selector; s; s = s->next()) {
+            if (s != m_selector)
+                str += ", ";
+            str += s->selectorText();
+        }
+        return str;
+    }
+    return String();
+}
+
+void CSSStyleRule::setSelectorText(String /*str*/)
+{
+    // ###
+}
+
+String CSSStyleRule::cssText() const
+{
+    String result = selectorText();
+    
+    result += " { ";
+    result += m_style->cssText();
+    result += "}";
+    
+    return result;
+}
+
+bool CSSStyleRule::parseString( const String &/*string*/, bool )
+{
+    // ###
+    return false;
+}
+
+void CSSStyleRule::setDeclaration(PassRefPtr<CSSMutableStyleDeclaration> style)
+{
+    m_style = style;
+}
+
+}
diff --git a/WebCore/css/CSSStyleRule.h b/WebCore/css/CSSStyleRule.h
new file mode 100644 (file)
index 0000000..e729eeb
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSStyleRule_H
+#define CSSStyleRule_H
+
+#include "CSSRule.h"
+
+namespace WebCore {
+
+class CSSMutableStyleDeclaration;
+
+class CSSStyleRule : public CSSRule
+{
+public:
+    CSSStyleRule(StyleBase* parent);
+    virtual ~CSSStyleRule();
+
+    CSSMutableStyleDeclaration* style() const { return m_style.get(); }
+
+    virtual bool isStyleRule() { return true; }
+    virtual String cssText() const;
+
+    String selectorText() const;
+    void setSelectorText(String);
+
+    virtual bool parseString(const String&, bool = false);
+
+    void setSelector(CSSSelector* selector) { m_selector = selector; }
+    void setDeclaration(PassRefPtr<CSSMutableStyleDeclaration>);
+
+    CSSSelector* selector() { return m_selector; }
+    CSSMutableStyleDeclaration* declaration() { return m_style.get(); }
+protected:
+    RefPtr<CSSMutableStyleDeclaration> m_style;
+    CSSSelector* m_selector;
+};
+
+} // namespace
+
+#endif
index 0a3318ddd8f19ff28b82ec4b9137f9912b4bf3df..4c805f680977209fbd1a600c7dcf6001f5b2b392 100644 (file)
@@ -22,8 +22,9 @@
 #include "config.h"
 #include "CSSStyleSheet.h"
 
-#include "css_ruleimpl.h"
-#include "CSSParser.h"
+#include "CSSImportRule.h"
+#include "cssparser.h"
+#include "CSSRuleList.h"
 #include "Document.h"
 #include "ExceptionCode.h"
 #include "Node.h"
@@ -56,7 +57,7 @@ CSSStyleSheet::CSSStyleSheet(CSSRule *ownerRule, String href)
 
 CSSRule *CSSStyleSheet::ownerRule() const
 {
-    return (parent() && parent()->isRule()) ? static_cast<CSSRule *>(parent()) : 0;
+    return (parent() && parent()->isRule()) ? static_cast<CSSRule*>(parent()) : 0;
 }
 
 unsigned CSSStyleSheet::insertRule(const String& rule, unsigned index, ExceptionCode& ec)
diff --git a/WebCore/css/CSSUnknownRule.h b/WebCore/css/CSSUnknownRule.h
new file mode 100644 (file)
index 0000000..a735442
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
+ * Copyright (C) 2002, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSUnknownRule_H
+#define CSSUnknownRule_H
+
+#include "CSSRule.h"
+
+namespace WebCore {
+
+class CSSUnknownRule : public CSSRule {
+public:
+    CSSUnknownRule(StyleBase* parent) : CSSRule(parent) { }
+
+    virtual bool isUnknownRule() { return true; }
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSValue.h b/WebCore/css/CSSValue.h
new file mode 100644 (file)
index 0000000..4fdf5f4
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSValue_H
+#define CSSValue_H
+
+#include "css_base.h" // for StyleBase
+
+namespace WebCore {
+
+class CSSValue : public StyleBase
+{
+public:
+    enum UnitTypes {
+        CSS_INHERIT = 0,
+        CSS_PRIMITIVE_VALUE = 1,
+        CSS_VALUE_LIST = 2,
+        CSS_CUSTOM = 3,
+        CSS_INITIAL = 4
+    };
+
+    CSSValue() : StyleBase(0) { }
+
+    virtual unsigned short cssValueType() const { return CSS_CUSTOM; }
+    virtual String cssText() const = 0;
+    void setCssText(const String&) { } // FIXME: Not implemented.
+
+    virtual bool isValue() { return true; }
+    virtual bool isFontValue() { return false; }
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/CSSValueList.cpp b/WebCore/css/CSSValueList.cpp
new file mode 100644 (file)
index 0000000..caeeadb
--- /dev/null
@@ -0,0 +1,56 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "CSSValueList.h"
+
+namespace WebCore {
+
+CSSValueList::~CSSValueList()
+{
+    for (CSSValue *val = m_values.first(); val; val = m_values.next())
+        val->deref();
+}
+
+unsigned short CSSValueList::cssValueType() const
+{
+    return CSS_VALUE_LIST;
+}
+
+void CSSValueList::append(PassRefPtr<CSSValue> val)
+{
+    m_values.append(val.release());
+}
+
+String CSSValueList::cssText() const
+{
+    String result = "";
+
+    for (DeprecatedPtrListIterator<CSSValue> iterator(m_values); iterator.current(); ++iterator) {
+        if (!result.isEmpty())
+            result += ", ";
+        result += iterator.current()->cssText();
+    }
+    
+    return result;
+}
+
+}
diff --git a/WebCore/css/CSSValueList.h b/WebCore/css/CSSValueList.h
new file mode 100644 (file)
index 0000000..062fe04
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CSSValueList_H
+#define CSSValueList_H
+
+#include "CSSValue.h"
+#include "DeprecatedPtrList.h"
+
+namespace WebCore {
+
+class CSSValueList : public CSSValue
+{
+public:
+    virtual ~CSSValueList();
+
+    unsigned length() const { return m_values.count(); }
+    CSSValue* item (unsigned index) { return m_values.at(index); }
+
+    virtual bool isValueList() { return true; }
+
+    virtual unsigned short cssValueType() const;
+
+    void append(PassRefPtr<CSSValue>);
+    virtual String cssText() const;
+
+protected:
+    DeprecatedPtrList<CSSValue> m_values;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/Counter.h b/WebCore/css/Counter.h
new file mode 100644 (file)
index 0000000..2f65424
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef Counter_H
+#define Counter_H
+
+#include "Shared.h"
+#include "PlatformString.h"
+
+namespace WebCore {
+
+class Counter : public Shared<Counter> {
+public:
+    String identifier() const { return m_identifier; }
+    String listStyle() const { return m_listStyle; }
+    String separator() const { return m_separator; }
+
+private:
+    String m_identifier;
+    String m_listStyle;
+    String m_separator;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/DashboardRegion.h b/WebCore/css/DashboardRegion.h
new file mode 100644 (file)
index 0000000..955fbe0
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef DashboardRegion_H
+#define DashboardRegion_H
+
+#include "RectImpl.h"
+
+namespace WebCore {
+
+class DashboardRegion : public RectImpl {
+public:
+    DashboardRegion() : m_isCircle(0), m_isRectangle(0) { }
+
+    RefPtr<DashboardRegion> m_next;
+    String m_label;
+    String m_geometryType;
+    bool m_isCircle : 1;
+    bool m_isRectangle : 1;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/FontFamilyValue.cpp b/WebCore/css/FontFamilyValue.cpp
new file mode 100644 (file)
index 0000000..910a1ab
--- /dev/null
@@ -0,0 +1,63 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "FontFamilyValue.h"
+
+#include "RegularExpression.h"
+
+namespace WebCore {
+
+// Quotes the string if it needs quoting.
+// We use single quotes for now beause markup.cpp uses double quotes.
+static String quoteStringIfNeeded(const String &string)
+{
+    // For now, just do this for strings that start with "#" to fix Korean font names that start with "#".
+    // Post-Tiger, we should isLegalIdentifier instead after working out all the ancillary issues.
+    if (string[0] != '#')
+        return string;
+
+    // FIXME: Also need to transform control characters into \ sequences.
+    String s = string;
+    s.replace('\\', "\\\\");
+    s.replace('\'', "\\'");
+    return "'" + s + "'";
+}
+
+FontFamilyValue::FontFamilyValue(const DeprecatedString& string)
+    : CSSPrimitiveValue(String(), CSS_STRING)
+{
+    static const RegularExpression parenReg(" \\(.*\\)$");
+    static const RegularExpression braceReg(" \\[.*\\]$");
+
+    parsedFontName = string;
+    // a language tag is often added in braces at the end. Remove it.
+    parsedFontName.replace(parenReg, "");
+    // remove [Xft] qualifiers
+    parsedFontName.replace(braceReg, "");
+}
+
+String FontFamilyValue::cssText() const
+{
+    return quoteStringIfNeeded(parsedFontName);
+}
+
+}
diff --git a/WebCore/css/FontFamilyValue.h b/WebCore/css/FontFamilyValue.h
new file mode 100644 (file)
index 0000000..75e6582
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef FontFamilyValue_H
+#define FontFamilyValue_H
+
+#include "CSSPrimitiveValue.h"
+#include "DeprecatedString.h"
+
+namespace WebCore {
+
+class FontFamilyValue : public CSSPrimitiveValue
+{
+public:
+    FontFamilyValue(const DeprecatedString& string);
+    const DeprecatedString& fontName() const { return parsedFontName; }
+    int genericFamilyType() const { return m_genericFamilyType; }
+
+    virtual String cssText() const;
+
+    DeprecatedString parsedFontName;
+private:
+    int m_genericFamilyType;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/FontValue.cpp b/WebCore/css/FontValue.cpp
new file mode 100644 (file)
index 0000000..f39643a
--- /dev/null
@@ -0,0 +1,68 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "FontValue.h"
+
+#include "CSSValueList.h"
+#include "CSSPrimitiveValue.h"
+
+namespace WebCore {
+
+String FontValue::cssText() const
+{
+    // font variant weight size / line-height family 
+
+    String result("");
+
+    if (style)
+        result += style->cssText();
+    if (variant) {
+        if (!result.isEmpty())
+            result += " ";
+        result += variant->cssText();
+    }
+    if (weight) {
+        if (!result.isEmpty())
+            result += " ";
+        result += weight->cssText();
+    }
+    if (size) {
+        if (!result.isEmpty())
+            result += " ";
+        result += size->cssText();
+    }
+    if (lineHeight) {
+        if (!size)
+            result += " ";
+        result += "/";
+        result += lineHeight->cssText();
+    }
+    if (family) {
+        if (!result.isEmpty())
+            result += " ";
+        result += family->cssText();
+    }
+
+    return result;
+}
+
+}
diff --git a/WebCore/css/FontValue.h b/WebCore/css/FontValue.h
new file mode 100644 (file)
index 0000000..9bab2cd
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef FontValue_H
+#define FontValue_H
+
+#include "CSSValue.h"
+
+namespace WebCore {
+
+class CSSValueList;
+
+class FontValue : public CSSValue
+{
+public:
+    virtual String cssText() const;
+    
+    virtual bool isFontValue() { return true; }
+
+    RefPtr<CSSPrimitiveValue> style;
+    RefPtr<CSSPrimitiveValue> variant;
+    RefPtr<CSSPrimitiveValue> weight;
+    RefPtr<CSSPrimitiveValue> size;
+    RefPtr<CSSPrimitiveValue> lineHeight;
+    RefPtr<CSSValueList> family;
+};
+
+} // namespace
+
+#endif
index 7bc580ad7fd345c8809403d2cc1701a423b3daf1..675e595a3b08ada91ac5d3b858b0238611d5e438 100644 (file)
@@ -22,8 +22,8 @@
 #include "config.h"
 #include "MediaList.h"
 
+#include "CSSRule.h"
 #include "CSSStyleSheet.h"
-#include "css_ruleimpl.h"
 #include "DeprecatedStringList.h"
 
 namespace WebCore {
diff --git a/WebCore/css/Pair.h b/WebCore/css/Pair.h
new file mode 100644 (file)
index 0000000..edf9762
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef Pair_H
+#define Pair_H
+
+#include "Shared.h"
+#include "CSSPrimitiveValue.h"
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+// A primitive value representing a pair.  This is useful for properties like border-radius, background-size/position,
+// and border-spacing (all of which are space-separated sets of two values).  At the moment we are only using it for
+// border-radius and background-size, but (FIXME) border-spacing and background-position could be converted over to use
+// it (eliminating some extra -webkit- internal properties).
+class Pair : public Shared<Pair> {
+public:
+    Pair() : m_first(0), m_second(0) { }
+    Pair(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second)
+        : m_first(first), m_second(second) { }
+    virtual ~Pair() { }
+
+    CSSPrimitiveValue* first() const { return m_first.get(); }
+    CSSPrimitiveValue* second() const { return m_second.get(); }
+
+    void setFirst(PassRefPtr<CSSPrimitiveValue> first) { m_first = first; }
+    void setSecond(PassRefPtr<CSSPrimitiveValue> second) { m_second = second; }
+
+protected:
+    RefPtr<CSSPrimitiveValue> m_first;
+    RefPtr<CSSPrimitiveValue> m_second;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/RectImpl.h b/WebCore/css/RectImpl.h
new file mode 100644 (file)
index 0000000..e8d3341
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef RectImpl_H
+#define RectImpl_H
+
+#include "Shared.h"
+#include "CSSPrimitiveValue.h"
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+class RectImpl : public Shared<RectImpl> {
+public:
+    virtual ~RectImpl() { }
+
+    CSSPrimitiveValue* top() const { return m_top.get(); }
+    CSSPrimitiveValue* right() const { return m_right.get(); }
+    CSSPrimitiveValue* bottom() const { return m_bottom.get(); }
+    CSSPrimitiveValue* left() const { return m_left.get(); }
+
+    void setTop(PassRefPtr<CSSPrimitiveValue> top) { m_top = top; }
+    void setRight(PassRefPtr<CSSPrimitiveValue> right) { m_right = right; }
+    void setBottom(PassRefPtr<CSSPrimitiveValue> bottom) { m_bottom = bottom; }
+    void setLeft(PassRefPtr<CSSPrimitiveValue> left) { m_left = left; }
+
+protected:
+    RefPtr<CSSPrimitiveValue> m_top;
+    RefPtr<CSSPrimitiveValue> m_right;
+    RefPtr<CSSPrimitiveValue> m_bottom;
+    RefPtr<CSSPrimitiveValue> m_left;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/css/ShadowValue.cpp b/WebCore/css/ShadowValue.cpp
new file mode 100644 (file)
index 0000000..874be67
--- /dev/null
@@ -0,0 +1,66 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "ShadowValue.h"
+
+#include "CSSPrimitiveValue.h"
+
+namespace WebCore {
+
+// Used for text-shadow and box-shadow
+ShadowValue::ShadowValue(PassRefPtr<CSSPrimitiveValue> _x,
+    PassRefPtr<CSSPrimitiveValue> _y,
+    PassRefPtr<CSSPrimitiveValue> _blur,
+    PassRefPtr<CSSPrimitiveValue> _color)
+    : x(_x)
+    , y(_y)
+    , blur(_blur)
+    , color(_color)
+{
+}
+
+String ShadowValue::cssText() const
+{
+    String text("");
+
+    if (color)
+        text += color->cssText();
+    if (x) {
+        if (!text.isEmpty())
+            text += " ";
+        text += x->cssText();
+    }
+    if (y) {
+        if (!text.isEmpty())
+            text += " ";
+        text += y->cssText();
+    }
+    if (blur) {
+        if (!text.isEmpty())
+            text += " ";
+        text += blur->cssText();
+    }
+
+    return text;
+}
+
+}
diff --git a/WebCore/css/ShadowValue.h b/WebCore/css/ShadowValue.h
new file mode 100644 (file)
index 0000000..610bee9
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef ShadowValue_H
+#define ShadowValue_H
+
+#include "CSSValue.h"
+
+namespace WebCore {
+
+// Used for text-shadow and box-shadow
+class ShadowValue : public CSSValue
+{
+public:
+    ShadowValue(PassRefPtr<CSSPrimitiveValue> x,
+        PassRefPtr<CSSPrimitiveValue> y,
+        PassRefPtr<CSSPrimitiveValue> blur,
+        PassRefPtr<CSSPrimitiveValue> color);
+    
+    virtual String cssText() const;
+
+    RefPtr<CSSPrimitiveValue> x;
+    RefPtr<CSSPrimitiveValue> y;
+    RefPtr<CSSPrimitiveValue> blur;
+    RefPtr<CSSPrimitiveValue> color;
+};
+
+} // namespace
+
+#endif
index bc9d38e2f88ccc3cf2be6f8421dbff6197be3147..74b1a23954d52d2565a3fff24b22a382503a1c40 100644 (file)
@@ -27,7 +27,6 @@
 #include "css_base.h"
 
 #include "Document.h"
-#include "css_valueimpl.h"
 #include "StyleSheet.h"
 
 namespace WebCore {
diff --git a/WebCore/css/css_ruleimpl.cpp b/WebCore/css/css_ruleimpl.cpp
deleted file mode 100644 (file)
index eb5a8c0..0000000
+++ /dev/null
@@ -1,366 +0,0 @@
-/**
- * This file is part of the DOM implementation for KDE.
- *
- * (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2002, 2005, 2006 Apple Computer, Inc.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-#include "css_ruleimpl.h"
-
-#include "Cache.h"
-#include "CachedCSSStyleSheet.h"
-#include "CSSStyleSheet.h"
-#include "DocLoader.h"
-#include "MediaList.h"
-#include "cssparser.h"
-#include <KURL.h>
-
-namespace WebCore {
-
-CSSStyleSheet* CSSRule::parentStyleSheet() const
-{
-    return (parent() && parent()->isCSSStyleSheet()) ? static_cast<CSSStyleSheet*>(parent()) : 0;
-}
-
-CSSRule* CSSRule::parentRule() const
-{
-    return (parent() && parent()->isRule()) ? static_cast<CSSRule*>(parent()) : 0;
-}
-
-String CSSRule::cssText() const
-{
-    // ###
-    return String();
-}
-
-void CSSRule::setCssText(String /*str*/)
-{
-    // ###
-}
-
-// ---------------------------------------------------------------------------
-
-CSSFontFaceRule::CSSFontFaceRule(StyleBase *parent)
-    : CSSRule(parent)
-{
-    m_type = FONT_FACE_RULE;
-}
-
-CSSFontFaceRule::~CSSFontFaceRule()
-{
-}
-
-// --------------------------------------------------------------------------
-
-CSSImportRule::CSSImportRule(StyleBase* parent, const String& href, MediaList* media)
-    : CSSRule(parent)
-    , m_strHref(href)
-    , m_lstMedia(media)
-    , m_cachedSheet(0)
-    , m_loading(false)
-{
-    m_type = IMPORT_RULE;
-
-    if (m_lstMedia)
-        m_lstMedia->setParent(this);
-    else
-        m_lstMedia = new MediaList(this, String());
-}
-
-CSSImportRule::~CSSImportRule()
-{
-    if (m_lstMedia)
-        m_lstMedia->setParent(0);
-    if (m_styleSheet)
-        m_styleSheet->setParent(0);
-    if (m_cachedSheet)
-        m_cachedSheet->deref(this);
-}
-
-void CSSImportRule::setStyleSheet(const String &url, const String &sheet)
-{
-    if (m_styleSheet)
-        m_styleSheet->setParent(0);
-    m_styleSheet = new CSSStyleSheet(this, url);
-
-    CSSStyleSheet *parent = parentStyleSheet();
-    m_styleSheet->parseString(sheet, !parent || parent->useStrictParsing());
-    m_loading = false;
-
-    checkLoaded();
-}
-
-bool CSSImportRule::isLoading() const
-{
-    return m_loading || (m_styleSheet && m_styleSheet->isLoading());
-}
-
-void CSSImportRule::insertedIntoParent()
-{
-    StyleBase* root = this;
-    StyleBase* parent;
-    while ((parent = root->parent()))
-        root = parent;
-    if (!root->isCSSStyleSheet())
-        return;
-    DocLoader* docLoader = static_cast<CSSStyleSheet*>(root)->docLoader();
-    if (!docLoader)
-        return;
-
-    String absHref = m_strHref;
-    CSSStyleSheet* parentSheet = parentStyleSheet();
-    if (!parentSheet->href().isNull())
-        // use parent styleheet's URL as the base URL
-        absHref = KURL(parentSheet->href().deprecatedString(), m_strHref.deprecatedString()).url();
-
-    // Check for a cycle in our import chain.  If we encounter a stylesheet
-    // in our parent chain with the same URL, then just bail.
-    for (parent = static_cast<StyleBase*>(this)->parent(); parent; parent = parent->parent())
-        if (absHref == parent->baseURL())
-            return;
-    
-    // ### pass correct charset here!!
-    m_cachedSheet = docLoader->requestStyleSheet(absHref, DeprecatedString::null);
-    if (m_cachedSheet) {
-        m_loading = true;
-        m_cachedSheet->ref(this);
-    }
-}
-
-String CSSImportRule::cssText() const
-{
-    String result = "@import url(\"";
-    result += m_strHref;
-    result += "\")";
-
-    if (m_lstMedia) {
-        result += " ";
-        result += m_lstMedia->mediaText();
-    }
-    result += ";";
-
-    return result;
-}
-
-// --------------------------------------------------------------------------
-CSSMediaRule::CSSMediaRule( StyleBase *parent, MediaList *mediaList, CSSRuleList *ruleList )
-    :   CSSRule( parent )
-{
-    m_type = MEDIA_RULE;
-    m_lstMedia = mediaList;
-    m_lstCSSRules = ruleList;
-}
-
-CSSMediaRule::CSSMediaRule(StyleBase *parent)
-    :   CSSRule( parent )
-{
-    m_type = MEDIA_RULE;
-    m_lstMedia = 0;
-    m_lstCSSRules = new CSSRuleList();
-}
-
-CSSMediaRule::CSSMediaRule( StyleBase *parent, const String &media )
-:   CSSRule( parent )
-{
-    m_type = MEDIA_RULE;
-    m_lstMedia = new MediaList( this, media );
-    m_lstCSSRules = new CSSRuleList();
-}
-
-CSSMediaRule::~CSSMediaRule()
-{
-    if(m_lstMedia)
-        m_lstMedia->setParent(0);
-
-    int length = m_lstCSSRules->length();
-    for (int i = 0; i < length; i++)
-        m_lstCSSRules->item(i)->setParent(0);
-}
-
-unsigned CSSMediaRule::append( CSSRule *rule )
-{
-    if (!rule) {
-        return 0;
-    }
-
-    rule->setParent(this);
-    return m_lstCSSRules->insertRule( rule, m_lstCSSRules->length() );
-}
-
-unsigned CSSMediaRule::insertRule(const String& rule, unsigned index)
-{
-    CSSParser p(useStrictParsing());
-    RefPtr<CSSRule> newRule = p.parseRule(parentStyleSheet(), rule);
-    if (!newRule)
-        return 0;
-    newRule->setParent(this);
-    return m_lstCSSRules->insertRule(newRule.get(), index);
-}
-
-String CSSMediaRule::cssText() const
-{
-    String result = "@media ";
-    if (m_lstMedia) {
-        result += m_lstMedia->mediaText();
-        result += " ";
-    }
-    result += "{ \n";
-    
-    if (m_lstCSSRules) {
-        unsigned len = m_lstCSSRules->length();
-        for (unsigned i = 0; i < len; i++) {
-            result += "  ";
-            result += m_lstCSSRules->item(i)->cssText();
-            result += "\n";
-        }
-    }
-    
-    result += "}";
-    return result;
-}
-
-// ---------------------------------------------------------------------------
-
-CSSRuleList::CSSRuleList(StyleList *lst)
-{
-    if (lst) {
-        unsigned len = lst->length();
-        for (unsigned i = 0; i < len; ++i) {
-            StyleBase *style = lst->item(i);
-            if (style->isRule())
-                append(static_cast<CSSRule*>(style));
-        }
-    }
-}
-
-CSSRuleList::~CSSRuleList()
-{
-    CSSRule* rule;
-    while ( !m_lstCSSRules.isEmpty() && ( rule = m_lstCSSRules.take( 0 ) ) )
-        rule->deref();
-}
-
-// ---------------------------------------------------------------------------
-
-CSSPageRule::CSSPageRule(StyleBase *parent)
-    : CSSRule(parent)
-{
-    m_type = PAGE_RULE;
-}
-
-CSSPageRule::~CSSPageRule()
-{
-}
-
-String CSSPageRule::selectorText() const
-{
-    // ###
-    return String();
-}
-
-void CSSPageRule::setSelectorText(String /*str*/)
-{
-    // ###
-}
-
-// --------------------------------------------------------------------------
-
-CSSStyleRule::CSSStyleRule(StyleBase *parent)
-    : CSSRule(parent)
-{
-    m_type = STYLE_RULE;
-    m_selector = 0;
-}
-
-CSSStyleRule::~CSSStyleRule()
-{
-    if (m_style)
-        m_style->setParent(0);
-    delete m_selector;
-}
-
-String CSSStyleRule::selectorText() const
-{
-    if (m_selector) {
-        String str;
-        for (CSSSelector *s = m_selector; s; s = s->next()) {
-            if (s != m_selector)
-                str += ", ";
-            str += s->selectorText();
-        }
-        return str;
-    }
-    return String();
-}
-
-void CSSStyleRule::setSelectorText(String /*str*/)
-{
-    // ###
-}
-
-String CSSStyleRule::cssText() const
-{
-    String result = selectorText();
-    
-    result += " { ";
-    result += m_style->cssText();
-    result += "}";
-    
-    return result;
-}
-
-bool CSSStyleRule::parseString( const String &/*string*/, bool )
-{
-    // ###
-    return false;
-}
-
-void CSSStyleRule::setDeclaration(PassRefPtr<CSSMutableStyleDeclaration> style)
-{
-    m_style = style;
-}
-
-void CSSRuleList::deleteRule ( unsigned index )
-{
-    CSSRule *rule = m_lstCSSRules.take( index );
-    if( rule )
-        rule->deref();
-    else
-        ; // ### Throw INDEX_SIZE_ERR exception here (TODO)
-}
-
-void CSSRuleList::append( CSSRule *rule )
-{
-    insertRule( rule, m_lstCSSRules.count() ) ;
-}
-
-unsigned CSSRuleList::insertRule( CSSRule *rule, unsigned index )
-{
-    if( rule && m_lstCSSRules.insert( index, rule ) )
-    {
-        rule->ref();
-        return index;
-    }
-
-    // ### Should throw INDEX_SIZE_ERR exception instead! (TODO)
-    return 0;
-}
-
-}
diff --git a/WebCore/css/css_ruleimpl.h b/WebCore/css/css_ruleimpl.h
deleted file mode 100644 (file)
index 6530dc0..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * This file is part of the DOM implementation for KDE.
- *
- * (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2002, 2006 Apple Computer, Inc.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef CSS_css_ruleimpl_h_
-#define CSS_css_ruleimpl_h_
-
-#include "css_valueimpl.h"
-
-namespace WebCore {
-
-class CachedCSSStyleSheet;
-class CSSMutableStyleDeclaration;
-class CSSStyleSheet;
-class CSSStyleSheet;
-class MediaList;
-
-class CSSRule : public StyleBase
-{
-public:
-    enum CSSRuleType { 
-        UNKNOWN_RULE, 
-        STYLE_RULE, 
-        CHARSET_RULE, 
-        IMPORT_RULE, 
-        MEDIA_RULE, 
-        FONT_FACE_RULE, 
-        PAGE_RULE 
-    };
-    
-    CSSRule(StyleBase *parent)
-        : StyleBase(parent), m_type(UNKNOWN_RULE) {}
-
-    virtual bool isRule() { return true; }
-    unsigned short type() const { return m_type; }
-
-    CSSStyleSheet *parentStyleSheet() const;
-    CSSRule *parentRule() const;
-
-    virtual String cssText() const;
-    void setCssText(WebCore::String str);
-
-protected:
-    CSSRuleType m_type;
-};
-
-
-class CSSCharsetRule : public CSSRule
-{
-public:
-    CSSCharsetRule(StyleBase *parent)
-        : CSSRule(parent) { m_type = CHARSET_RULE; }
-
-    virtual bool isCharsetRule() { return true; }
-    virtual String cssText() const;
-
-    String encoding() const { return m_encoding; }
-    void setEncoding(String _encoding) { m_encoding = _encoding; }
-
-protected:
-    String m_encoding;
-};
-
-
-class CSSFontFaceRule : public CSSRule
-{
-public:
-    CSSFontFaceRule(StyleBase *parent);
-    virtual ~CSSFontFaceRule();
-
-    CSSMutableStyleDeclaration *style() const { return m_style.get(); }
-
-    virtual bool isFontFaceRule() { return true; }
-
-protected:
-    RefPtr<CSSMutableStyleDeclaration> m_style;
-};
-
-
-class CSSImportRule : public CachedObjectClient, public CSSRule
-{
-public:
-    CSSImportRule(StyleBase* parent, const String& href, MediaList*);
-    virtual ~CSSImportRule();
-
-    String href() const { return m_strHref; }
-    MediaList* media() const { return m_lstMedia.get(); }
-    CSSStyleSheet* styleSheet() const { return m_styleSheet.get(); }
-
-    virtual bool isImportRule() { return true; }
-    virtual String cssText() const;
-  
-    bool isLoading() const;
-
-    // from CachedObjectClient
-    virtual void setStyleSheet(const String& url, const String& sheet);
-
-    virtual void insertedIntoParent();
-
-protected:
-    String m_strHref;
-    RefPtr<MediaList> m_lstMedia;
-    RefPtr<CSSStyleSheet> m_styleSheet;
-    CachedCSSStyleSheet* m_cachedSheet;
-    bool m_loading;
-};
-
-class MediaList;
-
-class CSSRuleList : public Shared<CSSRuleList>
-{
-public:
-    CSSRuleList() { }
-    CSSRuleList(StyleList *);
-    ~CSSRuleList();
-
-    unsigned length() const { return m_lstCSSRules.count(); }
-    CSSRule *item ( unsigned index ) { return m_lstCSSRules.at( index ); }
-
-    /* not part of the DOM */
-    unsigned insertRule ( CSSRule *rule, unsigned index );
-    void deleteRule ( unsigned index );
-    void append( CSSRule *rule );
-
-protected:
-    DeprecatedPtrList<CSSRule> m_lstCSSRules;
-};
-
-class CSSMediaRule : public CSSRule
-{
-public:
-    CSSMediaRule( StyleBase *parent );
-    CSSMediaRule( StyleBase *parent, const WebCore::String &media );
-    CSSMediaRule( StyleBase *parent, MediaList *mediaList, CSSRuleList *ruleList );
-    virtual ~CSSMediaRule();
-
-    MediaList *media() const { return m_lstMedia.get(); }
-    CSSRuleList *cssRules() { return m_lstCSSRules.get(); }
-
-    unsigned insertRule ( const WebCore::String &rule, unsigned index );
-    void deleteRule ( unsigned index ) { m_lstCSSRules->deleteRule( index ); }
-
-    virtual bool isMediaRule() { return true; }
-    virtual String cssText() const;
-
-    /* Not part of the DOM */
-    unsigned append( CSSRule *rule );
-protected:
-    RefPtr<MediaList> m_lstMedia;
-    RefPtr<CSSRuleList> m_lstCSSRules;
-};
-
-
-class CSSPageRule : public CSSRule
-{
-public:
-    CSSPageRule(StyleBase *parent);
-    virtual ~CSSPageRule();
-
-    CSSMutableStyleDeclaration *style() const { return m_style.get(); }
-
-    virtual bool isPageRule() { return true; }
-
-    WebCore::String selectorText() const;
-    void setSelectorText(WebCore::String str);
-
-protected:
-    RefPtr<CSSMutableStyleDeclaration> m_style;
-};
-
-class CSSImportantRule;
-
-class CSSStyleRule : public CSSRule
-{
-public:
-    CSSStyleRule(StyleBase* parent);
-    virtual ~CSSStyleRule();
-
-    CSSMutableStyleDeclaration* style() const { return m_style.get(); }
-
-    virtual bool isStyleRule() { return true; }
-    virtual String cssText() const;
-
-    WebCore::String selectorText() const;
-    void setSelectorText(WebCore::String str);
-
-    virtual bool parseString( const String &string, bool = false );
-
-    void setSelector(CSSSelector* selector) { m_selector = selector; }
-    void setDeclaration(PassRefPtr<CSSMutableStyleDeclaration>);
-
-    CSSSelector* selector() { return m_selector; }
-    CSSMutableStyleDeclaration* declaration() { return m_style.get(); }
-protected:
-    RefPtr<CSSMutableStyleDeclaration> m_style;
-    CSSSelector* m_selector;
-};
-
-class CSSUnknownRule : public CSSRule
-{
-public:
-    CSSUnknownRule(StyleBase *parent) : CSSRule(parent) {}
-
-    virtual bool isUnknownRule() { return true; }
-};
-
-} // namespace
-
-#endif
diff --git a/WebCore/css/css_valueimpl.cpp b/WebCore/css/css_valueimpl.cpp
deleted file mode 100644 (file)
index cca086b..0000000
+++ /dev/null
@@ -1,1355 +0,0 @@
-/**
- * This file is part of the DOM implementation for KDE.
- *
- * (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-#include "css_valueimpl.h"
-
-#include "Cache.h"
-#include "CachedImage.h"
-#include "DocLoader.h"
-#include "Document.h"
-#include "ExceptionCode.h"
-#include "HTMLElement.h"
-#include "cssparser.h"
-#include "CSSPropertyNames.h"
-#include "cssstyleselector.h"
-#include "CSSStyleSheet.h"
-#include "CSSValueKeywords.h"
-#include "RegularExpression.h"
-
-#if SVG_SUPPORT
-#include "ksvgcssproperties.h"
-#endif
-
-// Not in any header, so just declare it here for now.
-WebCore::String getPropertyName(unsigned short id);
-
-namespace WebCore {
-
-// Defined in CSSGrammar.y, but not in any header, so just declare it here for now.
-int getPropertyID(const char* str, int len);
-
-static int propertyID(const String& s)
-{
-    char buffer[maxCSSPropertyNameLength];
-
-    unsigned len = s.length();
-    if (len > maxCSSPropertyNameLength)
-        return 0;
-
-    for (unsigned i = 0; i != len; ++i) {
-        UChar c = s[i];
-        if (c == 0 || c >= 0x7F)
-            return 0; // illegal character
-        buffer[i] = c;
-    }
-
-    int id = getPropertyID(buffer, len);
-#if SVG_SUPPORT
-    if (id == 0)
-        id = SVG::getSVGCSSPropertyID(buffer, len);
-#endif
-    return id;
-}
-
-
-// Quotes the string if it needs quoting.
-// We use single quotes for now beause markup.cpp uses double quotes.
-static String quoteStringIfNeeded(const String &string)
-{
-    // For now, just do this for strings that start with "#" to fix Korean font names that start with "#".
-    // Post-Tiger, we should isLegalIdentifier instead after working out all the ancillary issues.
-    if (string[0] != '#')
-        return string;
-
-    // FIXME: Also need to transform control characters into \ sequences.
-    String s = string;
-    s.replace('\\', "\\\\");
-    s.replace('\'', "\\'");
-    return "'" + s + "'";
-}
-
-CSSStyleDeclaration::CSSStyleDeclaration(CSSRule *parent)
-    : StyleBase(parent)
-{
-}
-
-bool CSSStyleDeclaration::isStyleDeclaration()
-{
-    return true;
-}
-
-PassRefPtr<CSSValue> CSSStyleDeclaration::getPropertyCSSValue(const String& propertyName)
-{
-    int propID = propertyID(propertyName);
-    if (!propID)
-        return 0;
-    return getPropertyCSSValue(propID);
-}
-
-String CSSStyleDeclaration::getPropertyValue(const String &propertyName)
-{
-    int propID = propertyID(propertyName);
-    if (!propID)
-        return String();
-    return getPropertyValue(propID);
-}
-
-String CSSStyleDeclaration::getPropertyPriority(const String &propertyName)
-{
-    int propID = propertyID(propertyName);
-    if (!propID)
-        return String();
-    return getPropertyPriority(propID) ? "important" : "";
-}
-
-String CSSStyleDeclaration::getPropertyShorthand(const String &propertyName)
-{
-    int propID = propertyID(propertyName);
-    if (!propID)
-        return String();
-    int shorthandID = getPropertyShorthand(propID);
-    if (!shorthandID)
-        return String();
-    return getPropertyName(shorthandID);
-}
-
-bool CSSStyleDeclaration::isPropertyImplicit(const String &propertyName)
-{
-    int propID = propertyID(propertyName);
-    if (!propID)
-        return false;
-    return isPropertyImplicit(propID);
-}
-
-void CSSStyleDeclaration::setProperty(const String& propertyName, const String& value, const String& priority, ExceptionCode& ec)
-{
-    int propID = propertyID(propertyName);
-    if (!propID) // set exception?
-        return;
-    bool important = priority.find("important", 0, false) != -1;
-    setProperty(propID, value, important, ec);
-}
-
-String CSSStyleDeclaration::removeProperty(const String& propertyName, ExceptionCode& ec)
-{
-    int propID = propertyID(propertyName);
-    if (!propID)
-        return String();
-    return removeProperty(propID, ec);
-}
-
-bool CSSStyleDeclaration::isPropertyName(const String &propertyName)
-{
-    return propertyID(propertyName);
-}
-
-// --------------------------------------------------------------------------------------
-
-CSSMutableStyleDeclaration::CSSMutableStyleDeclaration()
-    : m_node(0)
-{
-}
-
-CSSMutableStyleDeclaration::CSSMutableStyleDeclaration(CSSRule *parent)
-    : CSSStyleDeclaration(parent), m_node(0)
-{
-}
-
-CSSMutableStyleDeclaration::CSSMutableStyleDeclaration(CSSRule *parent, const DeprecatedValueList<CSSProperty> &values)
-    : CSSStyleDeclaration(parent), m_values(values), m_node(0)
-{
-    // FIXME: This allows duplicate properties.
-}
-
-CSSMutableStyleDeclaration::CSSMutableStyleDeclaration(CSSRule *parent, const CSSProperty * const *properties, int numProperties)
-    : CSSStyleDeclaration(parent), m_node(0)
-{
-    for (int i = 0; i < numProperties; ++i)
-        m_values.append(*properties[i]);
-    // FIXME: This allows duplicate properties.
-}
-
-CSSMutableStyleDeclaration& CSSMutableStyleDeclaration::operator=(const CSSMutableStyleDeclaration& o)
-{
-    // don't attach it to the same node, just leave the current m_node value
-    m_values = o.m_values;
-    return *this;
-}
-
-String CSSMutableStyleDeclaration::getPropertyValue(int propertyID) const
-{
-    RefPtr<CSSValue> value = getPropertyCSSValue(propertyID);
-    if (value)
-        return value->cssText();
-
-    // Shorthand and 4-values properties
-    switch ( propertyID ) {
-    case CSS_PROP_BACKGROUND_POSITION:
-    {
-        // ## Is this correct? The code in cssparser.cpp is confusing
-        const int properties[2] = { CSS_PROP_BACKGROUND_POSITION_X,
-                                    CSS_PROP_BACKGROUND_POSITION_Y };
-        return getShortHandValue( properties, 2 );
-    }
-    case CSS_PROP_BACKGROUND:
-    {
-        const int properties[5] = { CSS_PROP_BACKGROUND_IMAGE, CSS_PROP_BACKGROUND_REPEAT,
-                                    CSS_PROP_BACKGROUND_ATTACHMENT, CSS_PROP_BACKGROUND_POSITION,
-                                    CSS_PROP_BACKGROUND_COLOR };
-        return getShortHandValue( properties, 5 );
-    }
-    case CSS_PROP_BORDER:
-    {
-        const int properties[3] = { CSS_PROP_BORDER_WIDTH, CSS_PROP_BORDER_STYLE,
-                                    CSS_PROP_BORDER_COLOR };
-        return getShortHandValue( properties, 3 );
-    }
-    case CSS_PROP_BORDER_TOP:
-    {
-        const int properties[3] = { CSS_PROP_BORDER_TOP_WIDTH, CSS_PROP_BORDER_TOP_STYLE,
-                                    CSS_PROP_BORDER_TOP_COLOR};
-        return getShortHandValue( properties, 3 );
-    }
-    case CSS_PROP_BORDER_RIGHT:
-    {
-        const int properties[3] = { CSS_PROP_BORDER_RIGHT_WIDTH, CSS_PROP_BORDER_RIGHT_STYLE,
-                                    CSS_PROP_BORDER_RIGHT_COLOR};
-        return getShortHandValue( properties, 3 );
-    }
-    case CSS_PROP_BORDER_BOTTOM:
-    {
-        const int properties[3] = { CSS_PROP_BORDER_BOTTOM_WIDTH, CSS_PROP_BORDER_BOTTOM_STYLE,
-                                    CSS_PROP_BORDER_BOTTOM_COLOR};
-        return getShortHandValue( properties, 3 );
-    }
-    case CSS_PROP_BORDER_LEFT:
-    {
-        const int properties[3] = { CSS_PROP_BORDER_LEFT_WIDTH, CSS_PROP_BORDER_LEFT_STYLE,
-                                    CSS_PROP_BORDER_LEFT_COLOR};
-        return getShortHandValue( properties, 3 );
-    }
-    case CSS_PROP_OUTLINE:
-    {
-        const int properties[3] = { CSS_PROP_OUTLINE_WIDTH, CSS_PROP_OUTLINE_STYLE,
-                                    CSS_PROP_OUTLINE_COLOR };
-        return getShortHandValue( properties, 3 );
-    }
-    case CSS_PROP_BORDER_COLOR:
-    {
-        const int properties[4] = { CSS_PROP_BORDER_TOP_COLOR, CSS_PROP_BORDER_RIGHT_COLOR,
-                                    CSS_PROP_BORDER_BOTTOM_COLOR, CSS_PROP_BORDER_LEFT_COLOR };
-        return get4Values( properties );
-    }
-    case CSS_PROP_BORDER_WIDTH:
-    {
-        const int properties[4] = { CSS_PROP_BORDER_TOP_WIDTH, CSS_PROP_BORDER_RIGHT_WIDTH,
-                                    CSS_PROP_BORDER_BOTTOM_WIDTH, CSS_PROP_BORDER_LEFT_WIDTH };
-        return get4Values( properties );
-    }
-    case CSS_PROP_BORDER_STYLE:
-    {
-        const int properties[4] = { CSS_PROP_BORDER_TOP_STYLE, CSS_PROP_BORDER_RIGHT_STYLE,
-                                    CSS_PROP_BORDER_BOTTOM_STYLE, CSS_PROP_BORDER_LEFT_STYLE };
-        return get4Values( properties );
-    }
-    case CSS_PROP_MARGIN:
-    {
-        const int properties[4] = { CSS_PROP_MARGIN_TOP, CSS_PROP_MARGIN_RIGHT,
-                                    CSS_PROP_MARGIN_BOTTOM, CSS_PROP_MARGIN_LEFT };
-        return get4Values( properties );
-    }
-    case CSS_PROP_PADDING:
-    {
-        const int properties[4] = { CSS_PROP_PADDING_TOP, CSS_PROP_PADDING_RIGHT,
-                                    CSS_PROP_PADDING_BOTTOM, CSS_PROP_PADDING_LEFT };
-        return get4Values( properties );
-    }
-    case CSS_PROP_LIST_STYLE:
-    {
-        const int properties[3] = { CSS_PROP_LIST_STYLE_TYPE, CSS_PROP_LIST_STYLE_POSITION,
-                                    CSS_PROP_LIST_STYLE_IMAGE };
-        return getShortHandValue( properties, 3 );
-    }
-    }
-    return String();
-}
-
-String CSSMutableStyleDeclaration::get4Values( const int* properties ) const
-{
-    String res;
-    for (int i = 0; i < 4; ++i) {
-        if (!isPropertyImplicit(properties[i])) {
-            RefPtr<CSSValue> value = getPropertyCSSValue(properties[i]);
-            if (!value) // apparently all 4 properties must be specified.
-                return String();
-            if (!res.isNull())
-                res += " ";
-            res += value->cssText();
-        }
-    }
-    return res;
-}
-
-String CSSMutableStyleDeclaration::getShortHandValue( const int* properties, int number ) const
-{
-    String res;
-    for (int i = 0; i < number; ++i) {
-        if (!isPropertyImplicit(properties[i])) {
-            RefPtr<CSSValue> value = getPropertyCSSValue(properties[i]);
-            if (value) { // TODO provide default value if !value
-                if (!res.isNull())
-                    res += " ";
-                res += value->cssText();
-            }
-        }
-    }
-    return res;
-}
-
-PassRefPtr<CSSValue> CSSMutableStyleDeclaration::getPropertyCSSValue(int propertyID) const
-{
-    DeprecatedValueListConstIterator<CSSProperty> end;
-    for (DeprecatedValueListConstIterator<CSSProperty> it = m_values.fromLast(); it != end; --it)
-        if (propertyID == (*it).m_id)
-            return (*it).value();
-    return 0;
-}
-
-String CSSMutableStyleDeclaration::removeProperty(int propertyID, bool notifyChanged, ExceptionCode& ec)
-{
-    ec = 0;
-
-    String value;
-
-    DeprecatedValueListIterator<CSSProperty> end;
-    for (DeprecatedValueListIterator<CSSProperty> it = m_values.fromLast(); it != end; --it)
-        if (propertyID == (*it).m_id) {
-            value = (*it).value()->cssText();
-            m_values.remove(it);
-            if (notifyChanged)
-                setChanged();
-            break;
-        }
-
-    return value;
-}
-
-void CSSMutableStyleDeclaration::clear()
-{
-    m_values.clear();
-    setChanged();
-}
-
-void CSSMutableStyleDeclaration::setChanged()
-{
-    if (m_node) {
-        m_node->setChanged();
-        // FIXME: Ideally, this should be factored better and there
-        // should be a subclass of CSSMutableStyleDeclaration just
-        // for inline style declarations that handles this
-        if (m_node->isStyledElement() && this == static_cast<StyledElement *>(m_node)->inlineStyleDecl())
-            static_cast<StyledElement *>(m_node)->invalidateStyleAttribute();
-        return;
-    }
-
-    // ### quick&dirty hack for KDE 3.0... make this MUCH better! (Dirk)
-    StyleBase *root = this;
-    while (StyleBase *parent = root->parent())
-        root = parent;
-    if (root->isCSSStyleSheet())
-        static_cast<CSSStyleSheet*>(root)->doc()->updateStyleSelector();
-}
-
-bool CSSMutableStyleDeclaration::getPropertyPriority(int propertyID) const
-{
-    DeprecatedValueListConstIterator<CSSProperty> end;
-    for (DeprecatedValueListConstIterator<CSSProperty> it = m_values.begin(); it != end; ++it)
-        if (propertyID == (*it).id())
-            return (*it).isImportant();
-    return false;
-}
-
-int CSSMutableStyleDeclaration::getPropertyShorthand(int propertyID) const
-{
-    DeprecatedValueListConstIterator<CSSProperty> end;
-    for (DeprecatedValueListConstIterator<CSSProperty> it = m_values.begin(); it != end; ++it)
-        if (propertyID == (*it).id())
-            return (*it).shorthandID();
-    return false;
-}
-
-bool CSSMutableStyleDeclaration::isPropertyImplicit(int propertyID) const
-{
-    DeprecatedValueListConstIterator<CSSProperty> end;
-    for (DeprecatedValueListConstIterator<CSSProperty> it = m_values.begin(); it != end; ++it)
-        if (propertyID == (*it).id())
-            return (*it).isImplicit();
-    return false;
-}
-
-void CSSMutableStyleDeclaration::setProperty(int propertyID, const String &value, bool important, ExceptionCode& ec)
-{
-    setProperty(propertyID, value, important, true, ec);
-}
-
-String CSSMutableStyleDeclaration::removeProperty(int propertyID, ExceptionCode& ec)
-{
-    return removeProperty(propertyID, true, ec);
-}
-
-bool CSSMutableStyleDeclaration::setProperty(int propertyID, const String &value, bool important, bool notifyChanged, ExceptionCode& ec)
-{
-    ec = 0;
-
-    removeProperty(propertyID);
-
-    CSSParser parser(useStrictParsing());
-    bool success = parser.parseValue(this, propertyID, value, important);
-    if (!success) {
-        ec = SYNTAX_ERR;
-    } else if (notifyChanged)
-        setChanged();
-    return success;
-}
-
-bool CSSMutableStyleDeclaration::setProperty(int propertyID, int value, bool important, bool notifyChanged)
-{
-    removeProperty(propertyID);
-    m_values.append(CSSProperty(propertyID, new CSSPrimitiveValue(value), important));
-    if (notifyChanged)
-        setChanged();
-    return true;
-}
-
-void CSSMutableStyleDeclaration::setStringProperty(int propertyId, const String &value, CSSPrimitiveValue::UnitTypes type, bool important)
-{
-    removeProperty(propertyId);
-    m_values.append(CSSProperty(propertyId, new CSSPrimitiveValue(value, type), important));
-    setChanged();
-}
-
-void CSSMutableStyleDeclaration::setImageProperty(int propertyId, const String &URL, bool important)
-{
-    removeProperty(propertyId);
-    m_values.append(CSSProperty(propertyId, new CSSImageValue(URL, this), important));
-    setChanged();
-}
-
-void CSSMutableStyleDeclaration::parseDeclaration(const String &styleDeclaration)
-{
-    m_values.clear();
-    CSSParser parser(useStrictParsing());
-    parser.parseDeclaration(this, styleDeclaration);
-    setChanged();
-}
-
-void CSSMutableStyleDeclaration::addParsedProperties(const CSSProperty * const *properties, int numProperties)
-{
-    for (int i = 0; i < numProperties; ++i) {
-        removeProperty(properties[i]->id(), false);
-        m_values.append(*properties[i]);
-    }
-    // FIXME: This probably should have a call to setChanged() if something changed. We may also wish to add
-    // a notifyChanged argument to this function to follow the model of other functions in this class.
-}
-
-void CSSMutableStyleDeclaration::setLengthProperty(int id, const String &value, bool important, bool /* multiLength*/)
-{
-    bool parseMode = useStrictParsing();
-    setStrictParsing(false);
-    setProperty(id, value, important);
-    setStrictParsing(parseMode);
-}
-
-unsigned CSSMutableStyleDeclaration::length() const
-{
-    return m_values.count();
-}
-
-String CSSMutableStyleDeclaration::item(unsigned i) const
-{
-    if (i >= m_values.count())
-       return String();
-    return getPropertyName(m_values[i].id());
-}
-
-CSSRule *CSSStyleDeclaration::parentRule() const
-{
-    return (parent() && parent()->isRule()) ? static_cast<CSSRule *>(parent()) : 0;
-}
-
-String CSSMutableStyleDeclaration::cssText() const
-{
-    String result = "";
-    
-    DeprecatedValueListConstIterator<CSSProperty> end;
-    for (DeprecatedValueListConstIterator<CSSProperty> it = m_values.begin(); it != end; ++it)
-        result += (*it).cssText();
-
-    return result;
-}
-
-void CSSMutableStyleDeclaration::setCssText(const String& text, ExceptionCode& ec)
-{
-    ec = 0;
-    m_values.clear();
-    CSSParser parser(useStrictParsing());
-    parser.parseDeclaration(this, text);
-    // FIXME: Detect syntax errors and set ec.
-    setChanged();
-}
-
-void CSSMutableStyleDeclaration::merge(CSSMutableStyleDeclaration *other, bool argOverridesOnConflict)
-{
-    DeprecatedValueListConstIterator<CSSProperty> end;
-    for (DeprecatedValueListConstIterator<CSSProperty> it = other->valuesIterator(); it != end; ++it) {
-        const CSSProperty &property = *it;
-        RefPtr<CSSValue> value = getPropertyCSSValue(property.id());
-        if (value) {
-            if (!argOverridesOnConflict)
-                continue;
-            removeProperty(property.id());
-        }
-        m_values.append(property);
-    }
-    // FIXME: This probably should have a call to setChanged() if something changed. We may also wish to add
-    // a notifyChanged argument to this function to follow the model of other functions in this class.
-}
-
-void CSSStyleDeclaration::diff(CSSMutableStyleDeclaration *style) const
-{
-    if (!style)
-        return;
-
-    DeprecatedValueList<int> properties;
-    DeprecatedValueListConstIterator<CSSProperty> end;
-    for (DeprecatedValueListConstIterator<CSSProperty> it(style->valuesIterator()); it != end; ++it) {
-        const CSSProperty &property = *it;
-        RefPtr<CSSValue> value = getPropertyCSSValue(property.id());
-        if (value && (value->cssText() == property.value()->cssText()))
-            properties.append(property.id());
-    }
-    
-    for (DeprecatedValueListIterator<int> it(properties.begin()); it != properties.end(); ++it)
-        style->removeProperty(*it);
-}
-
-// This is the list of properties we want to copy in the copyInheritableProperties() function.
-// It is the intersection of the list of inherited CSS properties and the
-// properties for which we have a computed implementation in this file.
-const int inheritableProperties[] = {
-    CSS_PROP_BORDER_COLLAPSE,
-    CSS_PROP_BORDER_SPACING,
-    CSS_PROP_COLOR,
-    CSS_PROP_FONT_FAMILY,
-    CSS_PROP_FONT_SIZE,
-    CSS_PROP_FONT_STYLE,
-    CSS_PROP_FONT_VARIANT,
-    CSS_PROP_FONT_WEIGHT,
-    CSS_PROP_LETTER_SPACING,
-    CSS_PROP_LINE_HEIGHT,
-    CSS_PROP_TEXT_ALIGN,
-    CSS_PROP__WEBKIT_TEXT_DECORATIONS_IN_EFFECT,
-    CSS_PROP_TEXT_INDENT,
-    CSS_PROP__WEBKIT_TEXT_SIZE_ADJUST,
-    CSS_PROP_TEXT_TRANSFORM,
-    CSS_PROP_ORPHANS,
-    CSS_PROP_WHITE_SPACE,
-    CSS_PROP_WIDOWS,
-    CSS_PROP_WORD_SPACING,
-};
-
-const unsigned numInheritableProperties = sizeof(inheritableProperties) / sizeof(inheritableProperties[0]);
-
-// This is the list of properties we want to copy in the copyBlockProperties() function.
-// It is the list of CSS properties that apply specially to block-level elements.
-static const int blockProperties[] = {
-    CSS_PROP_ORPHANS,
-    CSS_PROP_OVERFLOW, // This can be also be applied to replaced elements
-    CSS_PROP_PAGE_BREAK_AFTER,
-    CSS_PROP_PAGE_BREAK_BEFORE,
-    CSS_PROP_PAGE_BREAK_INSIDE,
-    CSS_PROP_TEXT_ALIGN,
-    CSS_PROP_TEXT_INDENT,
-    CSS_PROP_WIDOWS
-};
-
-const unsigned numBlockProperties = sizeof(blockProperties) / sizeof(blockProperties[0]);
-
-PassRefPtr<CSSMutableStyleDeclaration> CSSMutableStyleDeclaration::copyBlockProperties() const
-{
-    return copyPropertiesInSet(blockProperties, numBlockProperties);
-}
-
-void CSSMutableStyleDeclaration::removeBlockProperties()
-{
-    removePropertiesInSet(blockProperties, numBlockProperties);
-}
-
-void CSSMutableStyleDeclaration::removeInheritableProperties()
-{
-    removePropertiesInSet(inheritableProperties, numInheritableProperties);
-}
-
-PassRefPtr<CSSMutableStyleDeclaration> CSSStyleDeclaration::copyPropertiesInSet(const int *set, unsigned length) const
-{
-    DeprecatedValueList<CSSProperty> list;
-    for (unsigned i = 0; i < length; i++) {
-        RefPtr<CSSValue> value = getPropertyCSSValue(set[i]);
-        if (value)
-            list.append(CSSProperty(set[i], value.release(), false));
-    }
-    return new CSSMutableStyleDeclaration(0, list);
-}
-
-void CSSMutableStyleDeclaration::removePropertiesInSet(const int *set, unsigned length)
-{
-    bool changed = false;
-    for (unsigned i = 0; i < length; i++) {
-        RefPtr<CSSValue> value = getPropertyCSSValue(set[i]);
-        if (value) {
-            m_values.remove(CSSProperty(set[i], value.release(), false));
-            changed = true;
-        }
-    }
-    if (changed)
-        setChanged();
-}
-
-PassRefPtr<CSSMutableStyleDeclaration> CSSMutableStyleDeclaration::makeMutable()
-{
-    return this;
-}
-
-PassRefPtr<CSSMutableStyleDeclaration> CSSMutableStyleDeclaration::copy() const
-{
-    return new CSSMutableStyleDeclaration(0, m_values);
-}
-
-// --------------------------------------------------------------------------------------
-
-unsigned short CSSInheritedValue::cssValueType() const
-{
-    return CSS_INHERIT;
-}
-
-String CSSInheritedValue::cssText() const
-{
-    return "inherit";
-}
-
-unsigned short CSSInitialValue::cssValueType() const
-{ 
-    return CSS_INITIAL; 
-}
-
-String CSSInitialValue::cssText() const
-{
-    return "initial";
-}
-
-// ----------------------------------------------------------------------------------------
-
-CSSValueList::~CSSValueList()
-{
-    for (CSSValue *val = m_values.first(); val; val = m_values.next())
-        val->deref();
-}
-
-unsigned short CSSValueList::cssValueType() const
-{
-    return CSS_VALUE_LIST;
-}
-
-void CSSValueList::append(PassRefPtr<CSSValue> val)
-{
-    m_values.append(val.release());
-}
-
-String CSSValueList::cssText() const
-{
-    String result = "";
-
-    for (DeprecatedPtrListIterator<CSSValue> iterator(m_values); iterator.current(); ++iterator) {
-        if (!result.isEmpty())
-            result += ", ";
-        result += iterator.current()->cssText();
-    }
-    
-    return result;
-}
-
-// -------------------------------------------------------------------------------------
-
-CSSPrimitiveValue::CSSPrimitiveValue()
-{
-    m_type = 0;
-}
-
-CSSPrimitiveValue::CSSPrimitiveValue(int ident)
-{
-    m_value.ident = ident;
-    m_type = CSS_IDENT;
-}
-
-CSSPrimitiveValue::CSSPrimitiveValue(double num, UnitTypes type)
-{
-    m_value.num = num;
-    m_type = type;
-}
-
-CSSPrimitiveValue::CSSPrimitiveValue(const String& str, UnitTypes type)
-{
-    if ((m_value.string = str.impl()))
-        m_value.string->ref();
-    m_type = type;
-}
-
-CSSPrimitiveValue::CSSPrimitiveValue(PassRefPtr<Counter> c)
-{
-    m_value.counter = c.release();
-    m_type = CSS_COUNTER;
-}
-
-CSSPrimitiveValue::CSSPrimitiveValue(PassRefPtr<RectImpl> r)
-{
-    m_value.rect = r.release();
-    m_type = CSS_RECT;
-}
-
-#if __APPLE__
-CSSPrimitiveValue::CSSPrimitiveValue(PassRefPtr<DashboardRegion> r)
-{
-    m_value.region = r.release();
-    m_type = CSS_DASHBOARD_REGION;
-}
-#endif
-
-CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color)
-{
-    m_value.rgbcolor = color;
-    m_type = CSS_RGBCOLOR;
-}
-
-CSSPrimitiveValue::CSSPrimitiveValue(PassRefPtr<Pair> p)
-{
-    m_value.pair = p.release();
-    m_type = CSS_PAIR;
-}
-
-CSSPrimitiveValue::~CSSPrimitiveValue()
-{
-    cleanup();
-}
-
-void CSSPrimitiveValue::cleanup()
-{
-    switch(m_type) {
-    case CSS_STRING:
-    case CSS_URI:
-    case CSS_ATTR:
-        if (m_value.string)
-            m_value.string->deref();
-        break;
-    case CSS_COUNTER:
-        m_value.counter->deref();
-        break;
-    case CSS_RECT:
-        m_value.rect->deref();
-        break;
-    case CSS_PAIR:
-        m_value.pair->deref();
-        break;
-#if __APPLE__
-    case CSS_DASHBOARD_REGION:
-        if (m_value.region)
-            m_value.region->deref();
-        break;
-#endif
-    default:
-        break;
-    }
-
-    m_type = 0;
-}
-
-int CSSPrimitiveValue::computeLengthInt(RenderStyle *style)
-{
-    double result = computeLengthFloat(style);
-    
-    // This conversion is imprecise, often resulting in values of, e.g., 44.99998.  We
-    // need to go ahead and round if we're really close to the next integer value.
-    result += result < 0 ? -0.01 : +0.01;
-    
-    if (result > INT_MAX || result < INT_MIN)
-        return 0;
-    return (int)result;    
-}
-
-int CSSPrimitiveValue::computeLengthInt(RenderStyle *style, double multiplier)
-{
-    double result = multiplier * computeLengthFloat(style);
-    
-    // This conversion is imprecise, often resulting in values of, e.g., 44.99998.  We
-    // need to go ahead and round if we're really close to the next integer value.
-    result += result < 0 ? -0.01 : +0.01;
-    
-    if (result > INT_MAX || result < INT_MIN)
-        return 0;
-    return (int)result;  
-}
-
-const int intMaxForLength = 0x7ffffff; // max value for a 28-bit int
-const int intMinForLength = (-0x7ffffff-1); // min value for a 28-bit int
-
-// Lengths expect an int that is only 28-bits, so we have to check for a different overflow.
-int CSSPrimitiveValue::computeLengthIntForLength(RenderStyle *style)
-{
-    double result = computeLengthFloat(style);
-    
-    // This conversion is imprecise, often resulting in values of, e.g., 44.99998.  We
-    // need to go ahead and round if we're really close to the next integer value.
-    result += result < 0 ? -0.01 : +0.01;
-    
-    if (result > intMaxForLength || result < intMinForLength)
-        return 0;
-    return (int)result;    
-}
-
-// Lengths expect an int that is only 28-bits, so we have to check for a different overflow.
-int CSSPrimitiveValue::computeLengthIntForLength(RenderStyle *style, double multiplier)
-{
-    double result = multiplier * computeLengthFloat(style);
-    
-    // This conversion is imprecise, often resulting in values of, e.g., 44.99998.  We
-    // need to go ahead and round if we're really close to the next integer value.
-    result += result < 0 ? -0.01 : +0.01;
-    
-    if (result > intMaxForLength || result < intMinForLength)
-        return 0;
-    return (int)result;  
-}
-
-short CSSPrimitiveValue::computeLengthShort(RenderStyle *style)
-{
-    double result = computeLengthFloat(style);
-    
-    // This conversion is imprecise, often resulting in values of, e.g., 44.99998.  We
-    // need to go ahead and round if we're really close to the next integer value.
-    result += result < 0 ? -0.01 : +0.01;
-    
-    if (result > SHRT_MAX || result < SHRT_MIN)
-        return 0;
-    return (short)result;    
-}
-
-short CSSPrimitiveValue::computeLengthShort(RenderStyle *style, double multiplier)
-{
-    double result = multiplier * computeLengthFloat(style);
-    
-    // This conversion is imprecise, often resulting in values of, e.g., 44.99998.  We
-    // need to go ahead and round if we're really close to the next integer value.
-    result += result < 0 ? -0.01 : +0.01;
-    
-    if (result > SHRT_MAX || result < SHRT_MIN)
-        return 0;
-    return (short)result;  
-}
-
-double CSSPrimitiveValue::computeLengthFloat(RenderStyle *style, bool applyZoomFactor)
-{
-    unsigned short type = primitiveType();
-
-    // We always assume 96 CSS pixels in a CSS inch. This is the cold hard truth of the Web.
-    // At high DPI, we may scale a CSS pixel, but the ratio of the CSS pixel to the so-called
-    // "absolute" CSS length units like inch and pt is always fixed and never changes.
-    double cssPixelsPerInch = 96.;
-
-    double factor = 1.;
-    switch(type) {
-    case CSS_EMS:
-        factor = applyZoomFactor ?
-          style->fontDescription().computedSize() :
-          style->fontDescription().specifiedSize();
-        break;
-    case CSS_EXS: {
-        // FIXME: We have a bug right now where the zoom will be applied multiple times to EX units.
-        // We really need to compute EX using fontMetrics for the original specifiedSize and not use
-        // our actual constructed rendering font.
-        factor = style->font().xHeight();
-        break;
-    }
-    case CSS_PX:
-        break;
-    case CSS_CM:
-        factor = cssPixelsPerInch/2.54; // (2.54 cm/in)
-        break;
-    case CSS_MM:
-        factor = cssPixelsPerInch/25.4;
-        break;
-    case CSS_IN:
-        factor = cssPixelsPerInch;
-        break;
-    case CSS_PT:
-        factor = cssPixelsPerInch/72.;
-        break;
-    case CSS_PC:
-        // 1 pc == 12 pt
-        factor = cssPixelsPerInch*12./72.;
-        break;
-    default:
-        return -1;
-    }
-
-    return getFloatValue() * factor;
-}
-
-void CSSPrimitiveValue::setFloatValue( unsigned short unitType, double floatValue, ExceptionCode& ec)
-{
-    ec = 0;
-    cleanup();
-    // ### check if property supports this type
-    if (m_type > CSS_DIMENSION) {
-        ec = SYNTAX_ERR;
-        return;
-    }
-    //if(m_type > CSS_DIMENSION) throw DOMException(INVALID_ACCESS_ERR);
-    m_value.num = floatValue;
-    m_type = unitType;
-}
-
-double scaleFactorForConversion(unsigned short unitType)
-{
-    double cssPixelsPerInch = 96.0;
-    double factor = 1.0;
-    
-    switch(unitType) {
-        case CSSPrimitiveValue::CSS_PX:
-            break;
-        case CSSPrimitiveValue::CSS_CM:
-            factor = cssPixelsPerInch / 2.54; // (2.54 cm/in)
-            break;
-        case CSSPrimitiveValue::CSS_MM:
-            factor = cssPixelsPerInch / 25.4;
-            break;
-        case CSSPrimitiveValue::CSS_IN:
-            factor = cssPixelsPerInch;
-            break;
-        case CSSPrimitiveValue::CSS_PT:
-            factor = cssPixelsPerInch / 72.0;
-            break;
-        case CSSPrimitiveValue::CSS_PC:
-            factor = cssPixelsPerInch * 12.0 / 72.0; // 1 pc == 12 pt
-            break;
-        default:
-            break;
-    }
-    
-    return factor;
-}
-
-double CSSPrimitiveValue::getFloatValue(unsigned short unitType)
-{
-    if (unitType == m_type || unitType < CSS_PX || unitType > CSS_PC)
-        return m_value.num;
-    
-    double convertedValue = m_value.num;
-    
-    // First convert the value from m_type into CSSPixels
-    double factor = scaleFactorForConversion(m_type);
-    convertedValue *= factor;
-    
-    // Now convert from CSSPixels to the specified unitType
-    factor = scaleFactorForConversion(unitType);
-    convertedValue /= factor;
-    
-    return convertedValue;
-}
-
-void CSSPrimitiveValue::setStringValue( unsigned short stringType, const String &stringValue, ExceptionCode& ec)
-{
-    ec = 0;
-    cleanup();
-    //if(m_type < CSS_STRING) throw DOMException(INVALID_ACCESS_ERR);
-    //if(m_type > CSS_ATTR) throw DOMException(INVALID_ACCESS_ERR);
-    if (m_type < CSS_STRING || m_type > CSS_ATTR) {
-        ec = SYNTAX_ERR;
-        return;
-    }
-    if (stringType != CSS_IDENT) {
-        m_value.string = stringValue.impl();
-        m_value.string->ref();
-        m_type = stringType;
-    }
-    // ### parse ident
-}
-
-String CSSPrimitiveValue::getStringValue() const
-{
-    switch (m_type) {
-        case CSS_STRING:
-        case CSS_ATTR:
-        case CSS_URI:
-            return m_value.string;
-        case CSS_IDENT:
-            return getValueName(m_value.ident);
-        default:
-            // FIXME: The CSS 2.1 spec says you should throw an exception here.
-            break;
-    }
-    
-    return String();
-}
-
-unsigned short CSSPrimitiveValue::cssValueType() const
-{
-    return CSS_PRIMITIVE_VALUE;
-}
-
-bool CSSPrimitiveValue::parseString( const String &/*string*/, bool )
-{
-    // ###
-    return false;
-}
-
-int CSSPrimitiveValue::getIdent()
-{
-    if(m_type != CSS_IDENT) return 0;
-    return m_value.ident;
-}
-
-String CSSPrimitiveValue::cssText() const
-{
-    // ### return the original value instead of a generated one (e.g. color
-    // name if it was specified) - check what spec says about this
-    String text;
-    switch ( m_type ) {
-        case CSS_UNKNOWN:
-            // ###
-            break;
-        case CSS_NUMBER:
-            text = String::number(m_value.num);
-            break;
-        case CSS_PERCENTAGE:
-            text = String::number(m_value.num) + "%";
-            break;
-        case CSS_EMS:
-            text = String::number(m_value.num) + "em";
-            break;
-        case CSS_EXS:
-            text = String::number(m_value.num) + "ex";
-            break;
-        case CSS_PX:
-            text = String::number(m_value.num) + "px";
-            break;
-        case CSS_CM:
-            text = String::number(m_value.num) + "cm";
-            break;
-        case CSS_MM:
-            text = String::number(m_value.num) + "mm";
-            break;
-        case CSS_IN:
-            text = String::number(m_value.num) + "in";
-            break;
-        case CSS_PT:
-            text = String::number(m_value.num) + "pt";
-            break;
-        case CSS_PC:
-            text = String::number(m_value.num) + "pc";
-            break;
-        case CSS_DEG:
-            text = String::number(m_value.num) + "deg";
-            break;
-        case CSS_RAD:
-            text = String::number(m_value.num) + "rad";
-            break;
-        case CSS_GRAD:
-            text = String::number(m_value.num) + "grad";
-            break;
-        case CSS_MS:
-            text = String::number(m_value.num) + "ms";
-            break;
-        case CSS_S:
-            text = String::number(m_value.num) + "s";
-            break;
-        case CSS_HZ:
-            text = String::number(m_value.num) + "hz";
-            break;
-        case CSS_KHZ:
-            text = String::number(m_value.num) + "khz";
-            break;
-        case CSS_DIMENSION:
-            // ###
-            break;
-        case CSS_STRING:
-            text = quoteStringIfNeeded(m_value.string);
-            break;
-        case CSS_URI:
-            text = "url(" + String(m_value.string) + ")";
-            break;
-        case CSS_IDENT:
-            text = getValueName(m_value.ident);
-            break;
-        case CSS_ATTR:
-            // ###
-            break;
-        case CSS_COUNTER:
-            // ###
-            break;
-        case CSS_RECT: {
-            RectImpl* rectVal = getRectValue();
-            text = "rect(";
-            text += rectVal->top()->cssText() + " ";
-            text += rectVal->right()->cssText() + " ";
-            text += rectVal->bottom()->cssText() + " ";
-            text += rectVal->left()->cssText() + ")";
-            break;
-        }
-        case CSS_RGBCOLOR: {
-            Color color(m_value.rgbcolor);
-            if (color.alpha() < 0xFF)
-                text = "rgba(";
-            else
-                text = "rgb(";
-            text += String::number(color.red()) + ", ";
-            text += String::number(color.green()) + ", ";
-            text += String::number(color.blue());
-            if (color.alpha() < 0xFF)
-                text += ", " + String::number((float)color.alpha() / 0xFF);
-            text += ")";
-            break;
-        }
-        case CSS_PAIR:
-            text = m_value.pair->first()->cssText();
-            text += " ";
-            text += m_value.pair->second()->cssText();
-            break;
-#if __APPLE__
-        case CSS_DASHBOARD_REGION:
-            for (DashboardRegion* region = getDashboardRegionValue(); region; region = region->m_next.get()) {
-                text = "dashboard-region(";
-                text += region->m_label;
-                if (region->m_isCircle)
-                    text += " circle ";
-                else if (region->m_isRectangle)
-                    text += " rectangle ";
-                else
-                    break;
-                text += region->top()->cssText() + " ";
-                text += region->right()->cssText() + " ";
-                text += region->bottom()->cssText() + " ";
-                text += region->left()->cssText();
-                text += ")";
-            }
-            break;
-#endif
-    }
-    return text;
-}
-
-// -----------------------------------------------------------------
-
-RectImpl::~RectImpl()
-{
-}
-
-// -----------------------------------------------------------------
-
-Pair::~Pair()
-{
-}
-
-// -----------------------------------------------------------------
-
-CSSImageValue::CSSImageValue(const String& url, StyleBase *style)
-    : CSSPrimitiveValue(url, CSS_URI), m_image(0), m_accessedImage(false)
-{
-}
-
-CSSImageValue::CSSImageValue()
-    : CSSPrimitiveValue(CSS_VAL_NONE), m_image(0), m_accessedImage(true)
-{
-}
-
-CSSImageValue::~CSSImageValue()
-{
-    if (m_image)
-        m_image->deref(this);
-}
-
-CachedImage* CSSImageValue::image(DocLoader* loader)
-{
-    if (!m_accessedImage) {
-        m_accessedImage = true;
-
-        if (loader)
-            m_image = loader->requestImage(getStringValue());
-        else
-            m_image = Cache::requestImage(0, getStringValue());
-        
-        if (m_image)
-            m_image->ref(this);
-    }
-    
-    return m_image;
-}
-
-// ------------------------------------------------------------------------
-
-CSSBorderImageValue::CSSBorderImageValue(PassRefPtr<CSSImageValue> image,
-    PassRefPtr<RectImpl> imageRect, int horizontalRule, int verticalRule)
-    : m_image(image), m_imageSliceRect(imageRect)
-    , m_horizontalSizeRule(horizontalRule), m_verticalSizeRule(verticalRule)
-{
-}
-
-String CSSBorderImageValue::cssText() const
-{
-    // Image first.
-    String text(m_image->cssText());
-    text += " ";
-    
-    // Now the rect, but it isn't really a rect, so we dump manually
-    text += m_imageSliceRect->top()->cssText();
-    text += " ";
-    text += m_imageSliceRect->right()->cssText();
-    text += " ";
-    text += m_imageSliceRect->bottom()->cssText();
-    text += " ";
-    text += m_imageSliceRect->left()->cssText();
-    
-    // Now the keywords.
-    text += " ";
-    text += CSSPrimitiveValue(m_horizontalSizeRule).cssText();
-    text += " ";
-    text += CSSPrimitiveValue(m_verticalSizeRule).cssText();
-
-    return text;
-}
-
-// ------------------------------------------------------------------------
-
-FontFamilyValue::FontFamilyValue(const DeprecatedString& string)
-    : CSSPrimitiveValue(String(), CSS_STRING)
-{
-    static const RegularExpression parenReg(" \\(.*\\)$");
-    static const RegularExpression braceReg(" \\[.*\\]$");
-
-    parsedFontName = string;
-    // a language tag is often added in braces at the end. Remove it.
-    parsedFontName.replace(parenReg, "");
-    // remove [Xft] qualifiers
-    parsedFontName.replace(braceReg, "");
-}
-
-String FontFamilyValue::cssText() const
-{
-    return quoteStringIfNeeded(parsedFontName);
-}
-
-String FontValue::cssText() const
-{
-    // font variant weight size / line-height family 
-
-    String result("");
-
-    if (style) {
-        result += style->cssText();
-    }
-    if (variant) {
-        if (!result.isEmpty())
-            result += " ";
-        result += variant->cssText();
-    }
-    if (weight) {
-        if (!result.isEmpty())
-            result += " ";
-        result += weight->cssText();
-    }
-    if (size) {
-        if (!result.isEmpty())
-            result += " ";
-        result += size->cssText();
-    }
-    if (lineHeight) {
-        if (!size)
-            result += " ";
-        result += "/";
-        result += lineHeight->cssText();
-    }
-    if (family) {
-        if (!result.isEmpty())
-            result += " ";
-        result += family->cssText();
-    }
-
-    return result;
-}
-    
-
-// Used for text-shadow and box-shadow
-ShadowValue::ShadowValue(PassRefPtr<CSSPrimitiveValue> _x,
-    PassRefPtr<CSSPrimitiveValue> _y,
-    PassRefPtr<CSSPrimitiveValue> _blur,
-    PassRefPtr<CSSPrimitiveValue> _color)
-    : x(_x), y(_y), blur(_blur), color(_color)
-{
-}
-
-String ShadowValue::cssText() const
-{
-    String text("");
-
-    if (color)
-        text += color->cssText();
-    if (x) {
-        if (!text.isEmpty())
-            text += " ";
-        text += x->cssText();
-    }
-    if (y) {
-        if (!text.isEmpty())
-            text += " ";
-        text += y->cssText();
-    }
-    if (blur) {
-        if (!text.isEmpty())
-            text += " ";
-        text += blur->cssText();
-    }
-
-    return text;
-}
-
-String CSSProperty::cssText() const
-{
-    return getPropertyName(id()) + ": " + m_value->cssText()
-        + (isImportant() ? " !important" : "") + "; ";
-}
-
-bool operator==(const CSSProperty &a, const CSSProperty &b)
-{
-    return a.m_id == b.m_id && a.m_important == b.m_important && a.m_value == b.m_value;
-}
-
-}
diff --git a/WebCore/css/css_valueimpl.h b/WebCore/css/css_valueimpl.h
deleted file mode 100644 (file)
index 7020f1b..0000000
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * This file is part of the DOM implementation for KDE.
- *
- * (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef CSS_css_valueimpl_h_
-#define CSS_css_valueimpl_h_
-
-#include "CachedObjectClient.h"
-#include "css_base.h"
-#include "DeprecatedPtrList.h"
-#include "DeprecatedString.h"
-#include "DeprecatedValueList.h"
-#include <wtf/PassRefPtr.h>
-
-class QPaintDeviceMetrics;
-
-namespace WebCore {
-
-class CSSMutableStyleDeclaration;
-class CachedImage;
-class Counter;
-class DocLoader;
-class Node;
-class Pair;
-class RectImpl;
-class RenderStyle;
-
-#if __APPLE__
-class DashboardRegion;
-#endif
-
-typedef int ExceptionCode;
-
-extern const int inheritableProperties[];
-extern const unsigned numInheritableProperties;
-
-class CSSStyleDeclaration : public StyleBase {
-public:
-    virtual bool isStyleDeclaration();
-
-    static bool isPropertyName(const String& propertyName);
-
-    CSSRule* parentRule() const;
-
-    virtual String cssText() const = 0;
-    virtual void setCssText(const String&, ExceptionCode&) = 0;
-
-    virtual unsigned length() const = 0;
-    virtual String item(unsigned index) const = 0;
-
-    PassRefPtr<CSSValue> getPropertyCSSValue(const String& propertyName);
-    String getPropertyValue(const String& propertyName);
-    String getPropertyPriority(const String& propertyName);
-    String getPropertyShorthand(const String& propertyName);
-    bool isPropertyImplicit(const String& propertyName);
-    
-    virtual PassRefPtr<CSSValue> getPropertyCSSValue(int propertyID) const = 0;
-    virtual String getPropertyValue(int propertyID) const = 0;
-    virtual bool getPropertyPriority(int propertyID) const = 0;
-    virtual int getPropertyShorthand(int propertyID) const = 0;
-    virtual bool isPropertyImplicit(int propertyID) const = 0;
-
-    void setProperty(const String& propertyName, const String& value, const String& priority, ExceptionCode&);
-    String removeProperty(const String& propertyName, ExceptionCode&);
-    virtual void setProperty(int propertyId, const String& value, bool important, ExceptionCode&) = 0;
-    virtual String removeProperty(int propertyID, ExceptionCode&) = 0;
-
-    virtual PassRefPtr<CSSMutableStyleDeclaration> copy() const = 0;
-    virtual PassRefPtr<CSSMutableStyleDeclaration> makeMutable() = 0;
-    void diff(CSSMutableStyleDeclaration*) const;
-
-    PassRefPtr<CSSMutableStyleDeclaration> copyPropertiesInSet(const int* set, unsigned length) const;
-
-protected:
-    CSSStyleDeclaration(CSSRule* parentRule = 0);
-
-private:
-    CSSStyleDeclaration(const CSSStyleDeclaration &);
-    CSSStyleDeclaration& operator=(const CSSStyleDeclaration &);
-};
-
-class CSSValue : public StyleBase
-{
-public:
-    enum UnitTypes {
-        CSS_INHERIT = 0,
-        CSS_PRIMITIVE_VALUE = 1,
-        CSS_VALUE_LIST = 2,
-        CSS_CUSTOM = 3,
-        CSS_INITIAL = 4
-    };
-
-    CSSValue() : StyleBase(0) { }
-
-    virtual unsigned short cssValueType() const { return CSS_CUSTOM; }
-    virtual String cssText() const = 0;
-    void setCssText(const String&) { } // FIXME: Not implemented.
-
-    virtual bool isValue() { return true; }
-    virtual bool isFontValue() { return false; }
-};
-
-class CSSInheritedValue : public CSSValue
-{
-public:
-    virtual unsigned short cssValueType() const;
-    virtual String cssText() const;
-};
-
-class CSSInitialValue : public CSSValue
-{
-public:
-    virtual unsigned short cssValueType() const;
-    virtual String cssText() const;
-};
-
-class CSSValueList : public CSSValue
-{
-public:
-    virtual ~CSSValueList();
-
-    unsigned length() const { return m_values.count(); }
-    CSSValue* item (unsigned index) { return m_values.at(index); }
-
-    virtual bool isValueList() { return true; }
-
-    virtual unsigned short cssValueType() const;
-
-    void append(PassRefPtr<CSSValue>);
-    virtual String cssText() const;
-
-protected:
-    DeprecatedPtrList<CSSValue> m_values;
-};
-
-
-class CSSPrimitiveValue : public CSSValue
-{
-public:
-    enum UnitTypes {
-        CSS_UNKNOWN = 0,
-        CSS_NUMBER = 1,
-        CSS_PERCENTAGE = 2,
-        CSS_EMS = 3,
-        CSS_EXS = 4,
-        CSS_PX = 5,
-        CSS_CM = 6,
-        CSS_MM = 7,
-        CSS_IN = 8,
-        CSS_PT = 9,
-        CSS_PC = 10,
-        CSS_DEG = 11,
-        CSS_RAD = 12,
-        CSS_GRAD = 13,
-        CSS_MS = 14,
-        CSS_S = 15,
-        CSS_HZ = 16,
-        CSS_KHZ = 17,
-        CSS_DIMENSION = 18,
-        CSS_STRING = 19,
-        CSS_URI = 20,
-        CSS_IDENT = 21,
-        CSS_ATTR = 22,
-        CSS_COUNTER = 23,
-        CSS_RECT = 24,
-        CSS_RGBCOLOR = 25,
-        CSS_PAIR = 100, // We envision this being exposed as a means of getting computed style values for pairs (border-spacing/radius, background-position, etc.)
-        CSS_DASHBOARD_REGION = 101 // FIXME: What on earth is this doing as a primitive value? It should not be!
-    };
-
-    // FIXME: int vs. unsigned overloading is too tricky for color vs. ident
-    CSSPrimitiveValue();
-    CSSPrimitiveValue(int ident);
-    CSSPrimitiveValue(double, UnitTypes);
-    CSSPrimitiveValue(const String&, UnitTypes);
-    CSSPrimitiveValue(PassRefPtr<Counter>);
-    CSSPrimitiveValue(PassRefPtr<RectImpl>);
-    CSSPrimitiveValue(unsigned color); // RGB value
-    CSSPrimitiveValue(PassRefPtr<Pair>);
-
-#if __APPLE__
-    CSSPrimitiveValue(PassRefPtr<DashboardRegion>); // FIXME: Why is dashboard region a primitive value? This makes no sense.
-#endif
-
-    virtual ~CSSPrimitiveValue();
-
-    void cleanup();
-
-    unsigned short primitiveType() const { return m_type; }
-
-    /*
-     * computes a length in pixels out of the given CSSValue. Need the RenderStyle to get
-     * the fontinfo in case val is defined in em or ex.
-     *
-     * The metrics have to be a bit different for screen and printer output.
-     * For screen output we assume 1 inch == 72 px, for printer we assume 300 dpi
-     *
-     * this is screen/printer dependent, so we probably need a config option for this,
-     * and some tool to calibrate.
-     */
-    int computeLengthInt(RenderStyle*);
-    int computeLengthInt(RenderStyle*, double multiplier);
-    int computeLengthIntForLength(RenderStyle*);
-    int computeLengthIntForLength(RenderStyle*, double multiplier);
-    short computeLengthShort(RenderStyle*);
-    short computeLengthShort(RenderStyle*, double multiplier);
-    double computeLengthFloat(RenderStyle*, bool applyZoomFactor = true);
-
-    // use with care!!!
-    void setPrimitiveType(unsigned short type) { m_type = type; }
-    void setFloatValue(unsigned short unitType, double floatValue, ExceptionCode&);
-    double getFloatValue(unsigned short unitType);
-    double getFloatValue() { return m_value.num; }
-
-    void setStringValue(unsigned short stringType, const String& stringValue, ExceptionCode&);
-    String getStringValue() const;
-    
-    Counter* getCounterValue () const {
-        return m_type != CSS_COUNTER ? 0 : m_value.counter;
-    }
-
-    RectImpl* getRectValue () const {
-        return m_type != CSS_RECT ? 0 : m_value.rect;
-    }
-
-    unsigned getRGBColorValue() const {
-        return m_type != CSS_RGBCOLOR ? 0 : m_value.rgbcolor;
-    }
-
-    Pair* getPairValue() const {
-        return m_type != CSS_PAIR ? 0 : m_value.pair;
-    }
-
-#if __APPLE__
-    DashboardRegion *getDashboardRegionValue () const {
-        return m_type != CSS_DASHBOARD_REGION ? 0 : m_value.region;
-    }
-#endif
-
-    virtual bool isPrimitiveValue() const { return true; }
-    virtual unsigned short cssValueType() const;
-
-    int getIdent();
-
-    virtual bool parseString(const String&, bool = false);
-    virtual String cssText() const;
-
-    virtual bool isQuirkValue() { return false; }
-
-protected:
-    int m_type;
-    union {
-        int ident;
-        double num;
-        StringImpl* string;
-        Counter* counter;
-        RectImpl* rect;
-        unsigned rgbcolor;
-        Pair* pair;
-#if __APPLE__
-        DashboardRegion* region;
-#endif
-    } m_value;
-};
-
-// This value is used to handle quirky margins in reflow roots (body, td, and th) like WinIE.
-// The basic idea is that a stylesheet can use the value __qem (for quirky em) instead of em
-// in a stylesheet.  When the quirky value is used, if you're in quirks mode, the margin will
-// collapse away inside a table cell.
-class CSSQuirkPrimitiveValue : public CSSPrimitiveValue
-{
-public:
-    CSSQuirkPrimitiveValue(double num, UnitTypes type)
-        : CSSPrimitiveValue(num, type) {}
-
-    virtual bool isQuirkValue() { return true; }
-};
-
-class Counter : public Shared<Counter> {
-public:
-    String identifier() const { return m_identifier; }
-    String listStyle() const { return m_listStyle; }
-    String separator() const { return m_separator; }
-
-    String m_identifier;
-    String m_listStyle;
-    String m_separator;
-};
-
-class RectImpl : public Shared<RectImpl> {
-public:
-    virtual ~RectImpl();
-
-    CSSPrimitiveValue* top() const { return m_top.get(); }
-    CSSPrimitiveValue* right() const { return m_right.get(); }
-    CSSPrimitiveValue* bottom() const { return m_bottom.get(); }
-    CSSPrimitiveValue* left() const { return m_left.get(); }
-
-    void setTop(PassRefPtr<CSSPrimitiveValue> top) { m_top = top; }
-    void setRight(PassRefPtr<CSSPrimitiveValue> right) { m_right = right; }
-    void setBottom(PassRefPtr<CSSPrimitiveValue> bottom) { m_bottom = bottom; }
-    void setLeft(PassRefPtr<CSSPrimitiveValue> left) { m_left = left; }
-
-protected:
-    RefPtr<CSSPrimitiveValue> m_top;
-    RefPtr<CSSPrimitiveValue> m_right;
-    RefPtr<CSSPrimitiveValue> m_bottom;
-    RefPtr<CSSPrimitiveValue> m_left;
-};
-
-// A primitive value representing a pair.  This is useful for properties like border-radius, background-size/position,
-// and border-spacing (all of which are space-separated sets of two values).  At the moment we are only using it for
-// border-radius and background-size, but (FIXME) border-spacing and background-position could be converted over to use
-// it (eliminating some extra -webkit- internal properties).
-class Pair : public Shared<Pair> {
-public:
-    Pair() : m_first(0), m_second(0) { }
-    Pair(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second)
-        : m_first(first), m_second(second) { }
-    virtual ~Pair();
-
-    CSSPrimitiveValue* first() const { return m_first.get(); }
-    CSSPrimitiveValue* second() const { return m_second.get(); }
-
-    void setFirst(PassRefPtr<CSSPrimitiveValue> first) { m_first = first; }
-    void setSecond(PassRefPtr<CSSPrimitiveValue> second) { m_second = second; }
-
-protected:
-    RefPtr<CSSPrimitiveValue> m_first;
-    RefPtr<CSSPrimitiveValue> m_second;
-};
-
-class DashboardRegion : public RectImpl {
-public:
-    DashboardRegion() : m_isCircle(0), m_isRectangle(0) { }
-
-    RefPtr<DashboardRegion> m_next;
-    String m_label;
-    String m_geometryType;
-    bool m_isCircle : 1;
-    bool m_isRectangle : 1;
-};
-
-class CSSImageValue : public CSSPrimitiveValue, public CachedObjectClient
-{
-public:
-    CSSImageValue();
-    CSSImageValue(const String& url, StyleBase*);
-    virtual ~CSSImageValue();
-
-    CachedImage* image(DocLoader*);
-
-protected:
-    CachedImage* m_image;
-    bool m_accessedImage;
-};
-
-class CSSBorderImageValue : public CSSValue
-{
-public:
-    CSSBorderImageValue();
-    CSSBorderImageValue(PassRefPtr<CSSImageValue>,
-        PassRefPtr<RectImpl>, int horizontalRule, int verticalRule);
-
-    virtual String cssText() const;
-
-public:
-    // The border image.
-    RefPtr<CSSImageValue> m_image;
-
-    // These four values are used to make "cuts" in the image.  They can be numbers
-    // or percentages.
-    RefPtr<RectImpl> m_imageSliceRect;
-    
-    // Values for how to handle the scaling/stretching/tiling of the image slices.
-    int m_horizontalSizeRule; // Rule for how to adjust the widths of the top/middle/bottom
-    int m_verticalSizeRule; // Rule for how to adjust the heights of the left/middle/right
-};
-
-class FontFamilyValue : public CSSPrimitiveValue
-{
-public:
-    FontFamilyValue( const DeprecatedString &string);
-    const DeprecatedString& fontName() const { return parsedFontName; }
-    int genericFamilyType() const { return _genericFamilyType; }
-
-    virtual String cssText() const;
-
-    DeprecatedString parsedFontName;
-private:
-    int _genericFamilyType;
-};
-
-class FontValue : public CSSValue
-{
-public:
-    virtual String cssText() const;
-    
-    virtual bool isFontValue() { return true; }
-
-    RefPtr<CSSPrimitiveValue> style;
-    RefPtr<CSSPrimitiveValue> variant;
-    RefPtr<CSSPrimitiveValue> weight;
-    RefPtr<CSSPrimitiveValue> size;
-    RefPtr<CSSPrimitiveValue> lineHeight;
-    RefPtr<CSSValueList> family;
-};
-
-// Used for text-shadow and box-shadow
-class ShadowValue : public CSSValue
-{
-public:
-    ShadowValue(PassRefPtr<CSSPrimitiveValue> x,
-        PassRefPtr<CSSPrimitiveValue> y,
-        PassRefPtr<CSSPrimitiveValue> blur,
-        PassRefPtr<CSSPrimitiveValue> color);
-    
-    virtual String cssText() const;
-
-    RefPtr<CSSPrimitiveValue> x;
-    RefPtr<CSSPrimitiveValue> y;
-    RefPtr<CSSPrimitiveValue> blur;
-    RefPtr<CSSPrimitiveValue> color;
-};
-
-// ------------------------------------------------------------------------------
-
-// another helper class
-class CSSProperty
-{
-public:
-    CSSProperty(int propID, PassRefPtr<CSSValue> value, bool important = false, int shorthandID = 0, bool implicit = false)
-        : m_id(propID), m_shorthandID(shorthandID), m_important(important), m_implicit(implicit), m_value(value)
-    {
-    }
-    
-    CSSProperty &operator=(const CSSProperty& o)
-    {
-        m_id = o.m_id;
-        m_shorthandID = o.m_shorthandID;
-        m_important = o.m_important;
-        m_value = o.m_value;
-        return *this;
-    }
-    
-    int id() const { return m_id; }
-    int shorthandID() const { return m_shorthandID; }
-    
-    bool isImportant() const { return m_important; }
-    bool isImplicit() const { return m_implicit; }
-
-    CSSValue* value() const { return m_value.get(); }
-    
-    String cssText() const;
-
-    // make sure the following fits in 4 bytes.
-    int m_id;
-    int m_shorthandID;  // If this property was set as part of a shorthand, gives the shorthand.
-    bool m_important : 1;
-    bool m_implicit : 1; // Whether or not the property was set implicitly as the result of a shorthand.
-
-    friend bool operator==(const CSSProperty &, const CSSProperty &);
-
-    RefPtr<CSSValue> m_value;
-};
-
-class CSSMutableStyleDeclaration : public CSSStyleDeclaration
-{
-public:
-    CSSMutableStyleDeclaration();
-    CSSMutableStyleDeclaration(CSSRule* parentRule);
-    CSSMutableStyleDeclaration(CSSRule* parentRule, const DeprecatedValueList<CSSProperty> &);
-    CSSMutableStyleDeclaration(CSSRule* parentRule, const CSSProperty * const *, int numProperties);
-
-    CSSMutableStyleDeclaration &operator=(const CSSMutableStyleDeclaration &);
-
-    void setNode(Node* node) { m_node = node; }
-
-    virtual String cssText() const;
-    virtual void setCssText(const String&, ExceptionCode&);
-
-    virtual unsigned length() const;
-    virtual String item(unsigned index) const;
-
-    virtual PassRefPtr<CSSValue> getPropertyCSSValue(int propertyID) const;
-    virtual String getPropertyValue(int propertyID) const;
-    virtual bool getPropertyPriority(int propertyID) const;
-    virtual int getPropertyShorthand(int propertyID) const;
-    virtual bool isPropertyImplicit(int propertyID) const;
-
-    virtual void setProperty(int propertyId, const String& value, bool important, ExceptionCode&);
-    virtual String removeProperty(int propertyID, ExceptionCode&);
-
-    virtual PassRefPtr<CSSMutableStyleDeclaration> copy() const;
-    virtual PassRefPtr<CSSMutableStyleDeclaration> makeMutable();
-
-    DeprecatedValueListConstIterator<CSSProperty> valuesIterator() const { return m_values.begin(); }
-
-    bool setProperty(int propertyID, int value, bool important = false, bool notifyChanged = true);
-    bool setProperty(int propertyID, const String& value, bool important, bool notifyChanged, ExceptionCode&);
-    bool setProperty(int propertyId, const String& value, bool important = false, bool notifyChanged = true)
-        { ExceptionCode ec; return setProperty(propertyId, value, important, notifyChanged, ec); }
-
-    String removeProperty(int propertyID, bool notifyChanged, ExceptionCode&);
-    String removeProperty(int propertyID, bool notifyChanged = true)
-        { ExceptionCode ec; return removeProperty(propertyID, notifyChanged, ec); }
-
-    void clear();
-
-    void setChanged();
-    // setLengthProperty treats integers as pixels! (Needed for conversion of HTML attributes.)
-    void setLengthProperty(int propertyId, const String& value, bool important, bool multiLength = false);
-    void setStringProperty(int propertyId, const String& value, CSSPrimitiveValue::UnitTypes, bool important = false); // parsed string value
-    void setImageProperty(int propertyId, const String& URL, bool important = false);
-    // The following parses an entire new style declaration.
-    void parseDeclaration(const String& styleDeclaration);
-
-    // Besides adding the properties, this also removes any existing properties with these IDs.
-    // It does no notification since it's called by the parser.
-    void addParsedProperties(const CSSProperty * const *, int numProperties);
-    PassRefPtr<CSSMutableStyleDeclaration> copyBlockProperties() const;
-    void removeBlockProperties();
-    void removeInheritableProperties();
-    void removePropertiesInSet(const int* set, unsigned length);
-
-    void merge(CSSMutableStyleDeclaration*, bool argOverridesOnConflict = true);
-private:
-    String getShortHandValue(const int* properties, int number) const;
-    String get4Values(const int* properties) const;
-    DeprecatedValueList<CSSProperty> m_values;
-    Node* m_node;
-};
-
-} // namespace
-
-#endif
index e9380b898c1c9d024754cf039fd1575aadafeac4..7629fc9e39e76a26e6d100a5ec256ced47238681 100644 (file)
 #include "config.h"
 #include "cssparser.h"
 
-#include "Document.h"
-#include "css_ruleimpl.h"
-#include "csshelper.h"
+#include "CSSBorderImageValue.h"
+#include "CSSImageValue.h"
+#include "CSSImportRule.h"
+#include "CSSInheritedValue.h"
+#include "CSSInitialValue.h"
+#include "CSSMediaRule.h"
+#include "CSSMutableStyleDeclaration.h"
+#include "CSSPrimitiveValue.h"
+#include "CSSProperty.h"
 #include "CSSPropertyNames.h"
+#include "CSSRuleList.h"
+#include "CSSStyleRule.h"
 #include "CSSStyleSheet.h"
+#include "CSSQuirkPrimitiveValue.h"
 #include "CSSValueKeywords.h"
+#include "CSSValueList.h"
+#include "DashboardRegion.h"
+#include "Document.h"
+#include "FontFamilyValue.h"
+#include "FontValue.h"
 #include "MediaList.h"
+#include "Pair.h"
+#include "ShadowValue.h"
+#include "csshelper.h"
 
 #define YYDEBUG 0
 
@@ -220,7 +237,7 @@ RGBA32 CSSParser::parseColor(const String &string)
     
         // Now try to create a color from the rgb() or rgba() syntax.
         if (parser.parseColor(dummyStyleDeclaration.get(), string)) {
-            CSSValue *value = parser.parsedProperties[0]->value();
+            CSSValuevalue = parser.parsedProperties[0]->value();
             if (value->cssValueType() == CSSValue::CSS_PRIMITIVE_VALUE) {
                 CSSPrimitiveValue *primitiveValue = static_cast<CSSPrimitiveValue *>(value);
                 color = primitiveValue->getRGBColorValue();
@@ -2064,10 +2081,10 @@ bool CSSParser::parseFont(bool important)
     return false;
 }
 
-CSSValueList *CSSParser::parseFontFamily()
+CSSValueListCSSParser::parseFontFamily()
 {
-    CSSValueList *list = new CSSValueList;
-    Value *value = valueList->current();
+    CSSValueListlist = new CSSValueList;
+    Valuevalue = valueList->current();
     FontFamilyValue* currFamily = 0;
     while (value) {
         Value* nextValue = valueList->next();
index 888d48d80fcd64a8e4e4a5e2a7245ec9b4aa52e1..c0fade000a41e29b23ccbc12841fff9d02ef8350 100644 (file)
 #include "config.h"
 #include "cssstyleselector.h"
 
+#include "CSSBorderImageValue.h"
+#include "CSSImageValue.h"
+#include "CSSImportRule.h"
+#include "CSSMediaRule.h"
+#include "CSSProperty.h"
 #include "CSSPropertyNames.h"
+#include "CSSRuleList.h"
+#include "CSSStyleRule.h"
 #include "CSSStyleSheet.h"
 #include "CSSValueKeywords.h"
+#include "CSSValueList.h"
 #include "CachedImage.h"
+#include "DashboardRegion.h"
+#include "FontFamilyValue.h"
+#include "FontValue.h"
 #include "Frame.h"
 #include "HTMLDocument.h"
 #include "HTMLElement.h"
 #include "History.h"
 #include "KWQKHTMLSettings.h"
 #include "MediaList.h"
+#include "Pair.h"
+#include "RectImpl.h"
 #include "RenderTheme.h"
 #include "StyleSheetList.h"
 #include "UserAgentStyleSheets.h"
 #include "loader.h"
+#include "ShadowValue.h"
 
 using namespace std;
 
@@ -582,7 +596,7 @@ const int siblingThreshold = 10;
 Node* CSSStyleSelector::locateCousinList(Element* parent)
 {
     if (parent && parent->isStyledElement()) {
-        StyledElement* p = static_cast<StyledElement *>(parent);
+        StyledElement* p = static_cast<StyledElement*>(parent);
         if (p->renderer() && !p->inlineStyleDecl() && !p->hasID()) {
             Node* r = p->previousSibling();
             int subcount = 0;
@@ -1111,7 +1125,7 @@ bool CSSStyleSelector::checkSelector(CSSSelector* sel, Element *e)
                 n = n->parentNode();
                 if (!n || !n->isElementNode())
                     return false;
-            } while (!checkOneSelector(sel, static_cast<Element *>(n)));
+            } while (!checkOneSelector(sel, static_cast<Element*>(n)));
             break;
         case CSSSelector::Child:
         {
@@ -1121,7 +1135,7 @@ bool CSSStyleSelector::checkSelector(CSSSelector* sel, Element *e)
                     n = n->parentNode();
             if (!n || !n->isElementNode())
                 return false;
-            if (!checkOneSelector(sel, static_cast<Element *>(n)))
+            if (!checkOneSelector(sel, static_cast<Element*>(n)))
                 return false;
             break;
         }
@@ -1153,7 +1167,7 @@ bool CSSStyleSelector::checkSelector(CSSSelector* sel, Element *e)
                                    (sel->pseudoType() == CSSSelector::PseudoHover ||
                                     sel->pseudoType() == CSSSelector::PseudoActive));
             
-            Element *elem = static_cast<Element *>(n);
+            Element *elem = static_cast<Element*>(n);
             // a selector is invalid if something follows :first-xxx
             if (elem == element && dynamicPseudo != RenderStyle::NOPSEUDO)
                 return false;
@@ -1584,20 +1598,20 @@ void CSSRuleSet::addRulesFromSheet(CSSStyleSheet *sheet, const String &medium)
     int len = sheet->length();
 
     for (int i = 0; i < len; i++) {
-        StyleBase *item = sheet->item(i);
+        StyleBaseitem = sheet->item(i);
         if (item->isStyleRule()) {
             CSSStyleRule* rule = static_cast<CSSStyleRule*>(item);
             for (CSSSelector* s = rule->selector(); s; s = s->next())
                 addRule(rule, s);
         }
         else if(item->isImportRule()) {
-            CSSImportRule *import = static_cast<CSSImportRule *>(item);
+            CSSImportRule* import = static_cast<CSSImportRule*>(item);
             if (!import->media() || import->media()->contains(medium))
                 addRulesFromSheet(import->styleSheet(), medium);
         }
         else if(item->isMediaRule()) {
-            CSSMediaRule *r = static_cast<CSSMediaRule*>(item);
-            CSSRuleList *rules = r->cssRules();
+            CSSMediaRuler = static_cast<CSSMediaRule*>(item);
+            CSSRuleListrules = r->cssRules();
 
             if ((!r->media() || r->media()->contains(medium)) && rules) {
                 // Traverse child elements of the @media rule.
@@ -1681,7 +1695,7 @@ void CSSStyleSelector::applyDeclarations(bool applyFirst, bool isImportant,
 void CSSStyleSelector::applyProperty(int id, CSSValue *value)
 {
     CSSPrimitiveValue *primitiveValue = 0;
-    if(value->isPrimitiveValue()) primitiveValue = static_cast<CSSPrimitiveValue *>(value);
+    if(value->isPrimitiveValue()) primitiveValue = static_cast<CSSPrimitiveValue*>(value);
 
     Length l;
     bool apply = false;
@@ -2243,7 +2257,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
                 style->setCursor((ECursor)(primitiveValue->getIdent() - CSS_VAL_AUTO));
                 style->setCursorImage(0);
             } else if (type == CSSPrimitiveValue::CSS_URI) {
-                CSSImageValue *image = static_cast<CSSImageValue *>(primitiveValue);
+                CSSImageValue* image = static_cast<CSSImageValue*>(primitiveValue);
                 style->setCursor(CURSOR_AUTO);
                 style->setCursorImage(image->image(element->document()->docLoader()));
             }
@@ -2309,9 +2323,9 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
     case CSS_PROP_LIST_STYLE_IMAGE:
     {
         HANDLE_INHERIT_AND_INITIAL(listStyleImage, ListStyleImage)
-        if (!primitiveValue) return;
-        style->setListStyleImage(static_cast<CSSImageValue *>(primitiveValue)
-                                 ->image(element->document()->docLoader()));
+        if (!primitiveValue)
+            return;
+        style->setListStyleImage(static_cast<CSSImageValue*>(primitiveValue)->image(element->document()->docLoader()));
         break;
     }
 
@@ -2895,7 +2909,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
         } else if (!primitiveValue) {
             break;
         } else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RECT) {
-            RectImpl *rect = primitiveValue->getRectValue();
+            RectImplrect = primitiveValue->getRectValue();
             if (!rect)
                 break;
             top = convertToLength(rect->top(), style);
@@ -2930,13 +2944,13 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
         }
         
         if (!value->isValueList()) return;
-        CSSValueList *list = static_cast<CSSValueList *>(value);
+        CSSValueList *list = static_cast<CSSValueList*>(value);
         int len = list->length();
 
         for (int i = 0; i < len; i++) {
             CSSValue *item = list->item(i);
             if (!item->isPrimitiveValue()) continue;
-            CSSPrimitiveValue *val = static_cast<CSSPrimitiveValue *>(item);
+            CSSPrimitiveValue *val = static_cast<CSSPrimitiveValue*>(item);
             if (val->primitiveType()==CSSPrimitiveValue::CSS_STRING)
                 style->setContent(val->getStringValue().impl(), i != 0);
             else if (val->primitiveType()==CSSPrimitiveValue::CSS_ATTR) {
@@ -2945,7 +2959,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
                 style->setContent(element->getAttribute(attr).impl(), i != 0);
             }
             else if (val->primitiveType()==CSSPrimitiveValue::CSS_URI) {
-                CSSImageValue *image = static_cast<CSSImageValue *>(val);
+                CSSImageValue *image = static_cast<CSSImageValue*>(val);
                 style->setContent(image->image(element->document()->docLoader()), i != 0);
             }
         }
@@ -2980,7 +2994,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
         
         if (!value->isValueList()) return;
         FontDescription fontDescription = style->fontDescription();
-        CSSValueList *list = static_cast<CSSValueList *>(value);
+        CSSValueList *list = static_cast<CSSValueList*>(value);
         int len = list->length();
         FontFamily& firstFamily = fontDescription.firstFamily();
         FontFamily *currFamily = 0;
@@ -2988,10 +3002,10 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
         for(int i = 0; i < len; i++) {
             CSSValue *item = list->item(i);
             if(!item->isPrimitiveValue()) continue;
-            CSSPrimitiveValue *val = static_cast<CSSPrimitiveValue *>(item);
+            CSSPrimitiveValue *val = static_cast<CSSPrimitiveValue*>(item);
             AtomicString face;
             if(val->primitiveType() == CSSPrimitiveValue::CSS_STRING)
-                face = static_cast<FontFamilyValue *>(val)->fontName();
+                face = static_cast<FontFamilyValue*>(val)->fontName();
             else if (val->primitiveType() == CSSPrimitiveValue::CSS_IDENT) {
                 switch (val->getIdent()) {
                     case CSS_VAL__WEBKIT_BODY:
@@ -3052,13 +3066,13 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
             // do nothing
         } else {
             if(!value->isValueList()) return;
-            CSSValueList *list = static_cast<CSSValueList *>(value);
+            CSSValueList *list = static_cast<CSSValueList*>(value);
             int len = list->length();
             for(int i = 0; i < len; i++)
             {
                 CSSValue *item = list->item(i);
                 if(!item->isPrimitiveValue()) continue;
-                primitiveValue = static_cast<CSSPrimitiveValue *>(item);
+                primitiveValue = static_cast<CSSPrimitiveValue*>(item);
                 switch(primitiveValue->getIdent())
                 {
                     case CSS_VAL_NONE:
@@ -3213,7 +3227,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
             if (style->setFontDescription(fontDescription))
                 fontDirty = true;
         } else if (value->isFontValue()) {
-            FontValue *font = static_cast<FontValue *>(value);
+            FontValue *font = static_cast<FontValue*>(value);
             if (!font->style || !font->variant || !font->weight ||
                  !font->size || !font->lineHeight || !font->family)
                 return;
@@ -3286,7 +3300,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
         bool firstBinding = true;
         for (unsigned int i = 0; i < list->length(); i++) {
             CSSValue *item = list->item(i);
-            CSSPrimitiveValue *val = static_cast<CSSPrimitiveValue *>(item);
+            CSSPrimitiveValue *val = static_cast<CSSPrimitiveValue*>(item);
             if (val->primitiveType() == CSSPrimitiveValue::CSS_URI) {
                 if (firstBinding) {
                     firstBinding = false;
@@ -3454,10 +3468,10 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
 
         if (!value->isValueList())
             return;
-        CSSValueList *list = static_cast<CSSValueList *>(value);
+        CSSValueList *list = static_cast<CSSValueList*>(value);
         int len = list->length();
         for (int i = 0; i < len; i++) {
-            ShadowValue *item = static_cast<ShadowValue*>(list->item(i));
+            ShadowValueitem = static_cast<ShadowValue*>(list->item(i));
             int x = item->x->computeLengthInt(style);
             int y = item->y->computeLengthInt(style);
             int blur = item->blur ? item->blur->computeLengthInt(style) : 0;
@@ -3930,7 +3944,7 @@ void CSSStyleSelector::mapBackgroundImage(BackgroundLayer* layer, CSSValue* valu
     
     if (!value->isPrimitiveValue()) return;
     CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
-    layer->setBackgroundImage(static_cast<CSSImageValue *>(primitiveValue)->image(element->document()->docLoader()));
+    layer->setBackgroundImage(static_cast<CSSImageValue*>(primitiveValue)->image(element->document()->docLoader()));
 }
 
 void CSSStyleSelector::mapBackgroundRepeat(BackgroundLayer* layer, CSSValue* value)
index 2cc37e30148247a753ce065d96c64f06972fa1c2..bf003465c7152cbebba112d784feb9cbea916b8b 100644 (file)
@@ -24,7 +24,6 @@
 #ifndef CSS_cssstyleselector_h_
 #define CSS_cssstyleselector_h_
 
-#include "css_ruleimpl.h"
 #include "render_style.h"
 
 class KHTMLSettings;
@@ -32,9 +31,11 @@ class KURL;
 
 namespace WebCore {
 
+class CSSMutableStyleDeclaration;
 class CSSProperty;
 class CSSRuleData;
 class CSSRuleDataList;
+class CSSRuleList;
 class CSSRuleSet;
 class CSSSelector;
 class CSSStyleSheet;
index 8b5599c89e917d2e30ffb62232ee320b45ec8401..d53a614a262b2db118ef2e7e3e4c2755dda25e36 100644 (file)
 #ifndef CSSMappedAttributeDeclaration_h
 #define CSSMappedAttributeDeclaration_h
 
-#include "css_valueimpl.h"
+#include "CSSMutableStyleDeclaration.h"
 #include "MappedAttributeEntry.h"
 
 namespace WebCore {
 
 class CSSMappedAttributeDeclaration : public CSSMutableStyleDeclaration {
 public:
-    CSSMappedAttributeDeclaration(CSSRule *parentRule)
-    : CSSMutableStyleDeclaration(parentRule), m_entryType(eNone), m_attrName(anyQName())
-    {}
+    CSSMappedAttributeDeclaration(CSSRule* parentRule)
+        : CSSMutableStyleDeclaration(parentRule)
+        , m_entryType(eNone)
+        , m_attrName(anyQName()) { }
     
     virtual ~CSSMappedAttributeDeclaration();
 
index a619083ce714833d6514ab6d34c1e2b873675650..d774f4fde8299224bd33ff896734ae7c8587ff04 100644 (file)
@@ -67,7 +67,6 @@
 #include "StyleSheetList.h"
 #include "SystemTime.h"
 #include "TextIterator.h"
-#include "css_valueimpl.h"
 #include "csshelper.h"
 #include "cssstyleselector.h"
 #include "dom2_eventsimpl.h"
index bdd492a81607f355a9246895e0905f4e18093bab..1160a3c24a581d19cb6863072da8f46987fc837d 100644 (file)
@@ -27,6 +27,7 @@
 #include "ApplyStyleCommand.h"
 
 #include "CSSComputedStyleDeclaration.h"
+#include "CSSProperty.h"
 #include "CSSPropertyNames.h"
 #include "Document.h"
 #include "HTMLElement.h"
index 12723a14c32fd2a3014f4540397fe9362ae6bad2..87717d0dbe07fd3bc1b8bdbcdfe919c8ec3dd7c1 100644 (file)
@@ -27,7 +27,7 @@
 #define composite_edit_command_h__
 
 #include "EditCommand.h"
-#include "css_valueimpl.h"
+#include "DeprecatedValueList.h"
 
 namespace WebCore {
     class CSSStyleDeclaration;
index 08c55c6f2ad9c957ea8b8f2938df5e64ae6417dc..a33456886725cc5b052cb9d0b6c795e19cd77024 100644 (file)
@@ -31,6 +31,7 @@
 #include "SelectionController.h"
 #include "VisiblePosition.h"
 #include "CSSComputedStyleDeclaration.h"
+#include "CSSMutableStyleDeclaration.h"
 #include "dom2_eventsimpl.h"
 #include "EventNames.h"
 #include "htmlediting.h"
index de3e41f6c255832eea4d1dbb2c5585fe2cfdab34..7b4ca3c41e9874267c3249000a102677329f921a 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "InsertLineBreakCommand.h"
 
-#include "css_valueimpl.h"
+#include "CSSMutableStyleDeclaration.h"
 #include "Document.h"
 #include "Element.h"
 #include "Frame.h"
@@ -158,7 +158,7 @@ void InsertLineBreakCommand::doApply()
     // FIXME: Improve typing style.
     // See this bug: <rdar://problem/3769899> Implementation of typing style needs improvement
     
-    CSSMutableStyleDeclaration *typingStyle = document()->frame()->typingStyle();
+    CSSMutableStyleDeclarationtypingStyle = document()->frame()->typingStyle();
     
     if (typingStyle && typingStyle->length() > 0) {
         Selection selectionBeforeStyle = endingSelection();
index d29754369fa1269ca6980156502e5cc91677d451..10143f458a7b047a6749b0031d680687126b5968 100644 (file)
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef __insert_line_break_command_h__
-#define __insert_line_break_command_h__
+#ifndef InsertLineBreakCommand_H
+#define InsertLineBreakCommand_H
 
 #include "CompositeEditCommand.h"
 
@@ -45,4 +45,4 @@ private:
 
 } // namespace WebCore
 
-#endif // __insert_line_break_command_h__
+#endif // InsertLineBreakCommand_H
index a6a280962908a5367116905b90551212dd4ca0f5..e25904d9520cddd1d2afb9e9fce8939f47a7a650 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "InsertTextCommand.h"
 
+#include "CSSMutableStyleDeclaration.h"
 #include "Document.h"
 #include "Element.h"
 #include "EditingText.h"
@@ -137,7 +138,7 @@ void InsertTextCommand::input(const String &text, bool selectInsertedText)
     // Handle the case where there is a typing style.
     // FIXME: Improve typing style.
     // See this bug: <rdar://problem/3769899> Implementation of typing style needs improvement
-    CSSMutableStyleDeclaration *typingStyle = document()->frame()->typingStyle();
+    CSSMutableStyleDeclarationtypingStyle = document()->frame()->typingStyle();
     if (typingStyle && typingStyle->length() > 0)
         applyStyle(typingStyle);
 
index 8f7539c56e73cc15277723d90cb62b5242dc2cab..b51ebf32ab7b611c0af31849e02827b129f28aeb 100644 (file)
 #include "config.h"
 #include "RemoveCSSPropertyCommand.h"
 
-#include "css_valueimpl.h"
-
+#include "CSSMutableStyleDeclaration.h"
 #include <wtf/Assertions.h>
 
 namespace WebCore {
 
-RemoveCSSPropertyCommand::RemoveCSSPropertyCommand(Document *document, CSSStyleDeclaration *decl, int property)
-    : EditCommand(document), m_decl(decl->makeMutable()), m_property(property), m_important(false)
+RemoveCSSPropertyCommand::RemoveCSSPropertyCommand(Document* document, CSSStyleDeclaration* decl, int property)
+    : EditCommand(document)
+    , m_decl(decl->makeMutable())
+    , m_property(property)
+    , m_important(false)
 {
     ASSERT(m_decl);
 }
 
+RemoveCSSPropertyCommand::~RemoveCSSPropertyCommand()
+{
+}
+
 void RemoveCSSPropertyCommand::doApply()
 {
     ASSERT(m_decl);
index 7fc777f929ef29a86b8aabe4977733e675eee76a..27e6bb259056c473a0dafa9c38aaf51143e73787 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef remove_css_property_command_h__
-#define remove_css_property_command_h__
+#ifndef RemoveCSSPropertyCommand_H
+#define RemoveCSSPropertyCommand_H
 
 #include "EditCommand.h"
 
 namespace WebCore {
-    class CSSStyleDeclaration;
-}
 
-namespace WebCore {
+class CSSStyleDeclaration;
 
 class RemoveCSSPropertyCommand : public EditCommand
 {
 public:
-    RemoveCSSPropertyCommand(WebCore::Document *, WebCore::CSSStyleDeclaration *, int property);
-    virtual ~RemoveCSSPropertyCommand() { }
+    RemoveCSSPropertyCommand(Document*, CSSStyleDeclaration*, int property);
+    virtual ~RemoveCSSPropertyCommand();
 
     virtual void doApply();
     virtual void doUnapply();
 
-    WebCore::CSSMutableStyleDeclaration *styleDeclaration() const { return m_decl.get(); }
+    CSSMutableStyleDeclaration* styleDeclaration() const { return m_decl.get(); }
     int property() const { return m_property; }
     
 private:
-    RefPtr<WebCore::CSSMutableStyleDeclaration> m_decl;
+    RefPtr<CSSMutableStyleDeclaration> m_decl;
     int m_property;
-    WebCore::String m_oldValue;
+    String m_oldValue;
     bool m_important;
 };
 
index c0db4c524fdfaf8f785b939e0a2420f564290807..de8d969d09170554a9dad8b983b4402f046c8241 100644 (file)
@@ -25,7 +25,7 @@
 #include "config.h"
 #include "HTMLBodyElement.h"
 
-#include "css_valueimpl.h" // for CSSMutableStyleDeclaration
+#include "CSSMutableStyleDeclaration.h"
 #include "CSSPropertyNames.h"
 #include "cssstyleselector.h"
 #include "CSSStyleSheet.h"
index 0e33d6d97a3fba4ca6451b47d208ab27838b8c62..c97c0eda8daeb76faf861346a2e16f924ffa6ddd 100644 (file)
@@ -30,7 +30,6 @@
 #include "EventNames.h"
 #include "ExceptionCode.h"
 #include "Frame.h"
-#include "css_ruleimpl.h"
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "dom2_eventsimpl.h"
index 1afaf35d7e2fc83773e57f145e30405c4e740090..48101384355cccbbb6b12cb261ac108fd9600c34 100644 (file)
@@ -25,6 +25,7 @@
 #define HTMLScriptElement_H
 
 #include "HTMLElement.h"
+#include "CachedObjectClient.h"
 
 namespace WebCore {
 
index 70c3e94d731e4b495599965614515dab714531bd..79bdd40b611da4dc281179580fb997c03f65336d 100644 (file)
@@ -31,6 +31,7 @@
 #include "SegmentedString.h"
 #include "Timer.h"
 #include "xml_tokenizer.h"
+#include "CachedObjectClient.h"
 
 namespace WebCore {
 
index 368056970fedb118e75f71e18f798dfd318edd33..ae23b3fd9a253b1a6eb67c93ac67fb136019222c 100644 (file)
@@ -116,7 +116,7 @@ public:
 
 protected:
     FloatRect m_filterRect;
-    Q3ValueList<KCanvasFilterEffect *> m_effects;
+    DeprecatedValueList<KCanvasFilterEffect *> m_effects;
     bool m_filterBBoxMode;
     bool m_effectBBoxMode;
 };
@@ -192,14 +192,14 @@ public:
     KCColorMatrixType type() const { return m_type; }
     void setType(KCColorMatrixType type) { m_type = type; }
 
-    Q3ValueList<float> values() const { return m_values; }
-    void setValues(const Q3ValueList<float> &values) { m_values = values; };
+    DeprecatedValueList<float> values() const { return m_values; }
+    void setValues(const DeprecatedValueList<float> &values) { m_values = values; };
 
     QTextStream &externalRepresentation(QTextStream &) const;
 
 private:
     KCColorMatrixType m_type;
-    Q3ValueList<float> m_values;
+    DeprecatedValueList<float> m_values;
 };
 
 typedef enum {
@@ -298,8 +298,8 @@ public:
     FloatSize kernelSize() const { return m_kernelSize; }
     void setKernelSize(FloatSize kernelSize) { m_kernelSize = kernelSize; }
     
-    Q3ValueList<float> kernel() const { return m_kernelMatrix; }
-    void setKernel(Q3ValueList<float> kernel) { m_kernelMatrix = kernel; }
+    DeprecatedValueList<float> kernel() const { return m_kernelMatrix; }
+    void setKernel(DeprecatedValueList<float> kernel) { m_kernelMatrix = kernel; }
     
     float divisor() const { return m_divisor; }
     void setDivisor(float divisor) { m_divisor = divisor; }
@@ -323,7 +323,7 @@ public:
 
 private:
     FloatSize m_kernelSize;
-    Q3ValueList<float> m_kernelMatrix; // maybe should be a real matrix?
+    DeprecatedValueList<float> m_kernelMatrix; // maybe should be a real matrix?
     float m_divisor;
     float m_bias;
     FloatSize m_targetOffset;
index 963936fcab29d0b9ff1814910a2ea138dc94622c..336f54f85e173c4b5d65f14c8ac93ef0f35ec152 100644 (file)
@@ -78,7 +78,7 @@ struct KCClipData
     RefPtr<KCanvasPath> path;
 };
 
-class KCClipDataList : public Q3ValueList<KCClipData>
+class KCClipDataList : public DeprecatedValueList<KCClipData>
 {
 public:
     KCClipDataList() { }
index 49ac4a1d3bf6b8e4cc691a40e0778f23667ce101..c0abfe6ca29d532ab0676301f7dd600749d3340e 100644 (file)
@@ -63,11 +63,11 @@ QTextStream &operator<<(QTextStream &ts, const WebCore::FloatPoint &);
 QTextStream &operator<<(QTextStream &ts, const DeprecatedStringList &l);
     
 template<typename Item>
-QTextStream &operator<<(QTextStream &ts, const Q3ValueList<Item*> &l)
+QTextStream &operator<<(QTextStream &ts, const DeprecatedValueList<Item*> &l)
 {
     ts << "[";
-    typename Q3ValueList<Item*>::ConstIterator it = l.begin();
-    typename Q3ValueList<Item*>::ConstIterator it_e = l.end();
+    typename DeprecatedValueList<Item*>::ConstIterator it = l.begin();
+&