Commit 5eadba09 authored by andersca's avatar andersca

2006-08-11 Anders Carlsson <acarlsson@apple.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=10353
        XMLSerializer and DOMParser should have real implementations
        
        Make real implementation files for DOMParser and XMLSerializer and wrap them
        using our bindings generation.
        
        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSDOMParser.cpp: Removed.
        * bindings/js/JSDOMParser.h: Removed.
        * bindings/js/JSXMLSerializer.cpp: Removed.
        * bindings/js/JSXMLSerializer.h: Removed.
        * bindings/js/kjs_window.cpp:
        (KJS::Window::getValueProperty):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * page/DOMWindow.idl:
        * xml/DOMParser.cpp: Added.
        (WebCore::DOMParser::parseFromString):
        * xml/DOMParser.h: Added.
        * xml/DOMParser.idl: Added.
        * xml/XMLSerializer.cpp: Added.
        (WebCore::XMLSerializer::serializeToString):
        * xml/XMLSerializer.h: Added.
        * xml/XMLSerializer.idl: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0134b5ee
2006-08-11 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10353
XMLSerializer and DOMParser should have real implementations
Make real implementation files for DOMParser and XMLSerializer and wrap them
using our bindings generation.
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMParser.cpp: Removed.
* bindings/js/JSDOMParser.h: Removed.
* bindings/js/JSXMLSerializer.cpp: Removed.
* bindings/js/JSXMLSerializer.h: Removed.
* bindings/js/kjs_window.cpp:
(KJS::Window::getValueProperty):
* bindings/js/kjs_window.h:
(KJS::Window::):
* page/DOMWindow.idl:
* xml/DOMParser.cpp: Added.
(WebCore::DOMParser::parseFromString):
* xml/DOMParser.h: Added.
* xml/DOMParser.idl: Added.
* xml/XMLSerializer.cpp: Added.
(WebCore::XMLSerializer::serializeToString):
* xml/XMLSerializer.h: Added.
* xml/XMLSerializer.idl: Added.
2006-08-14 Maciej Stachowiak <mjs@apple.com>
Reviewed by Brady.
......@@ -20,6 +50,7 @@
* bindings/js/kjs_events.cpp:
(KJS::JSLazyEventListener::parseCode):
>>>>>>> .r15854
2006-08-12 Eric Seidel <eric@eseidel.com>
Reviewed by hyatt and mjs.
......@@ -142,6 +173,7 @@
* dom/DOMImplementation.cpp:
>>>>>>> .r15841
2006-08-12 Oliver <ojh16@student.canterbury.ac.nz>
Rubber stamped by tim
......
......@@ -58,7 +58,7 @@ all : \
JSCounter.h \
JSCSSStyleDeclaration.h \
JSDOMImplementation.h \
JSDOMParser.lut.h \
JSDOMParser.h \
JSDOMWindow.h \
JSDocument.h \
JSDocumentFragment.h \
......@@ -141,7 +141,7 @@ all : \
JSXPathResult.h \
JSWheelEvent.h \
JSXMLHttpRequest.lut.h \
JSXMLSerializer.lut.h \
JSXMLSerializer.h \
JSXSLTProcessor.lut.h \
SVGElementFactory.cpp \
SVGNames.cpp \
......
......@@ -116,6 +116,14 @@
1AB7FC880A8B92EC00D9D37B /* XPathVariableReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB7FC670A8B92EC00D9D37B /* XPathVariableReference.h */; };
1AC694C70A3B1676003F5049 /* PluginDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC694C50A3B1676003F5049 /* PluginDocument.cpp */; };
1AC694C80A3B1676003F5049 /* PluginDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC694C60A3B1676003F5049 /* PluginDocument.h */; };
1ACE53DF0A8D18810022947D /* JSDOMParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACE53DD0A8D18810022947D /* JSDOMParser.cpp */; };
1ACE53E00A8D18810022947D /* JSDOMParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACE53DE0A8D18810022947D /* JSDOMParser.h */; };
1ACE53E70A8D18E70022947D /* DOMParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACE53E10A8D18E70022947D /* DOMParser.cpp */; };
1ACE53E80A8D18E70022947D /* DOMParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACE53E20A8D18E70022947D /* DOMParser.h */; };
1ACE53EA0A8D18E70022947D /* XMLSerializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACE53E40A8D18E70022947D /* XMLSerializer.cpp */; };
1ACE53EB0A8D18E70022947D /* XMLSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACE53E50A8D18E70022947D /* XMLSerializer.h */; };
1ACE53F60A8D19470022947D /* JSXMLSerializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACE53F40A8D19470022947D /* JSXMLSerializer.cpp */; };
1ACE53F70A8D19470022947D /* JSXMLSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACE53F50A8D19470022947D /* JSXMLSerializer.h */; };
1AE2AA1E0A1CDAB400B42B25 /* JSHTMLAreaElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE2AA0A0A1CDAB300B42B25 /* JSHTMLAreaElement.cpp */; };
1AE2AA1F0A1CDAB400B42B25 /* JSHTMLAreaElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE2AA0B0A1CDAB300B42B25 /* JSHTMLAreaElement.h */; };
1AE2AA200A1CDAB400B42B25 /* JSHTMLBaseFontElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE2AA0C0A1CDAB300B42B25 /* JSHTMLBaseFontElement.cpp */; };
......@@ -218,9 +226,7 @@
656580F409D12B20000E61D7 /* CSSPropertyNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 656580EF09D12B20000E61D7 /* CSSPropertyNames.h */; };
6565815109D13043000E61D7 /* CSSValueKeywords.h in Headers */ = {isa = PBXBuildFile; fileRef = 6565814809D13043000E61D7 /* CSSValueKeywords.h */; };
656581B209D14EE6000E61D7 /* UserAgentStyleSheets.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581AE09D14EE6000E61D7 /* UserAgentStyleSheets.h */; };
656581ED09D1508D000E61D7 /* JSDOMParser.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581D609D1508D000E61D7 /* JSDOMParser.lut.h */; };
656581EE09D1508D000E61D7 /* JSXMLHttpRequest.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581D709D1508D000E61D7 /* JSXMLHttpRequest.lut.h */; };
656581EF09D1508D000E61D7 /* JSXMLSerializer.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581D809D1508D000E61D7 /* JSXMLSerializer.lut.h */; };
656581F009D1508D000E61D7 /* JSXSLTProcessor.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581D909D1508D000E61D7 /* JSXSLTProcessor.lut.h */; };
656581F109D1508D000E61D7 /* kjs_css.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581DA09D1508D000E61D7 /* kjs_css.lut.h */; };
656581F209D1508D000E61D7 /* kjs_dom.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581DB09D1508D000E61D7 /* kjs_dom.lut.h */; };
......@@ -490,12 +496,8 @@
93A1EAA80A563508006960A0 /* ImageDocumentMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 93A1EAA70A563508006960A0 /* ImageDocumentMac.h */; };
93B0FD8A0A759BED0080AD44 /* StringImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93B0FD880A759BED0080AD44 /* StringImplMac.mm */; };
93B0FD8B0A759BED0080AD44 /* StringMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93B0FD890A759BED0080AD44 /* StringMac.mm */; };
93B70D5B09EB0C7C009D8468 /* JSDOMParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D3F09EB0C7C009D8468 /* JSDOMParser.cpp */; };
93B70D5C09EB0C7C009D8468 /* JSDOMParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D4009EB0C7C009D8468 /* JSDOMParser.h */; };
93B70D5D09EB0C7C009D8468 /* JSXMLHttpRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D4109EB0C7C009D8468 /* JSXMLHttpRequest.cpp */; };
93B70D5E09EB0C7C009D8468 /* JSXMLHttpRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D4209EB0C7C009D8468 /* JSXMLHttpRequest.h */; };
93B70D5F09EB0C7C009D8468 /* JSXMLSerializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D4309EB0C7C009D8468 /* JSXMLSerializer.cpp */; };
93B70D6009EB0C7C009D8468 /* JSXMLSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D4409EB0C7C009D8468 /* JSXMLSerializer.h */; };
93B70D6109EB0C7C009D8468 /* JSXSLTProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D4509EB0C7C009D8468 /* JSXSLTProcessor.cpp */; };
93B70D6209EB0C7C009D8468 /* JSXSLTProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D4609EB0C7C009D8468 /* JSXSLTProcessor.h */; };
93B70D6309EB0C7C009D8468 /* kjs_binding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D4709EB0C7C009D8468 /* kjs_binding.cpp */; };
......@@ -1732,6 +1734,16 @@
1AB7FC670A8B92EC00D9D37B /* XPathVariableReference.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XPathVariableReference.h; sourceTree = "<group>"; };
1AC694C50A3B1676003F5049 /* PluginDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PluginDocument.cpp; sourceTree = "<group>"; };
1AC694C60A3B1676003F5049 /* PluginDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PluginDocument.h; sourceTree = "<group>"; };
1ACE53DD0A8D18810022947D /* JSDOMParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMParser.cpp; sourceTree = "<group>"; };
1ACE53DE0A8D18810022947D /* JSDOMParser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSDOMParser.h; sourceTree = "<group>"; };
1ACE53E10A8D18E70022947D /* DOMParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DOMParser.cpp; sourceTree = "<group>"; };
1ACE53E20A8D18E70022947D /* DOMParser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMParser.h; sourceTree = "<group>"; };
1ACE53E30A8D18E70022947D /* DOMParser.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = DOMParser.idl; sourceTree = "<group>"; };
1ACE53E40A8D18E70022947D /* XMLSerializer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = XMLSerializer.cpp; sourceTree = "<group>"; };
1ACE53E50A8D18E70022947D /* XMLSerializer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XMLSerializer.h; sourceTree = "<group>"; };
1ACE53E60A8D18E70022947D /* XMLSerializer.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = XMLSerializer.idl; sourceTree = "<group>"; };
1ACE53F40A8D19470022947D /* JSXMLSerializer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSXMLSerializer.cpp; sourceTree = "<group>"; };
1ACE53F50A8D19470022947D /* JSXMLSerializer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSXMLSerializer.h; sourceTree = "<group>"; };
1AE2A9F00A1CDA5700B42B25 /* HTMLAreaElement.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = HTMLAreaElement.idl; sourceTree = "<group>"; };
1AE2A9F10A1CDA5700B42B25 /* HTMLBaseFontElement.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = HTMLBaseFontElement.idl; sourceTree = "<group>"; };
1AE2A9F20A1CDA5700B42B25 /* HTMLBodyElement.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = HTMLBodyElement.idl; sourceTree = "<group>"; };
......@@ -1880,9 +1892,7 @@
656581AD09D14EE6000E61D7 /* ColorData.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ColorData.c; sourceTree = "<group>"; };
656581AE09D14EE6000E61D7 /* UserAgentStyleSheets.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = UserAgentStyleSheets.h; sourceTree = "<group>"; };
656581AF09D14EE6000E61D7 /* UserAgentStyleSheetsData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = UserAgentStyleSheetsData.cpp; sourceTree = "<group>"; };
656581D609D1508D000E61D7 /* JSDOMParser.lut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSDOMParser.lut.h; sourceTree = "<group>"; };
656581D709D1508D000E61D7 /* JSXMLHttpRequest.lut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSXMLHttpRequest.lut.h; sourceTree = "<group>"; };
656581D809D1508D000E61D7 /* JSXMLSerializer.lut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSXMLSerializer.lut.h; sourceTree = "<group>"; };
656581D909D1508D000E61D7 /* JSXSLTProcessor.lut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSXSLTProcessor.lut.h; sourceTree = "<group>"; };
656581DA09D1508D000E61D7 /* kjs_css.lut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = kjs_css.lut.h; sourceTree = "<group>"; };
656581DB09D1508D000E61D7 /* kjs_dom.lut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = kjs_dom.lut.h; sourceTree = "<group>"; };
......@@ -2195,12 +2205,8 @@
93B0FD890A759BED0080AD44 /* StringMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = StringMac.mm; sourceTree = "<group>"; };
93B641F106E28C5C0055F610 /* FormDataMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FormDataMac.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
93B641F206E28C5C0055F610 /* FormDataMac.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = FormDataMac.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
93B70D3F09EB0C7C009D8468 /* JSDOMParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMParser.cpp; sourceTree = "<group>"; };
93B70D4009EB0C7C009D8468 /* JSDOMParser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSDOMParser.h; sourceTree = "<group>"; };
93B70D4109EB0C7C009D8468 /* JSXMLHttpRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSXMLHttpRequest.cpp; sourceTree = "<group>"; };
93B70D4209EB0C7C009D8468 /* JSXMLHttpRequest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSXMLHttpRequest.h; sourceTree = "<group>"; };
93B70D4309EB0C7C009D8468 /* JSXMLSerializer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSXMLSerializer.cpp; sourceTree = "<group>"; };
93B70D4409EB0C7C009D8468 /* JSXMLSerializer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSXMLSerializer.h; sourceTree = "<group>"; };
93B70D4509EB0C7C009D8468 /* JSXSLTProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSXSLTProcessor.cpp; sourceTree = "<group>"; };
93B70D4609EB0C7C009D8468 /* JSXSLTProcessor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSXSLTProcessor.h; sourceTree = "<group>"; };
93B70D4709EB0C7C009D8468 /* kjs_binding.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = kjs_binding.cpp; sourceTree = "<group>"; };
......@@ -3573,7 +3579,8 @@
65DF31E209D1CC60000BE325 /* JSDocumentType.h */,
65DF31E309D1CC60000BE325 /* JSDOMImplementation.cpp */,
65DF31E409D1CC60000BE325 /* JSDOMImplementation.h */,
656581D609D1508D000E61D7 /* JSDOMParser.lut.h */,
1ACE53DD0A8D18810022947D /* JSDOMParser.cpp */,
1ACE53DE0A8D18810022947D /* JSDOMParser.h */,
1403BA0B09EB18C700797C7F /* JSDOMWindow.cpp */,
1403BA0E09EB18F800797C7F /* JSDOMWindow.h */,
65DF31E509D1CC60000BE325 /* JSElement.cpp */,
......@@ -3717,7 +3724,8 @@
65DF31F109D1CC60000BE325 /* JSWheelEvent.cpp */,
65DF31F209D1CC60000BE325 /* JSWheelEvent.h */,
656581D709D1508D000E61D7 /* JSXMLHttpRequest.lut.h */,
656581D809D1508D000E61D7 /* JSXMLSerializer.lut.h */,
1ACE53F40A8D19470022947D /* JSXMLSerializer.cpp */,
1ACE53F50A8D19470022947D /* JSXMLSerializer.h */,
1A762C6B0A074F2600989F5B /* JSXPathEvaluator.cpp */,
1A762C6C0A074F2600989F5B /* JSXPathEvaluator.h */,
1A762C6D0A074F2600989F5B /* JSXPathExpression.cpp */,
......@@ -4914,8 +4922,6 @@
14DFB33F0A7DF7630018F769 /* Derived Sources */,
93F8B3060A300FEA00F61AB8 /* CodeGeneratorJS.pm */,
1A9EF4560A1B957D00332B63 /* JSCanvasRenderingContext2DCustom.cpp */,
93B70D3F09EB0C7C009D8468 /* JSDOMParser.cpp */,
93B70D4009EB0C7C009D8468 /* JSDOMParser.h */,
938E65F609F0985D008A48EC /* JSHTMLElementWrapperFactory.cpp */,
938E65F009F09840008A48EC /* JSHTMLElementWrapperFactory.h */,
A8D065AD0A2446CD005E7203 /* JSHTMLFormElementCustom.cpp */,
......@@ -4926,8 +4932,6 @@
448AD27A0A4813790023D179 /* JSHTMLOptionsCollectionCustom.cpp */,
93B70D4109EB0C7C009D8468 /* JSXMLHttpRequest.cpp */,
93B70D4209EB0C7C009D8468 /* JSXMLHttpRequest.h */,
93B70D4309EB0C7C009D8468 /* JSXMLSerializer.cpp */,
93B70D4409EB0C7C009D8468 /* JSXMLSerializer.h */,
93B70D4509EB0C7C009D8468 /* JSXSLTProcessor.cpp */,
93B70D4609EB0C7C009D8468 /* JSXSLTProcessor.h */,
93B70D4709EB0C7C009D8468 /* kjs_binding.cpp */,
......@@ -5174,6 +5178,12 @@
E1F0424309839389006694EA /* xml */ = {
isa = PBXGroup;
children = (
1ACE53E10A8D18E70022947D /* DOMParser.cpp */,
1ACE53E20A8D18E70022947D /* DOMParser.h */,
1ACE53E30A8D18E70022947D /* DOMParser.idl */,
1ACE53E40A8D18E70022947D /* XMLSerializer.cpp */,
1ACE53E50A8D18E70022947D /* XMLSerializer.h */,
1ACE53E60A8D18E70022947D /* XMLSerializer.idl */,
1AB7FC470A8B92EC00D9D37B /* XPathEvaluator.cpp */,
1AB7FC480A8B92EC00D9D37B /* XPathEvaluator.h */,
1AB7FC490A8B92EC00D9D37B /* XPathEvaluator.idl */,
......@@ -6059,9 +6069,7 @@
656580F409D12B20000E61D7 /* CSSPropertyNames.h in Headers */,
6565815109D13043000E61D7 /* CSSValueKeywords.h in Headers */,
656581B209D14EE6000E61D7 /* UserAgentStyleSheets.h in Headers */,
656581ED09D1508D000E61D7 /* JSDOMParser.lut.h in Headers */,
656581EE09D1508D000E61D7 /* JSXMLHttpRequest.lut.h in Headers */,
656581EF09D1508D000E61D7 /* JSXMLSerializer.lut.h in Headers */,
656581F009D1508D000E61D7 /* JSXSLTProcessor.lut.h in Headers */,
656581F109D1508D000E61D7 /* kjs_css.lut.h in Headers */,
656581F209D1508D000E61D7 /* kjs_dom.lut.h in Headers */,
......@@ -6110,9 +6118,7 @@
659DDC8309E198BA001BF3C6 /* JSDocument.h in Headers */,
930705DA09E0C9BF00B17FE4 /* JSCounter.h in Headers */,
930705EB09E0C9F600B17FE4 /* JSCSSPrimitiveValue.h in Headers */,
93B70D5C09EB0C7C009D8468 /* JSDOMParser.h in Headers */,
93B70D5E09EB0C7C009D8468 /* JSXMLHttpRequest.h in Headers */,
93B70D6009EB0C7C009D8468 /* JSXMLSerializer.h in Headers */,
93B70D6209EB0C7C009D8468 /* JSXSLTProcessor.h in Headers */,
93B70D6409EB0C7C009D8468 /* kjs_binding.h in Headers */,
93B70D6609EB0C7C009D8468 /* kjs_css.h in Headers */,
......@@ -6388,6 +6394,10 @@
1AB7FC840A8B92EC00D9D37B /* XPathUtil.h in Headers */,
1AB7FC860A8B92EC00D9D37B /* XPathValue.h in Headers */,
1AB7FC880A8B92EC00D9D37B /* XPathVariableReference.h in Headers */,
1ACE53E00A8D18810022947D /* JSDOMParser.h in Headers */,
1ACE53E80A8D18E70022947D /* DOMParser.h in Headers */,
1ACE53EB0A8D18E70022947D /* XMLSerializer.h in Headers */,
1ACE53F70A8D19470022947D /* JSXMLSerializer.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -6982,9 +6992,7 @@
930705D809E0C9B700B17FE4 /* JSCounter.cpp in Sources */,
930705E909E0C9F000B17FE4 /* JSCSSPrimitiveValue.cpp in Sources */,
93EB355F09E37FD600F43799 /* MouseEventWithHitTestResults.cpp in Sources */,
93B70D5B09EB0C7C009D8468 /* JSDOMParser.cpp in Sources */,
93B70D5D09EB0C7C009D8468 /* JSXMLHttpRequest.cpp in Sources */,
93B70D5F09EB0C7C009D8468 /* JSXMLSerializer.cpp in Sources */,
93B70D6109EB0C7C009D8468 /* JSXSLTProcessor.cpp in Sources */,
93B70D6309EB0C7C009D8468 /* kjs_binding.cpp in Sources */,
93B70D6509EB0C7C009D8468 /* kjs_css.cpp in Sources */,
......@@ -7259,6 +7267,10 @@
1AB7FC830A8B92EC00D9D37B /* XPathUtil.cpp in Sources */,
1AB7FC850A8B92EC00D9D37B /* XPathValue.cpp in Sources */,
1AB7FC870A8B92EC00D9D37B /* XPathVariableReference.cpp in Sources */,
1ACE53DF0A8D18810022947D /* JSDOMParser.cpp in Sources */,
1ACE53E70A8D18E70022947D /* DOMParser.cpp in Sources */,
1ACE53EA0A8D18E70022947D /* XMLSerializer.cpp in Sources */,
1ACE53F60A8D19470022947D /* JSXMLSerializer.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
// -*- c-basic-offset: 2 -*-
/*
* This file is part of the KDE libraries
* Copyright (C) 2005 Anders Carlsson (andersca@mac.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "JSDOMParser.h"
#include "JSDOMParser.lut.h"
#include "HTMLDocument.h"
#include "DOMImplementation.h"
using namespace WebCore;
////////////////////// JSDOMParser Object ////////////////////////
/* Source for DOMParserProtoTable.
@begin DOMParserProtoTable 1
parseFromString JSDOMParser::ParseFromString DontDelete|Function 2
@end
*/
namespace KJS {
KJS_DEFINE_PROTOTYPE(DOMParserProto)
KJS_IMPLEMENT_PROTOFUNC(DOMParserProtoFunc)
KJS_IMPLEMENT_PROTOTYPE("DOMParser",DOMParserProto,DOMParserProtoFunc)
DOMParserConstructorImp::DOMParserConstructorImp(ExecState *exec, Document *d)
: doc(d)
{
setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
putDirect(prototypePropertyName, DOMParserProto::self(exec), None);
}
bool DOMParserConstructorImp::implementsConstruct() const
{
return true;
}
JSObject *DOMParserConstructorImp::construct(ExecState *exec, const List &)
{
return new JSDOMParser(exec, doc.get());
}
const ClassInfo JSDOMParser::info = { "DOMParser", 0, &DOMParserTable, 0 };
/* Source for DOMParserTable
@begin DOMParserTable 0
@end
*/
JSDOMParser::JSDOMParser(ExecState *exec, Document *d)
: doc(d)
{
setPrototype(DOMParserProto::self(exec));
}
JSValue *DOMParserProtoFunc::callAsFunction(ExecState *exec, JSObject *thisObj, const List &args)
{
if (!thisObj->inherits(&JSDOMParser::info))
return throwError(exec, TypeError);
JSDOMParser *parser = static_cast<JSDOMParser *>(thisObj);
switch (id) {
case JSDOMParser::ParseFromString:
{
if (args.size() != 2)
return jsUndefined();
DeprecatedString str = args[0]->toString(exec);
DeprecatedString contentType = DeprecatedString(args[1]->toString(exec)).stripWhiteSpace();
if (DOMImplementation::isXMLMIMEType(contentType)) {
RefPtr<Document> doc = parser->doc->implementation()->createDocument();
doc->open();
doc->write(str);
doc->finishParsing();
doc->close();
return toJS(exec, doc.get());
}
}
}
return jsUndefined();
}
} // end namespace
......@@ -33,7 +33,6 @@
#include "HTMLDocument.h"
#include "JSCSSRule.h"
#include "JSCSSValue.h"
#include "JSDOMParser.h"
#include "JSDOMWindow.h"
#include "JSEvent.h"
#include "JSHTMLOptionElementConstructor.h"
......@@ -42,7 +41,6 @@
#include "JSNodeFilter.h"
#include "JSRange.h"
#include "JSXMLHttpRequest.h"
#include "JSXMLSerializer.h"
#include "Settings.h"
#include "Logging.h"
#include "Page.h"
......@@ -255,8 +253,6 @@ const ClassInfo Window::info = { "Window", 0, &WindowTable, 0 };
Image Window::Image DontDelete
Option Window::Option DontDelete
XMLHttpRequest Window::XMLHttpRequest DontDelete
XMLSerializer Window::XMLSerializer DontDelete
DOMParser Window::DOMParser_ DontDelete
XSLTProcessor Window::XSLTProcessor_ DontDelete
alert Window::Alert DontDelete|Function 1
confirm Window::Confirm DontDelete|Function 1
......@@ -792,10 +788,6 @@ JSValue *Window::getValueProperty(ExecState *exec, int token) const
return new JSHTMLOptionElementConstructor(exec, m_frame->document());
case XMLHttpRequest:
return new JSXMLHttpRequestConstructorImp(exec, m_frame->document());
case XMLSerializer:
return new JSXMLSerializerConstructorImp(exec);
case DOMParser_:
return new DOMParserConstructorImp(exec, m_frame->document());
#ifdef KHTML_XSLT
case XSLTProcessor_:
return new XSLTProcessorConstructorImp(exec);
......
......@@ -164,7 +164,7 @@ namespace KJS {
Image, Option, Alert, Confirm, Prompt, Open, Print, SetTimeout, ClearTimeout,
Focus, GetSelection, Blur, Close, SetInterval, ClearInterval, CaptureEvents,
ReleaseEvents, AddEventListener, RemoveEventListener,
XMLHttpRequest, XMLSerializer, DOMParser_, XSLTProcessor_,
XMLHttpRequest, XSLTProcessor_,
Onabort, Onblur, Onchange, Onclick, Ondblclick, Ondragdrop, Onerror,
Onfocus, Onkeydown, Onkeypress, Onkeyup, Onload, Onmousedown, Onmousemove,
Onmouseout, Onmouseover, Onmouseup, OnWindowMouseWheel, Onmove, Onreset, Onresize, Onscroll, Onsearch,
......
......@@ -48,6 +48,7 @@ module window {
attribute CSSValueConstructor CSSValue;
attribute DocumentConstructor Document;
attribute DocumentFragmentConstructor DocumentFragment;
attribute DOMParserConstructor DOMParser;
attribute ElementConstructor Element;
attribute EventConstructor Event;
attribute HTMLElementConstructor HTMLElement;
......@@ -61,6 +62,8 @@ module window {
// We just use Document for this.
attribute DocumentConstructor XMLDocument;
attribute XMLSerializerConstructor XMLSerializer;
#ifdef XPATH_SUPPORT
attribute XPathEvaluatorConstructor XPathEvaluator;
attribute XPathResultConstructor XPathResult;
......
// -*- c-basic-offset: 2 -*-
/*
* This file is part of the KDE libraries
* Copyright (C) 2005 Anders Carlsson (andersca@mac.com)
* Copyright (C) 2006 Apple Computer, Inc.
* Copyright (C) 2003, 2006 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -19,35 +17,27 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef DOMPARSER_H
#define DOMPARSER_H_
#include "kjs_dom.h"
namespace KJS {
class DOMParserConstructorImp : public DOMObject {
public:
DOMParserConstructorImp(ExecState*, WebCore::Document*);
virtual bool implementsConstruct() const;
virtual JSObject* construct(ExecState*, const List &args);
private:
RefPtr<WebCore::Document> doc;
};
class JSDOMParser : public DOMObject {
public:
JSDOMParser(ExecState*, WebCore::Document*);
virtual bool toBoolean(ExecState*) const { return true; }
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
enum { ParseFromString };
private:
RefPtr<WebCore::Document> doc;
friend class DOMParserProtoFunc;
};
} // namespace
#endif
#include "config.h"
#include "DOMParser.h"
#include "DOMImplementation.h"
#include "String.h"
namespace WebCore {
PassRefPtr<Document> DOMParser::parseFromString(const String& str, const String& contentType)
{
if (!DOMImplementation::isXMLMIMEType(contentType))
return 0;
RefPtr<Document> doc = DOMImplementation::instance()->createDocument();
doc->open();
doc->write(str);
doc->finishParsing();
doc->close();
return doc.release();
}
}
/*
* This file is part of the KDE libraries
* Copyright (C) 2003, 2006 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef DOMParser_H
#define DOMParser_H
#include "Shared.h"
#include "Document.h"
namespace WebCore {
class String;
class DOMParser : public Shared<DOMParser> {
public:
PassRefPtr<Document> parseFromString(const String& str, const String& contentType);
};
}
#endif // XMLSerializer.h
/*
* Copyright (C) 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.
*/
module xpath {
interface [GenerateConstructor, CanBeConstructed] DOMParser {
Document parseFromString(in DOMString str, in DOMString contentType);
};
}
// -*- c-basic-offset: 2 -*-
/*
* This file is part of the KDE libraries
* Copyright (C) 2003 Apple Computer, Inc.
* Copyright (C) 2003, 2006 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -18,33 +17,21 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef JSXMLSerializer_H
#define JSXMLSerializer_H
#include "config.h"
#include "XMLSerializer.h"
#include "kjs_binding.h"
namespace KJS {
class JSEventListener;
}
#include "Document.h"
#include "DeprecatedString.h"
#include "markup.h"
namespace WebCore {
class JSXMLSerializerConstructorImp : public KJS::DOMObject {
public:
JSXMLSerializerConstructorImp(KJS::ExecState*);
virtual bool implementsConstruct() const;
virtual KJS::JSObject* construct(KJS::ExecState*, const KJS::List& args);
};
class JSXMLSerializer : public KJS::DOMObject {
public:
JSXMLSerializer(KJS::ExecState*);
virtual bool toBoolean(KJS::ExecState*) const { return true; }
virtual const KJS::ClassInfo* classInfo() const { return &info; }
static const KJS::ClassInfo info;
enum { SerializeToString };
};
} // namespace
String XMLSerializer::serializeToString(Node* node)
{
if (!node)
return String();
return createMarkup(node);
}
#endif
}
// -*- c-basic-offset: 2 -*-
/*
* This file is part of the KDE libraries
* Copyright (C) 2003 Apple Computer, Inc.
* Copyright (C) 2003, 2006 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -18,74 +17,19 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "JSXMLSerializer.h"
#include "JSXMLSerializer.lut.h"
#ifndef XMLSerializer_H
#define XMLSerializer_H
#include "DeprecatedString.h"
#include "Shared.h"
#include "PlatformString.h"
#include "kjs_dom.h"
#include "markup.h"
using namespace KJS;
namespace WebCore {
/* Source for JSXMLSerializerProtoTable.
@begin JSXMLSerializerProtoTable 1
serializeToString WebCore::JSXMLSerializer::SerializeToString DontDelete|Function 1
@end
*/
KJS_DEFINE_PROTOTYPE(JSXMLSerializerProto)
KJS_IMPLEMENT_PROTOFUNC(JSXMLSerializerProtoFunc)
KJS_IMPLEMENT_PROTOTYPE("XMLSerializer", JSXMLSerializerProto, JSXMLSerializerProtoFunc)
JSXMLSerializerConstructorImp::JSXMLSerializerConstructorImp(ExecState* exec)
{
setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
putDirect(prototypePropertyName, JSXMLSerializerProto::self(exec), None);
}
bool JSXMLSerializerConstructorImp::implementsConstruct() const
{
return true;
}