LayoutTests:
authorweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Jun 2007 01:47:23 +0000 (01:47 +0000)
committerweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Jun 2007 01:47:23 +0000 (01:47 +0000)
        Reviewed by Darin.

        Update test for http://bugs.webkit.org/show_bug.cgi?id=14053
        Autogenerate JS binding for Rect

        * fast/dom/Window/window-properties-expected.txt:

WebCore:

        Reviewed by Darin.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14053
        Autogenerate JS binding for Rect

        - Renames RectImpl to Rect, DOMStyleSheetList to JSStyleSheetList
          and DOMRGBColor to JSRGBColor
        - Moves JSStyleSheetList and JSRGBColor into the WebCore namespace.

        * DerivedSources.make:
        * WebCore.pro:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_css.cpp:
        (WebCore::):
        (WebCore::JSStyleSheetList::JSStyleSheetList):
        (WebCore::JSStyleSheetList::~JSStyleSheetList):
        (WebCore::JSStyleSheetList::getValueProperty):
        (WebCore::JSStyleSheetList::indexGetter):
        (WebCore::JSStyleSheetList::nameGetter):
        (WebCore::JSStyleSheetList::getOwnPropertySlot):
        (WebCore::toJS):
        (WebCore::JSStyleSheetListFunc::callAsFunction):
        (WebCore::JSRGBColor::JSRGBColor):
        (WebCore::JSRGBColor::~JSRGBColor):
        (WebCore::JSRGBColor::getOwnPropertySlot):
        (WebCore::JSRGBColor::getValueProperty):
        (WebCore::getJSRGBColor):
        * bindings/js/kjs_css.h:
        (WebCore::JSStyleSheetList::classInfo):
        (WebCore::JSStyleSheetList::):
        (WebCore::JSStyleSheetList::impl):
        (WebCore::JSRGBColor::classInfo):
        (WebCore::JSRGBColor::):
        (WebCore::JSRGBColor::impl):
        * bindings/objc/DOMUtility.mm:
        (KJS::createDOMWrapper):
        * bindings/scripts/CodeGeneratorJS.pm:
        * bindings/scripts/CodeGeneratorObjC.pm:
        * css/CSSBorderImageValue.cpp:
        (WebCore::CSSBorderImageValue::CSSBorderImageValue):
        * css/CSSBorderImageValue.h:
        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::cssText):
        * css/CSSPrimitiveValue.h:
        (WebCore::CSSPrimitiveValue::getRectValue):
        (WebCore::CSSPrimitiveValue::):
        * css/DashboardRegion.h:
        * css/Rect.h: Copied from css/RectImpl.h.
        (WebCore::Rect::~Rect):
        (WebCore::Rect::top):
        (WebCore::Rect::right):
        (WebCore::Rect::bottom):
        (WebCore::Rect::left):
        (WebCore::Rect::setTop):
        (WebCore::Rect::setRight):
        (WebCore::Rect::setBottom):
        (WebCore::Rect::setLeft):
        * css/Rect.idl:
        * css/RectImpl.h: Removed.
        * css/cssparser.cpp:
        (WebCore::CSSParser::parseShape):
        (WebCore::BorderImageParseContext::commitBorderImage):
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * page/DOMWindow.idl:

WebKit:

        Reviewed by Darin.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14053
        Autogenerate JS binding for Rect

        - Fix conflicts by using ::Rect instead of Rect.

        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
        (-[WebBaseNetscapePluginView sendEvent:]):
        (-[WebBaseNetscapePluginView tellQuickTimeToChill]):
        (-[WebBaseNetscapePluginView invalidateRegion:]):
        (-[WebBaseNetscapePluginView _printedPluginBitmap]):

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

24 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/window-properties-expected.txt
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.pro
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/kjs_css.cpp
WebCore/bindings/js/kjs_css.h
WebCore/bindings/objc/DOMUtility.mm
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/bindings/scripts/CodeGeneratorObjC.pm
WebCore/css/CSSBorderImageValue.cpp
WebCore/css/CSSBorderImageValue.h
WebCore/css/CSSPrimitiveValue.cpp
WebCore/css/CSSPrimitiveValue.h
WebCore/css/DashboardRegion.h
WebCore/css/Rect.h [new file with mode: 0644]
WebCore/css/Rect.idl
WebCore/css/RectImpl.h [deleted file]
WebCore/css/cssparser.cpp
WebCore/css/cssstyleselector.cpp
WebCore/page/DOMWindow.idl
WebKit/ChangeLog
WebKit/Plugins/WebBaseNetscapePluginView.mm

index b7641d3..ce6681e 100644 (file)
@@ -1,3 +1,12 @@
+2007-06-15  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Darin.
+
+        Update test for http://bugs.webkit.org/show_bug.cgi?id=14053
+        Autogenerate JS binding for Rect
+
+        * fast/dom/Window/window-properties-expected.txt:
+
 2007-06-14  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Darin.
index f5013d1..c117c5f 100644 (file)
@@ -818,6 +818,8 @@ window.RangeException.INVALID_NODE_TYPE_ERR [number]
 window.RangeException.prototype [object RangeExceptionPrototype]
 window.RangeException.prototype.BAD_BOUNDARYPOINTS_ERR [number]
 window.RangeException.prototype.INVALID_NODE_TYPE_ERR [number]
+window.Rect [object RectConstructor]
+window.Rect.prototype [object RectPrototype]
 window.ReferenceError [function]
 window.StyleSheet [printed above as window.CSSStyleSheet]
 window.SyntaxError [function]
index de7e12c..a61eba2 100644 (file)
@@ -1,3 +1,72 @@
+2007-06-15  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Darin.
+
+        Patch for http://bugs.webkit.org/show_bug.cgi?id=14053
+        Autogenerate JS binding for Rect
+
+        - Renames RectImpl to Rect, DOMStyleSheetList to JSStyleSheetList 
+          and DOMRGBColor to JSRGBColor
+        - Moves JSStyleSheetList and JSRGBColor into the WebCore namespace.
+
+        * DerivedSources.make:
+        * WebCore.pro:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/kjs_css.cpp:
+        (WebCore::):
+        (WebCore::JSStyleSheetList::JSStyleSheetList):
+        (WebCore::JSStyleSheetList::~JSStyleSheetList):
+        (WebCore::JSStyleSheetList::getValueProperty):
+        (WebCore::JSStyleSheetList::indexGetter):
+        (WebCore::JSStyleSheetList::nameGetter):
+        (WebCore::JSStyleSheetList::getOwnPropertySlot):
+        (WebCore::toJS):
+        (WebCore::JSStyleSheetListFunc::callAsFunction):
+        (WebCore::JSRGBColor::JSRGBColor):
+        (WebCore::JSRGBColor::~JSRGBColor):
+        (WebCore::JSRGBColor::getOwnPropertySlot):
+        (WebCore::JSRGBColor::getValueProperty):
+        (WebCore::getJSRGBColor):
+        * bindings/js/kjs_css.h:
+        (WebCore::JSStyleSheetList::classInfo):
+        (WebCore::JSStyleSheetList::):
+        (WebCore::JSStyleSheetList::impl):
+        (WebCore::JSRGBColor::classInfo):
+        (WebCore::JSRGBColor::):
+        (WebCore::JSRGBColor::impl):
+        * bindings/objc/DOMUtility.mm:
+        (KJS::createDOMWrapper):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        * bindings/scripts/CodeGeneratorObjC.pm:
+        * css/CSSBorderImageValue.cpp:
+        (WebCore::CSSBorderImageValue::CSSBorderImageValue):
+        * css/CSSBorderImageValue.h:
+        * css/CSSPrimitiveValue.cpp:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::cssText):
+        * css/CSSPrimitiveValue.h:
+        (WebCore::CSSPrimitiveValue::getRectValue):
+        (WebCore::CSSPrimitiveValue::):
+        * css/DashboardRegion.h:
+        * css/Rect.h: Copied from css/RectImpl.h.
+        (WebCore::Rect::~Rect):
+        (WebCore::Rect::top):
+        (WebCore::Rect::right):
+        (WebCore::Rect::bottom):
+        (WebCore::Rect::left):
+        (WebCore::Rect::setTop):
+        (WebCore::Rect::setRight):
+        (WebCore::Rect::setBottom):
+        (WebCore::Rect::setLeft):
+        * css/Rect.idl:
+        * css/RectImpl.h: Removed.
+        * css/cssparser.cpp:
+        (WebCore::CSSParser::parseShape):
+        (WebCore::BorderImageParseContext::commitBorderImage):
+        * css/cssstyleselector.cpp:
+        (WebCore::CSSStyleSelector::applyProperty):
+        * page/DOMWindow.idl:
+
 2007-06-14  George Staikos  <staikos@kde.org>
 
         Reviewed by Lars.
index e4751cd..c4c4b9d 100644 (file)
@@ -406,6 +406,7 @@ all : \
     JSProcessingInstruction.h \
     JSRange.h \
     JSRangeException.h \
+    JSRect.h \
     JSSVGZoomEvent.h \
     JSSVGAElement.h \
     JSSVGAngle.h \
index 54143de..42181a3 100644 (file)
@@ -159,6 +159,7 @@ IDL_BINDINGS += \
     css/CSSValue.idl \
     css/CSSValueList.idl \
     css/MediaList.idl \
+    css/Rect.idl \
     css/StyleSheet.idl \
     dom/Attr.idl \
     dom/CharacterData.idl \
index 63ff08c..5ee59d4 100644 (file)
                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 */; };
                BC3C39B60C0D3D8D005F4D7A /* JSMediaList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC3C39B40C0D3D8D005F4D7A /* JSMediaList.cpp */; };
                BC3C39B70C0D3D8D005F4D7A /* JSMediaList.h in Headers */ = {isa = PBXBuildFile; fileRef = BC3C39B50C0D3D8D005F4D7A /* JSMediaList.h */; };
                BC3FCAA90AC3DB5800BA54AD /* PlatformScrollBar.h in Headers */ = {isa = PBXBuildFile; fileRef = BC3FCAA80AC3DB5800BA54AD /* PlatformScrollBar.h */; settings = {ATTRIBUTES = (); }; };
+               BC4368E80C226E32005EFB5F /* Rect.h in Headers */ = {isa = PBXBuildFile; fileRef = BC4368E70C226E32005EFB5F /* Rect.h */; };
                BC46C1EE0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC46C1ED0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp */; };
                BC46C1FA0C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC46C1F00C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp */; };
                BC46C1FB0C0DDC8F0020CFC3 /* JSCSSCharsetRule.h in Headers */ = {isa = PBXBuildFile; fileRef = BC46C1F10C0DDC8F0020CFC3 /* JSCSSCharsetRule.h */; };
                BCFB2F42097A24B500BA703D /* SegmentedString.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFB2F40097A24B500BA703D /* SegmentedString.h */; };
                BCFB2F76097A2E1A00BA703D /* Arena.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCFB2F74097A2E1A00BA703D /* Arena.cpp */; };
                BCFB2F77097A2E1A00BA703D /* Arena.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFB2F75097A2E1A00BA703D /* Arena.h */; };
+               BCFE2F110C1B58370020235F /* JSRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCFE2F0F0C1B58370020235F /* JSRect.cpp */; };
+               BCFE2F120C1B58380020235F /* JSRect.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFE2F100C1B58370020235F /* JSRect.h */; };
                BCFE8E320A02A1D30009E61D /* WebCoreTextRenderer.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCFE8E310A02A1D30009E61D /* WebCoreTextRenderer.mm */; };
                C6D74AD509AA282E000B0A52 /* ModifySelectionListLevel.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D74AD309AA282E000B0A52 /* ModifySelectionListLevel.h */; };
                C6D74AE409AA290A000B0A52 /* ModifySelectionListLevel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D74AE309AA290A000B0A52 /* ModifySelectionListLevel.cpp */; };
                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>"; };
                BC3C39B40C0D3D8D005F4D7A /* JSMediaList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaList.cpp; sourceTree = "<group>"; };
                BC3C39B50C0D3D8D005F4D7A /* JSMediaList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSMediaList.h; sourceTree = "<group>"; };
                BC3FCAA80AC3DB5800BA54AD /* PlatformScrollBar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PlatformScrollBar.h; sourceTree = "<group>"; };
+               BC4368E70C226E32005EFB5F /* Rect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Rect.h; sourceTree = "<group>"; };
                BC46C1ED0C0DDBDF0020CFC3 /* JSCSSRuleCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSRuleCustom.cpp; sourceTree = "<group>"; };
                BC46C1F00C0DDC8F0020CFC3 /* JSCSSCharsetRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSCharsetRule.cpp; sourceTree = "<group>"; };
                BC46C1F10C0DDC8F0020CFC3 /* JSCSSCharsetRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCSSCharsetRule.h; sourceTree = "<group>"; };
                BCFB2F40097A24B500BA703D /* SegmentedString.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SegmentedString.h; sourceTree = "<group>"; };
                BCFB2F74097A2E1A00BA703D /* Arena.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Arena.cpp; sourceTree = "<group>"; };
                BCFB2F75097A2E1A00BA703D /* Arena.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Arena.h; sourceTree = "<group>"; };
+               BCFE2F0F0C1B58370020235F /* JSRect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSRect.cpp; sourceTree = "<group>"; };
+               BCFE2F100C1B58370020235F /* JSRect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSRect.h; sourceTree = "<group>"; };
                BCFE8E310A02A1D30009E61D /* WebCoreTextRenderer.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreTextRenderer.mm; sourceTree = "<group>"; };
                BE855F7F0701E83500239769 /* WebCoreView.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                BE8560510701F91100239769 /* WebCoreView.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebCoreView.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                14DFB33F0A7DF7630018F769 /* Derived Sources */ = {
                        isa = PBXGroup;
                        children = (
-                               BCCBAD3E0C18C14200CE890F /* JSHTMLCollection.cpp */,
-                               BCCBAD3F0C18C14200CE890F /* JSHTMLCollection.h */,
                                65DF31D809D1C122000BE325 /* JSAttr.cpp */,
                                65DF31D909D1C123000BE325 /* JSAttr.h */,
                                65DF323309D1DE65000BE325 /* JSCanvasGradient.cpp */,
                                A80E7E950A1A83E3007FB8C5 /* JSHTMLButtonElement.h */,
                                938E665F09F09B81008A48EC /* JSHTMLCanvasElement.cpp */,
                                938E666109F09B87008A48EC /* JSHTMLCanvasElement.h */,
+                               BCCBAD3E0C18C14200CE890F /* JSHTMLCollection.cpp */,
+                               BCCBAD3F0C18C14200CE890F /* JSHTMLCollection.h */,
                                1A85B1E00A1B240500D8C87C /* JSHTMLDirectoryElement.cpp */,
                                1A85B1E10A1B240500D8C87C /* JSHTMLDirectoryElement.h */,
                                1A85B2B40A1B2AC700D8C87C /* JSHTMLDivElement.cpp */,
                                65DF31EE09D1CC60000BE325 /* JSRange.h */,
                                D23CA55E0AB0EAB6005108A5 /* JSRangeException.cpp */,
                                D23CA55C0AB0EAAE005108A5 /* JSRangeException.h */,
+                               BCFE2F0F0C1B58370020235F /* JSRect.cpp */,
+                               BCFE2F100C1B58370020235F /* JSRect.h */,
                                BCE013980C0BEF180043860A /* JSStyleSheet.cpp */,
                                BCE013990C0BEF180043860A /* JSStyleSheet.h */,
                                B20111050AB7740500DB0E68 /* JSSVGAElement.cpp */,
                                93CA4C9F09DF93FA00DF8677 /* quirks.css */,
                                858C38EF0AA8FDD100B187A4 /* RGBColor.idl */,
                                A80E79960A19BD21007FB8C5 /* Rect.idl */,
-                               A80E6CE00A1989CA007FB8C5 /* RectImpl.h */,
+                               BC4368E70C226E32005EFB5F /* Rect.h */,
                                A80E6CCA0A1989CA007FB8C5 /* ShadowValue.cpp */,
                                A80E6CBE0A1989CA007FB8C5 /* ShadowValue.h */,
                                A80E734C0A199C77007FB8C5 /* StyleBase.cpp */,
                                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 */,
                                BCD9C2C70C17B6EC005C90A2 /* JSEventTargetNode.lut.h in Headers */,
                                BCCBAD410C18C14200CE890F /* JSHTMLCollection.h in Headers */,
                                BC6DC7A10C1A4BFA004E2017 /* JSHTMLAllCollection.h in Headers */,
+                               BCFE2F120C1B58380020235F /* JSRect.h in Headers */,
+                               BC4368E80C226E32005EFB5F /* Rect.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
-                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                                BCD9C2C20C17B69E005C90A2 /* JSNodeList.cpp in Sources */,
                                BCCBAD3B0C18BFF800CE890F /* JSHTMLCollectionCustom.cpp in Sources */,
                                BCCBAD400C18C14200CE890F /* JSHTMLCollection.cpp in Sources */,
+                               BCFE2F110C1B58370020235F /* JSRect.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 385108d..4bb8e05 100644 (file)
 
 #include "kjs_css.lut.h"
 
-using namespace WebCore;
-using namespace HTMLNames;
+namespace WebCore {
 
-namespace KJS {
+using namespace KJS;
+using namespace HTMLNames;
 
-const ClassInfo DOMStyleSheetList::info = { "StyleSheetList", 0, &DOMStyleSheetListTable, 0 };
+const ClassInfo JSStyleSheetList::info = { "StyleSheetList", 0, &JSStyleSheetListTable, 0 };
 
 /*
-@begin DOMStyleSheetListTable 2
-  length        DOMStyleSheetList::Length       DontDelete|ReadOnly
-  item          DOMStyleSheetList::Item         DontDelete|Function 1
+@begin JSStyleSheetListTable 2
+  length        WebCore::JSStyleSheetList::Length       DontDelete|ReadOnly
+  item          WebCore::JSStyleSheetList::Item         DontDelete|Function 1
 @end
 */
-KJS_IMPLEMENT_PROTOTYPE_FUNCTION(DOMStyleSheetListFunc) // not really a prototype, but doesn't matter
 
-DOMStyleSheetList::DOMStyleSheetList(ExecState* exec, StyleSheetList* ssl, Document* doc)
-  : m_impl(ssl)
-  , m_doc(doc) 
+KJS_IMPLEMENT_PROTOTYPE_FUNCTION(JSStyleSheetListFunc) // not really a prototype, but doesn't matter
+
+JSStyleSheetList::JSStyleSheetList(ExecState* exec, StyleSheetList* styleSheetList, Document* doc)
+    : m_impl(styleSheetList)
+    , m_doc(doc) 
 {
     setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
 }
 
-DOMStyleSheetList::~DOMStyleSheetList()
+JSStyleSheetList::~JSStyleSheetList()
 {
-  ScriptInterpreter::forgetDOMObject(m_impl.get());
+    ScriptInterpreter::forgetDOMObject(m_impl.get());
 }
 
-JSValue* DOMStyleSheetList::getValueProperty(ExecState* exec, int token) const
+JSValue* JSStyleSheetList::getValueProperty(ExecState* exec, int token) const
 {
-    switch(token) {
-    case Length:
-      return jsNumber(m_impl->length());
-    default:
-      ASSERT(0);
-      return jsUndefined();
+    switch (token) {
+        case Length:
+            return jsNumber(m_impl->length());
+        default:
+            ASSERT_NOT_REACHED();
+            return jsUndefined();
     }
 }
 
-JSValue* DOMStyleSheetList::indexGetter(ExecState* exec, JSObject* originalObject, const Identifier& propertyName, const PropertySlot& slot)
+JSValue* JSStyleSheetList::indexGetter(ExecState* exec, JSObject* originalObject, const Identifier& propertyName, const PropertySlot& slot)
 {
-  DOMStyleSheetList *thisObj = static_cast<DOMStyleSheetList*>(slot.slotBase());
-  return toJS(exec, thisObj->m_impl->item(slot.index()));
+    JSStyleSheetList* thisObj = static_cast<JSStyleSheetList*>(slot.slotBase());
+    return toJS(exec, thisObj->m_impl->item(slot.index()));
 }
 
-JSValue* DOMStyleSheetList::nameGetter(ExecState* exec, JSObject* originalObject, const Identifier& propertyName, const PropertySlot& slot)
+JSValue* JSStyleSheetList::nameGetter(ExecState* exec, JSObject* originalObject, const Identifier& propertyName, const PropertySlot& slot)
 {
-  DOMStyleSheetList *thisObj = static_cast<DOMStyleSheetList*>(slot.slotBase());
-  Element *element = thisObj->m_doc->getElementById(propertyName);
-  return toJS(exec, static_cast<HTMLStyleElement*>(element)->sheet());
+    JSStyleSheetList* thisObj = static_cast<JSStyleSheetList*>(slot.slotBase());
+    Element* element = thisObj->m_doc->getElementById(propertyName);
+    return toJS(exec, static_cast<HTMLStyleElement*>(element)->sheet());
 }
 
-bool DOMStyleSheetList::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+bool JSStyleSheetList::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
 {
-  const HashEntry* entry = Lookup::findEntry(&DOMStyleSheetListTable, propertyName);
+    const HashEntry* entry = Lookup::findEntry(&JSStyleSheetListTable, propertyName);
   
-  if (entry) {
-    switch(entry->value) {
-    case Length:
-      slot.setStaticEntry(this, entry, staticValueGetter<DOMStyleSheetList>);
-      return true;
-    case Item:
-      slot.setStaticEntry(this, entry, staticFunctionGetter<DOMStyleSheetListFunc>);
-      return true;
+    if (entry) {
+        switch(entry->value) {
+            case Length:
+                slot.setStaticEntry(this, entry, staticValueGetter<JSStyleSheetList>);
+                return true;
+            case Item:
+                slot.setStaticEntry(this, entry, staticFunctionGetter<JSStyleSheetListFunc>);
+                return true;
+        }
     }
-  }
-
-  StyleSheetList &styleSheetList = *m_impl;
-
-  // Retrieve stylesheet by index
-  bool ok;
-  unsigned u = propertyName.toUInt32(&ok);
-  if (ok && u < styleSheetList.length()) {
-    slot.setCustomIndex(this, u, indexGetter);
-    return true;
-  }
-
-  // IE also supports retrieving a stylesheet by name, using the name/id of the <style> tag
-  // (this is consistent with all the other collections)
-  // ### Bad implementation because returns a single element (are IDs always unique?)
-  // and doesn't look for name attribute (see implementation above).
-  // But unicity of stylesheet ids is good practice anyway ;)
-  Element *element = m_doc->getElementById(propertyName);
-  if (element && element->hasTagName(styleTag)) {
-    slot.setCustom(this, nameGetter);
-    return true;
-  }
-
-  return DOMObject::getOwnPropertySlot(exec, propertyName, slot);
-}
 
-JSValue* toJS(ExecState* exec, StyleSheetList *ssl, Document *doc)
-{
-  // Can't use the cacheDOMObject macro because of the doc argument
-  DOMObject *ret;
-  if (!ssl)
-    return jsNull();
-  ScriptInterpreter* interp = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter());
-  if ((ret = interp->getDOMObject(ssl)))
-    return ret;
-  else {
-    ret = new DOMStyleSheetList(exec, ssl, doc);
-    interp->putDOMObject(ssl, ret);
-    return ret;
-  }
-}
+    StyleSheetList* styleSheetList = m_impl.get();
 
-JSValue* DOMStyleSheetListFunc::callAsFunction(ExecState* exec, JSObject* thisObj, const List &args)
-{
-  if (!thisObj->inherits(&KJS::DOMStyleSheetList::info))
-    return throwError(exec, TypeError);
-  StyleSheetList &styleSheetList = *static_cast<DOMStyleSheetList*>(thisObj)->impl();
-  if (id == DOMStyleSheetList::Item)
-    return toJS(exec, styleSheetList.item(args[0]->toInt32(exec)));
-  return jsUndefined();
-}
-
-// -------------------------------------------------------------------------
+    // Retrieve stylesheet by index
+    bool ok;
+    unsigned u = propertyName.toUInt32(&ok);
+    if (ok && u < styleSheetList->length()) {
+        slot.setCustomIndex(this, u, indexGetter);
+        return true;
+    }
 
-const ClassInfo DOMRGBColor::info = { "RGBColor", 0, &DOMRGBColorTable, 0 };
+    // IE also supports retrieving a stylesheet by name, using the name/id of the <style> tag
+    // (this is consistent with all the other collections)
+    // ### Bad implementation because returns a single element (are IDs always unique?)
+    // and doesn't look for name attribute (see implementation above).
+    // But unicity of stylesheet ids is good practice anyway ;)
+    Element* element = m_doc->getElementById(propertyName);
+    if (element && element->hasTagName(styleTag)) {
+        slot.setCustom(this, nameGetter);
+        return true;
+    }
 
-/*
-@begin DOMRGBColorTable 3
-  red   DOMRGBColor::Red        DontDelete|ReadOnly
-  green DOMRGBColor::Green      DontDelete|ReadOnly
-  blue  DOMRGBColor::Blue       DontDelete|ReadOnly
-@end
-*/
-DOMRGBColor::DOMRGBColor(ExecState* exec, unsigned color) 
-: m_color(color) 
-{ 
-    setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
+    return DOMObject::getOwnPropertySlot(exec, propertyName, slot);
 }
 
-DOMRGBColor::~DOMRGBColor()
+JSValue* toJS(ExecState* exec, StyleSheetList* styleSheetList, Document* doc)
 {
-  //rgbColors.remove(rgbColor.handle());
-}
+    // Can't use the cacheDOMObject macro because of the doc argument
+    if (!styleSheetList)
+        return jsNull();
 
-bool DOMRGBColor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
-{
-  return getStaticValueSlot<DOMRGBColor, DOMObject>(exec, &DOMRGBColorTable, this, propertyName, slot);
-}
+    ScriptInterpreter* interp = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter());
+    DOMObject* ret = interp->getDOMObject(styleSheetList);
+    if (ret)
+        return ret;
 
-JSValue* DOMRGBColor::getValueProperty(ExecState* exec, int token) const
-{
-  int color = m_color;
-  switch (token) {
-  case Red:
-    color >>= 8;
-    // fall through
-  case Green:
-    color >>= 8;
-    // fall through
-  case Blue:
-    return toJS(exec, new CSSPrimitiveValue(color & 0xFF, CSSPrimitiveValue::CSS_NUMBER));
-  default:
-    return NULL;
-  }
+    ret = new JSStyleSheetList(exec, styleSheetList, doc);
+    interp->putDOMObject(styleSheetList, ret);
+    return ret;
 }
 
-JSValue* getDOMRGBColor(ExecState* exec, unsigned c)
+JSValue* JSStyleSheetListFunc::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
 {
-  // ### implement equals for RGBColor since they're not refcounted objects
-  return new DOMRGBColor(exec, c);
+    if (!thisObj->inherits(&JSStyleSheetList::info))
+        return throwError(exec, TypeError);
+
+    StyleSheetList* styleSheetList = static_cast<JSStyleSheetList*>(thisObj)->impl();
+    if (id == JSStyleSheetList::Item)
+        return toJS(exec, styleSheetList->item(args[0]->toInt32(exec)));
+    return jsUndefined();
 }
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMRect::info = { "Rect", 0, &DOMRectTable, 0 };
+const ClassInfo JSRGBColor::info = { "RGBColor", 0, &JSRGBColorTable, 0 };
+
 /*
-@begin DOMRectTable 4
-  top    DOMRect::Top     DontDelete|ReadOnly
-  right  DOMRect::Right   DontDelete|ReadOnly
-  bottom DOMRect::Bottom  DontDelete|ReadOnly
-  left   DOMRect::Left    DontDelete|ReadOnly
+@begin JSRGBColorTable 3
+  red   WebCore::JSRGBColor::Red        DontDelete|ReadOnly
+  green WebCore::JSRGBColor::Green      DontDelete|ReadOnly
+  blue  WebCore::JSRGBColor::Blue       DontDelete|ReadOnly
 @end
 */
-DOMRect::DOMRect(ExecState* exec, RectImpl* r) 
-: m_rect(r) 
+
+JSRGBColor::JSRGBColor(ExecState* exec, unsigned color) 
+    : m_color(color) 
 { 
     setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
 }
 
-DOMRect::~DOMRect()
+JSRGBColor::~JSRGBColor()
 {
-  ScriptInterpreter::forgetDOMObject(m_rect.get());
 }
 
-bool DOMRect::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+bool JSRGBColor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
 {
-  return getStaticValueSlot<DOMRect, DOMObject>(exec,  &DOMRectTable, this, propertyName, slot);
+    return getStaticValueSlot<JSRGBColor, DOMObject>(exec, &JSRGBColorTable, this, propertyName, slot);
 }
 
-JSValue* DOMRect::getValueProperty(ExecState* exec, int token) const
+JSValue* JSRGBColor::getValueProperty(ExecState* exec, int token) const
 {
-  RectImpl &rect = *m_rect;
-  switch (token) {
-  case Top:
-    return toJS(exec, rect.top());
-  case Right:
-    return toJS(exec, rect.right());
-  case Bottom:
-    return toJS(exec, rect.bottom());
-  case Left:
-    return toJS(exec, rect.left());
-  default:
-    return NULL;
-  }
+    int color = m_color;
+    switch (token) {
+        case Red:
+            color >>= 8;
+            // fall through
+        case Green:
+            color >>= 8;
+            // fall through
+        case Blue:
+            return toJS(exec, new CSSPrimitiveValue(color & 0xFF, CSSPrimitiveValue::CSS_NUMBER));
+        default:
+            return 0;
+    }
 }
 
-JSValue* toJS(ExecState* exec, RectImpl *r)
+JSValue* getJSRGBColor(ExecState* exec, unsigned color)
 {
-  return cacheDOMObject<RectImpl, DOMRect>(exec, r);
+    // FIXME: implement equals for RGBColor since they're not refcounted objects
+    return new JSRGBColor(exec, color);
 }
 
-}
+} // namespace WebCore
index 51ca332..9d3bf6b 100644 (file)
 #define kjs_css_h
 
 #include "Color.h"
-#include "RectImpl.h"
 #include "JSStyleSheet.h"
 #include "kjs_binding.h"
 
 namespace WebCore {
+
     class Counter;
     class CSSStyleSheet;
     class StyleSheet;
     class StyleSheetList;
-}
-
-namespace KJS {
-
-  class DOMStyleSheetList : public DOMObject {
-  public:
-    DOMStyleSheetList(ExecState*, WebCore::StyleSheetList*, WebCore::Document*);
-    virtual ~DOMStyleSheetList();
-    virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
-    JSValue* getValueProperty(ExecState*, int token) const;
-    // no put - all read-only
-    virtual const ClassInfo* classInfo() const { return &info; }
-    virtual bool toBoolean(ExecState*) const { return true; }
-    static const ClassInfo info;
-    WebCore::StyleSheetList* impl() const { return m_impl.get(); }
-    enum { Item, Length };
-  private:
-    static JSValue* indexGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&);
-    static JSValue* nameGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&);
-
-    RefPtr<WebCore::StyleSheetList> m_impl;
-    RefPtr<WebCore::Document> m_doc;
-  };
-
-  // The document is only used for get-stylesheet-by-name (make optional if necessary)
-  JSValue* toJS(ExecState*, WebCore::StyleSheetList*, WebCore::Document*);
-
-  class DOMRGBColor : public DOMObject {
-  public:
-    DOMRGBColor(ExecState*, unsigned color);
-    ~DOMRGBColor();
-    virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
-    JSValue* getValueProperty(ExecState*, int token) const;
-    // no put - all read-only
-    virtual const ClassInfo* classInfo() const { return &info; }
-    static const ClassInfo info;
-    enum { Red, Green, Blue };
-    unsigned impl() const { return m_color; }
-  private:
-    unsigned m_color;
-  };
-
-  JSValue* getDOMRGBColor(ExecState*, unsigned color);
-
-  class DOMRect : public DOMObject {
-  public:
-    DOMRect(ExecState*, WebCore::RectImpl* r);
-    ~DOMRect();
-    virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
-    JSValue* getValueProperty(ExecState*, int token) const;
-    // no put - all read-only
-    virtual const ClassInfo* classInfo() const { return &info; }
-    static const ClassInfo info;
-    enum { Top, Right, Bottom, Left };
-    WebCore::RectImpl* impl() const { return m_rect.get(); }
-  private:
-    RefPtr<WebCore::RectImpl> m_rect;
-  };
-
-  JSValue* toJS(ExecState*, WebCore::RectImpl*);
-
-} // namespace
-
-#endif
+
+    class JSStyleSheetList : public KJS::DOMObject {
+    public:
+        JSStyleSheetList(KJS::ExecState*, StyleSheetList*, Document*);
+        virtual ~JSStyleSheetList();
+
+        virtual bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);
+        KJS::JSValue* getValueProperty(KJS::ExecState*, int token) const;
+        // no put - all read-only
+        virtual const KJS::ClassInfo* classInfo() const { return &info; }
+        static const KJS::ClassInfo info;
+
+        enum { Item, Length };
+
+        StyleSheetList* impl() const { return m_impl.get(); }
+
+    private:
+        static KJS::JSValue* indexGetter(KJS::ExecState*, KJS::JSObject*, const KJS::Identifier&, const KJS::PropertySlot&);
+        static KJS::JSValue* nameGetter(KJS::ExecState*, KJS::JSObject*, const KJS::Identifier&, const KJS::PropertySlot&);
+
+        RefPtr<StyleSheetList> m_impl;
+        RefPtr<Document> m_doc;
+    };
+
+    // The document is only used for get-stylesheet-by-name (make optional if necessary)
+    KJS::JSValue* toJS(KJS::ExecState*, StyleSheetList*, Document*);
+
+    class JSRGBColor : public KJS::DOMObject {
+    public:
+        JSRGBColor(KJS::ExecState*, unsigned color);
+        ~JSRGBColor();
+
+        virtual bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);
+        KJS::JSValue* getValueProperty(KJS::ExecState*, int token) const;
+        // no put - all read-only
+
+        virtual const KJS::ClassInfo* classInfo() const { return &info; }
+        static const KJS::ClassInfo info;
+
+        enum { Red, Green, Blue };
+
+        unsigned impl() const { return m_color; }
+
+    private:
+        unsigned m_color;
+    };
+
+    KJS::JSValue* getJSRGBColor(KJS::ExecState*, unsigned color);
+
+} // namespace WebCore
+
+#endif // kjs_css_h
index c5a847f..3e4e4bc 100644 (file)
@@ -43,6 +43,7 @@
 #import "JSNodeIterator.h"
 #import "JSNodeList.h"
 #import "JSRange.h"
+#import "JSRect.h"
 #import "JSStyleSheet.h"
 #import "JSTreeWalker.h"
 #import "JSXPathExpression.h"
@@ -82,8 +83,11 @@ static inline id createDOMWrapper(KJS::JSObject* object)
     WRAP(NamedNodeMap)
     WRAP(Node)
     WRAP(NodeList)
+    WRAP(RGBColor)
     WRAP(Range)
+    WRAP(Rect)
     WRAP(StyleSheet)
+    WRAP(StyleSheetList)
     WRAP(XPathExpression)
     WRAP(XPathResult)
 
@@ -98,9 +102,6 @@ static inline id createDOMWrapper(KJS::JSObject* object)
             return [objc_getClass("DOM" #className) _wrap##className:static_cast<DOM##className*>(object)->impl()];
 
     WRAP(Event)
-    WRAP(RGBColor)
-    WRAP(Rect)
-    WRAP(StyleSheetList)
 
     #undef WRAP
 
index 85473ae..aa79239 100644 (file)
@@ -187,7 +187,7 @@ sub AddIncludesForType
     # When we're finished with the one-file-per-class
     # reorganization, we won't need these special cases.
     if ($codeGenerator->IsPrimitiveType($type) or AvoidInclusionOfType($type)
-        or $type eq "DOMString" or $type eq "DOMObject" or $type eq "RGBColor" or $type eq "Rect") {
+        or $type eq "DOMString" or $type eq "DOMObject" or $type eq "RGBColor") {
     } elsif ($type =~ /SVGPathSeg/) {
         $joinedName = $type;
         $joinedName =~ s/Abs|Rel//;
@@ -1386,7 +1386,7 @@ sub NativeToJSValue
 
     if ($type eq "RGBColor") {
         $implIncludes{"kjs_css.h"} = 1;
-        return "getDOMRGBColor(exec, $value)";
+        return "getJSRGBColor(exec, $value)";
     }
 
     if ($codeGenerator->IsPodType($type)) {
@@ -1431,6 +1431,10 @@ sub NativeToJSValue
         $implIncludes{"NamedAttrMap.h"} = 1;
     }
 
+    if ($type eq "NodeList") {
+        $implIncludes{"NameNodeList.h"} = 1;
+    }
+
     if ($type eq "EventTarget") {
         $implIncludes{"EventTargetNode.h"} = 1;
         $implIncludes{"JSEventTargetNode.h"} = 1;
@@ -1438,13 +1442,6 @@ sub NativeToJSValue
     } elsif ($type eq "Event") {
         $implIncludes{"kjs_events.h"} = 1;
         $implIncludes{"Event.h"} = 1;
-    } elsif ($type eq "NodeList") {
-        $implIncludes{"JS$type.h"} = 1;
-        $implIncludes{"$type.h"} = 1;
-        $implIncludes{"NameNodeList.h"} = 1;
-    } elsif ($type eq "Rect") {
-        $implIncludes{"RectImpl.h"} = 1;
-        $implIncludes{"kjs_css.h"} = 1;
     } elsif ($type eq "HTMLCanvasElement") {
         $implIncludes{"kjs_dom.h"} = 1;
         $implIncludes{"HTMLCanvasElement.h"} = 1;
index f3b419d..acb2f4d 100644 (file)
@@ -332,7 +332,6 @@ sub GetImplClassName
     my $name = $codeGenerator->StripModule(shift);
 
     return "DOMImplementationFront" if $name eq "DOMImplementation";
-    return "RectImpl" if $name eq "Rect";
     return "DOMWindow" if $name eq "AbstractView";
     return $name;
 }
@@ -548,12 +547,6 @@ sub AddIncludesForType
         return;
     }
 
-    if ($type eq "Rect") {
-        $implIncludes{"RectImpl.h"} = 1;
-        $implIncludes{"DOM$type.h"} = 1;
-        return;
-    }
-
     if ($type eq "RGBColor") {
         $implIncludes{"Color.h"} = 1;
         $implIncludes{"DOM$type.h"} = 1;
index 77a53f0..a6f350d 100644 (file)
 
 #include "CSSImageValue.h"
 #include "PlatformString.h"
-#include "RectImpl.h"
+#include "Rect.h"
 
 namespace WebCore {
 
-CSSBorderImageValue::CSSBorderImageValue(PassRefPtr<CSSImageValue> image, PassRefPtr<RectImpl> imageRect, int horizontalRule, int verticalRule)
+CSSBorderImageValue::CSSBorderImageValue(PassRefPtr<CSSImageValue> image, PassRefPtr<Rect> imageRect, int horizontalRule, int verticalRule)
     : m_image(image)
     , m_imageSliceRect(imageRect)
     , m_horizontalSizeRule(horizontalRule)
index de39484..02e6b08 100644 (file)
 namespace WebCore {
 
 class CSSImageValue;
-class RectImpl;
+class Rect;
 
 class CSSBorderImageValue : public CSSValue {
 public:
     CSSBorderImageValue();
-    CSSBorderImageValue(PassRefPtr<CSSImageValue>, PassRefPtr<RectImpl>, int horizontalRule, int verticalRule);
+    CSSBorderImageValue(PassRefPtr<CSSImageValue>, PassRefPtr<Rect>, int horizontalRule, int verticalRule);
 
     virtual String cssText() const;
 
@@ -45,7 +45,7 @@ public:
 
     // These four values are used to make "cuts" in the image.  They can be numbers
     // or percentages.
-    RefPtr<RectImpl> m_imageSliceRect;
+    RefPtr<Rect> 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
index 32a34b1..a8102af 100644 (file)
@@ -137,7 +137,7 @@ CSSPrimitiveValue::CSSPrimitiveValue(PassRefPtr<Counter> c)
     m_value.counter = c.releaseRef();
 }
 
-CSSPrimitiveValue::CSSPrimitiveValue(PassRefPtr<RectImpl> r)
+CSSPrimitiveValue::CSSPrimitiveValue(PassRefPtr<Rect> r)
     : m_type(CSS_RECT)
 {
     m_value.rect = r.releaseRef();
@@ -522,7 +522,7 @@ String CSSPrimitiveValue::cssText() const
             // FIXME: Add list-style and separator
             break;
         case CSS_RECT: {
-            RectImpl* rectVal = getRectValue();
+            Rect* rectVal = getRectValue();
             text = "rect(";
             text += rectVal->top()->cssText() + " ";
             text += rectVal->right()->cssText() + " ";
index 72c2571..da852f1 100644 (file)
@@ -31,7 +31,7 @@ namespace WebCore {
 class Counter;
 class DashboardRegion;
 class Pair;
-class RectImpl;
+class Rect;
 class RenderStyle;
 class StringImpl;
 
@@ -76,7 +76,7 @@ public:
     CSSPrimitiveValue(double, UnitTypes);
     CSSPrimitiveValue(const String&, UnitTypes);
     CSSPrimitiveValue(PassRefPtr<Counter>);
-    CSSPrimitiveValue(PassRefPtr<RectImpl>);
+    CSSPrimitiveValue(PassRefPtr<Rect>);
     CSSPrimitiveValue(unsigned color); // RGB value
     CSSPrimitiveValue(PassRefPtr<Pair>);
     CSSPrimitiveValue(PassRefPtr<DashboardRegion>); // FIXME: Why is dashboard region a primitive value? This makes no sense.
@@ -115,7 +115,7 @@ public:
     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; }
+    Rect* 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; }
 
@@ -139,7 +139,7 @@ protected:
         double num;
         StringImpl* string;
         Counter* counter;
-        RectImpl* rect;
+        Rect* rect;
         unsigned rgbcolor;
         Pair* pair;
         DashboardRegion* region;
index c39320c..4ce0c59 100644 (file)
 #ifndef DashboardRegion_h
 #define DashboardRegion_h
 
-#include "RectImpl.h"
+#include "Rect.h"
 
 namespace WebCore {
 
-class DashboardRegion : public RectImpl {
+class DashboardRegion : public Rect {
 public:
     DashboardRegion() : m_isCircle(0), m_isRectangle(0) { }
 
diff --git a/WebCore/css/Rect.h b/WebCore/css/Rect.h
new file mode 100644 (file)
index 0000000..97d122b
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef Rect_h
+#define Rect_h
+
+#include "CSSPrimitiveValue.h"
+#include "Shared.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+    class Rect : public Shared<Rect> {
+    public:
+        virtual ~Rect() { }
+
+        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 WebCore
+
+#endif // Rect_h
index 290dabb..34cd85a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -19,7 +19,7 @@
 
 module css {
 
-    interface Rect {
+    interface [GenerateConstructor] Rect {
         readonly attribute CSSPrimitiveValue  top;
         readonly attribute CSSPrimitiveValue  right;
         readonly attribute CSSPrimitiveValue  bottom;
diff --git a/WebCore/css/RectImpl.h b/WebCore/css/RectImpl.h
deleted file mode 100644 (file)
index 4fe1fa2..0000000
+++ /dev/null
@@ -1,56 +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 RectImpl_h
-#define RectImpl_h
-
-#include "Shared.h"
-#include "CSSPrimitiveValue.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefPtr.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
index f465f51..7f3950d 100644 (file)
@@ -2245,7 +2245,7 @@ bool CSSParser::parseShape(int propId, bool important)
     // rect(t, r, b, l) || rect(t r b l)
     if (args->size() != 4 && args->size() != 7)
         return false;
-    RectImpl *rect = new RectImpl();
+    Rect *rect = new Rect();
     bool valid = true;
     int i = 0;
     Value *a = args->current();
@@ -2818,7 +2818,7 @@ struct BorderImageParseContext
              m_left = new CSSPrimitiveValue(m_top->getFloatValue(), (CSSPrimitiveValue::UnitTypes)m_top->primitiveType());
              
         // Now build a rect value to hold all four of our primitive values.
-        RectImpl* rect = new RectImpl;
+        Rect* rect = new Rect;
         rect->setTop(m_top); rect->setRight(m_right); rect->setBottom(m_bottom); rect->setLeft(m_left);
 
         // Fill in STRETCH as the default if it wasn't specified.
index 3182ddb..a5f8ac0 100644 (file)
@@ -54,7 +54,7 @@
 #include "MediaList.h"
 #include "MediaQueryEvaluator.h"
 #include "Pair.h"
-#include "RectImpl.h"
+#include "Rect.h"
 #include "RenderTheme.h"
 #include "StyleSheetList.h"
 #include "UserAgentStyleSheets.h"
@@ -3196,7 +3196,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
         } else if (!primitiveValue) {
             return;
         } else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RECT) {
-            RectImpl* rect = primitiveValue->getRectValue();
+            Rect* rect = primitiveValue->getRectValue();
             if (!rect)
                 return;
             top = convertToLength(rect->top(), style);
@@ -3656,7 +3656,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
             
             // Set up a length box to represent our image slices.
             LengthBox& l = image.m_slices;
-            RectImpl* r = borderImage->m_imageSliceRect.get();
+            Rect* r = borderImage->m_imageSliceRect.get();
             if (r->top()->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE)
                 l.top = Length(r->top()->getFloatValue(), Percent);
             else
index 293ca42..78476f3 100644 (file)
@@ -41,6 +41,7 @@ module window {
                                        in [Optional] boolean authorOnly);
         readonly attribute double devicePixelRatio;
 
+#if defined(LANGUAGE_JAVASCRIPT)
         // Global constructors
         attribute StyleSheetConstructor StyleSheet;
         attribute CSSStyleSheetConstructor CSSStyleSheet;
@@ -61,6 +62,7 @@ module window {
         attribute MediaListConstructor MediaList;
         attribute CounterConstructor Counter;
         attribute CSSRuleListConstructor CSSRuleList;
+        attribute RectConstructor Rect;
 
         // FIXME: Implement the commented-out global constructors for interfaces listed in DOM Level 3 Core specification.
 //        attribute DOMExceptionConstructor DOMException;
@@ -170,6 +172,7 @@ module window {
         attribute XPathEvaluatorConstructor XPathEvaluator;
         attribute XPathResultConstructor XPathResult;
 #endif
+#endif // defined(LANGUAGE_JAVASCRIPT)
     };
 
 }
index 0f89d44..dc55332 100644 (file)
@@ -1,3 +1,19 @@
+2007-06-15  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Darin.
+
+        Patch for http://bugs.webkit.org/show_bug.cgi?id=14053
+        Autogenerate JS binding for Rect
+
+        - Fix conflicts by using ::Rect instead of Rect.
+
+        * Plugins/WebBaseNetscapePluginView.mm:
+        (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+        (-[WebBaseNetscapePluginView sendEvent:]):
+        (-[WebBaseNetscapePluginView tellQuickTimeToChill]):
+        (-[WebBaseNetscapePluginView invalidateRegion:]):
+        (-[WebBaseNetscapePluginView _printedPluginBitmap]):
+
 2007-06-15  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Kevin.
index e493419..2d16b6b 100644 (file)
@@ -341,7 +341,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
 #ifndef NP_NO_QUICKDRAW
     // Look at the Carbon port to convert top-left-based window coordinates into top-left-based content coordinates.
     if (drawingModel == NPDrawingModelQuickDraw) {
-        Rect portBounds;
+        ::Rect portBounds;
         CGrafPtr port = GetWindowPort(windowRef);
         GetPortBounds(port, &portBounds);
 
@@ -396,7 +396,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
 #ifndef NP_NO_QUICKDRAW
         case NPDrawingModelQuickDraw: {
             // Set up NS_Port.
-            Rect portBounds;
+            ::Rect portBounds;
             CGrafPtr port = GetWindowPort(windowRef);
             GetPortBounds(port, &portBounds);
             nPort.qdPort.port = port;
@@ -430,7 +430,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
                 void* offscreenData = CGBitmapContextGetData(currentContext);
                 if (offscreenData) {
                     // If the current context is an offscreen bitmap, then create a GWorld for it.
-                    Rect offscreenBounds;
+                    ::Rect offscreenBounds;
                     offscreenBounds.top = 0;
                     offscreenBounds.left = 0;
                     offscreenBounds.right = CGBitmapContextGetWidth(currentContext);
@@ -733,7 +733,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
     // Note that PaintRect() only works for QuickDraw plugins; otherwise the current QD port is undefined.
     if (drawingModel == NPDrawingModelQuickDraw && !isTransparent && event->what == updateEvt) {
         ForeColor(greenColor);
-        const Rect bigRect = { -10000, -10000, 10000, 10000 };
+        const ::Rect bigRect = { -10000, -10000, 10000, 10000 };
         PaintRect(&bigRect);
         ForeColor(blackColor);
     }
@@ -1736,7 +1736,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
         return;
     }
     CGrafPtr port = GetWindowPort(windowRef);
-    Rect bounds;
+    ::Rect bounds;
     GetPortBounds(port, &bounds);
     WKCallDrawingNotification(port, &bounds);
 }
@@ -2411,7 +2411,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
 #ifndef NP_NO_QUICKDRAW
         case NPDrawingModelQuickDraw:
         {
-            Rect qdRect;
+            ::Rect qdRect;
             GetRegionBounds((NPQDRegion)invalidRegion, &qdRect);
             invalidRect = NSMakeRect(qdRect.left, qdRect.top, qdRect.right - qdRect.left, qdRect.bottom - qdRect.top);
         }
@@ -2698,7 +2698,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
     ASSERT(bitmap);
     
     // Create a GWorld with the same underlying buffer into which the plugin can draw
-    Rect printGWorldBounds;
+    ::Rect printGWorldBounds;
     SetRect(&printGWorldBounds, 0, 0, window.width, window.height);
     GWorldPtr printGWorld;
     if (NewGWorldFromPtr(&printGWorld,