+2006-05-15 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by ggaren.
+
+ Split dom_xmlimpl.* into separate files (one per class).
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/Entity.cpp: Added.
+ (WebCore::Entity::Entity):
+ * dom/Entity.h: Added.
+ * dom/EntityReference.cpp: Added.
+ (WebCore::EntityReference::EntityReference):
+ * dom/EntityReference.h: Added.
+ * dom/Notation.cpp: Added.
+ (WebCore::Notation::Notation):
+ * dom/Notation.h: Added.
+ * dom/ProcessingInstruction.cpp: Added.
+ (WebCore::ProcessingInstruction::ProcessingInstruction):
+ * dom/ProcessingInstruction.h: Added.
+ * dom/dom_xmlimpl.cpp: Removed.
+ * dom/dom_xmlimpl.h: Removed.
+
2006-05-15 Eric Seidel <eseidel@apple.com>
Reviewed by Tim Hatcher.
<File\r
RelativePath="..\..\dom\dom2_traversalimpl.h"\r
>\r
+ </File> \r
+ <File\r
+ RelativePath="..\..\dom\EntityReference.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\..\dom\EntityReference.h"\r
+ >\r
</File>\r
<File\r
- RelativePath="..\..\dom\dom_xmlimpl.cpp"\r
+ RelativePath="..\..\dom\Entity.cpp"\r
>\r
</File>\r
<File\r
- RelativePath="..\..\dom\dom_xmlimpl.h"\r
+ RelativePath="..\..\dom\Entity.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\..\dom\Notation.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\..\dom\Notation.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\..\dom\ProcessingInstruction.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath="..\..\dom\ProcessingInstruction.h"\r
>\r
</File>\r
<File\r
RelativePath="..\..\html\HTMLDivElement.h"\r
>\r
</File>\r
-\r
<File\r
RelativePath="..\..\html\HTMLMapElement.cpp"\r
>\r
93F1991708245E59001E9ABC /* dom2_eventsimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D30202DE4476018635CA /* dom2_eventsimpl.h */; };
93F1991808245E59001E9ABC /* Range.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D30402DE4476018635CA /* Range.h */; };
93F1991908245E59001E9ABC /* dom2_traversalimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D30602DE4476018635CA /* dom2_traversalimpl.h */; };
- 93F1992008245E59001E9ABC /* dom_xmlimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D30002DE4476018635CA /* dom_xmlimpl.h */; };
93F1992108245E59001E9ABC /* xml_tokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D30A02DE4476018635CA /* xml_tokenizer.h */; };
93F1992908245E59001E9ABC /* KWQCString.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868302DE3B8601EA4122 /* KWQCString.h */; };
93F1992E08245E59001E9ABC /* KWQComboBox.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868202DE3B8601EA4122 /* KWQComboBox.h */; };
93F19A9B08245E59001E9ABC /* HTMLParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D25002DE4396018635CA /* HTMLParser.cpp */; };
93F19A9C08245E59001E9ABC /* HTMLTokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D25202DE4396018635CA /* HTMLTokenizer.cpp */; };
93F19A9D08245E59001E9ABC /* Decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D27802DE43D7018635CA /* Decoder.cpp */; };
- 93F19AB708245E59001E9ABC /* dom_xmlimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D2FF02DE4476018635CA /* dom_xmlimpl.cpp */; };
93F19AB808245E59001E9ABC /* dom2_eventsimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D30102DE4476018635CA /* dom2_eventsimpl.cpp */; };
93F19AB908245E59001E9ABC /* Range.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D30302DE4476018635CA /* Range.cpp */; };
93F19ABA08245E59001E9ABC /* dom2_traversalimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D30502DE4476018635CA /* dom2_traversalimpl.cpp */; };
A8EA7D300A19385500A8EF5F /* HTMLImageLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8EA7D280A19385500A8EF5F /* HTMLImageLoader.cpp */; };
A8EA7D310A19385500A8EF5F /* HTMLImageElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8EA7D290A19385500A8EF5F /* HTMLImageElement.cpp */; };
A8EA7D320A19385500A8EF5F /* HTMLMapElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8EA7D2A0A19385500A8EF5F /* HTMLMapElement.cpp */; };
+ A8EA7EBC0A1945D000A8EF5F /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = A8EA7EB40A1945D000A8EF5F /* ProcessingInstruction.h */; };
+ A8EA7EBD0A1945D000A8EF5F /* ProcessingInstruction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8EA7EB50A1945D000A8EF5F /* ProcessingInstruction.cpp */; };
+ A8EA7EBE0A1945D000A8EF5F /* Notation.h in Headers */ = {isa = PBXBuildFile; fileRef = A8EA7EB60A1945D000A8EF5F /* Notation.h */; };
+ A8EA7EBF0A1945D000A8EF5F /* Notation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8EA7EB70A1945D000A8EF5F /* Notation.cpp */; };
+ A8EA7EC00A1945D000A8EF5F /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = A8EA7EB80A1945D000A8EF5F /* EntityReference.h */; };
+ A8EA7EC10A1945D000A8EF5F /* EntityReference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8EA7EB90A1945D000A8EF5F /* EntityReference.cpp */; };
+ A8EA7EC20A1945D000A8EF5F /* Entity.h in Headers */ = {isa = PBXBuildFile; fileRef = A8EA7EBA0A1945D000A8EF5F /* Entity.h */; };
+ A8EA7EC30A1945D000A8EF5F /* Entity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8EA7EBB0A1945D000A8EF5F /* Entity.cpp */; };
A8FD8B86087CB44C00DC3707 /* KWQWMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A85D7A8C0879EC64006A9172 /* KWQWMatrix.cpp */; };
A8FD8B87087CB45700DC3707 /* KWQWMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = A85D7A8D0879EC64006A9172 /* KWQWMatrix.h */; };
A8FEFB0A0979F472005839FD /* RenderForeignObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A8FEFB080979F472005839FD /* RenderForeignObject.h */; };
A8EA7D280A19385500A8EF5F /* HTMLImageLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLImageLoader.cpp; sourceTree = "<group>"; };
A8EA7D290A19385500A8EF5F /* HTMLImageElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLImageElement.cpp; sourceTree = "<group>"; };
A8EA7D2A0A19385500A8EF5F /* HTMLMapElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLMapElement.cpp; sourceTree = "<group>"; };
+ A8EA7EB40A1945D000A8EF5F /* ProcessingInstruction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProcessingInstruction.h; sourceTree = "<group>"; };
+ A8EA7EB50A1945D000A8EF5F /* ProcessingInstruction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessingInstruction.cpp; sourceTree = "<group>"; };
+ A8EA7EB60A1945D000A8EF5F /* Notation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Notation.h; sourceTree = "<group>"; };
+ A8EA7EB70A1945D000A8EF5F /* Notation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Notation.cpp; sourceTree = "<group>"; };
+ A8EA7EB80A1945D000A8EF5F /* EntityReference.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EntityReference.h; sourceTree = "<group>"; };
+ A8EA7EB90A1945D000A8EF5F /* EntityReference.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = EntityReference.cpp; sourceTree = "<group>"; };
+ A8EA7EBA0A1945D000A8EF5F /* Entity.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Entity.h; sourceTree = "<group>"; };
+ A8EA7EBB0A1945D000A8EF5F /* Entity.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Entity.cpp; sourceTree = "<group>"; };
A8FEFB080979F472005839FD /* RenderForeignObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderForeignObject.h; sourceTree = "<group>"; };
A8FEFB090979F472005839FD /* RenderForeignObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderForeignObject.cpp; sourceTree = "<group>"; };
A8FEFB2F0979F4F6005839FD /* SVGForeignObjectElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGForeignObjectElement.cpp; sourceTree = "<group>"; };
F523D25302DE4396018635CA /* HTMLTokenizer.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = HTMLTokenizer.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F523D27802DE43D7018635CA /* Decoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Decoder.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F523D27902DE43D7018635CA /* Decoder.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Decoder.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- F523D2FF02DE4476018635CA /* dom_xmlimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dom_xmlimpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- F523D30002DE4476018635CA /* dom_xmlimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = dom_xmlimpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F523D30102DE4476018635CA /* dom2_eventsimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dom2_eventsimpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F523D30202DE4476018635CA /* dom2_eventsimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = dom2_eventsimpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F523D30302DE4476018635CA /* Range.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Range.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
6548E24809E1E04D00AF8020 /* Document.idl */,
A8185F3709765765005826D9 /* DocumentFragment.cpp */,
A8185F3509765765005826D9 /* DocumentFragment.h */,
+ 1A494ED50A123F1A00FDAFC1 /* DocumentFragment.idl */,
ED2BA83B09A24B91006C0AC4 /* DocumentMarker.h */,
A8185F3209765765005826D9 /* DocumentType.cpp */,
A8185F3109765765005826D9 /* DocumentType.h */,
F523D30202DE4476018635CA /* dom2_eventsimpl.h */,
F523D30502DE4476018635CA /* dom2_traversalimpl.cpp */,
F523D30602DE4476018635CA /* dom2_traversalimpl.h */,
- F523D2FF02DE4476018635CA /* dom_xmlimpl.cpp */,
- F523D30002DE4476018635CA /* dom_xmlimpl.h */,
A8185F3609765765005826D9 /* DOMImplementation.cpp */,
A8185F3309765765005826D9 /* DOMImplementation.h */,
93EEC1E909C2877700C515D1 /* DOMImplementation.idl */,
A8C4A7F609D563270003AC8D /* Element.cpp */,
A8C4A7F509D563270003AC8D /* Element.h */,
93EEC1EA09C2877700C515D1 /* Element.idl */,
+ A8EA7EBB0A1945D000A8EF5F /* Entity.cpp */,
+ A8EA7EBA0A1945D000A8EF5F /* Entity.h */,
93EEC1EB09C2877700C515D1 /* Entity.idl */,
+ A8EA7EB90A1945D000A8EF5F /* EntityReference.cpp */,
+ A8EA7EB80A1945D000A8EF5F /* EntityReference.h */,
+ 14E836D209F8512000B85AE4 /* Event.idl */,
935FBC4409BA00B900E230B1 /* EventListener.h */,
939885C108B7E3D100E707C4 /* EventNames.cpp */,
939885C208B7E3D100E707C4 /* EventNames.h */,
A81872130977D3C0005826D9 /* NameNodeList.h */,
A8C4A7EE09D563270003AC8D /* Node.cpp */,
14115B5109F84B7100CA4FC1 /* Node.h */,
+ 14DC0D0B09FECFA4007B0235 /* Node.idl */,
14115AF909F847D600CA4FC1 /* NodeFilter.idl */,
A81872160977D3C0005826D9 /* NodeList.cpp */,
A81872100977D3C0005826D9 /* NodeList.h */,
+ A8EA7EB70A1945D000A8EF5F /* Notation.cpp */,
+ A8EA7EB60A1945D000A8EF5F /* Notation.h */,
93EEC1F409C2877700C515D1 /* Notation.idl */,
BE91FC8C06133666005E3790 /* Position.cpp */,
BE91FC8B06133666005E3790 /* Position.h */,
+ A8EA7EB50A1945D000A8EF5F /* ProcessingInstruction.cpp */,
+ A8EA7EB40A1945D000A8EF5F /* ProcessingInstruction.h */,
93EEC1F509C2877700C515D1 /* ProcessingInstruction.idl */,
550A0BC7085F6039007353D6 /* QualifiedName.cpp */,
550A0BC8085F6039007353D6 /* QualifiedName.h */,
93EEC1F709C2877700C515D1 /* WheelEvent.idl */,
F523D30902DE4476018635CA /* xml_tokenizer.cpp */,
F523D30A02DE4476018635CA /* xml_tokenizer.h */,
- 14E836D209F8512000B85AE4 /* Event.idl */,
- 14DC0D0B09FECFA4007B0235 /* Node.idl */,
- 1A494ED50A123F1A00FDAFC1 /* DocumentFragment.idl */,
);
path = dom;
sourceTree = "<group>";
93F1991708245E59001E9ABC /* dom2_eventsimpl.h in Headers */,
93F1991808245E59001E9ABC /* Range.h in Headers */,
93F1991908245E59001E9ABC /* dom2_traversalimpl.h in Headers */,
- 93F1992008245E59001E9ABC /* dom_xmlimpl.h in Headers */,
93F1992108245E59001E9ABC /* xml_tokenizer.h in Headers */,
93F1992908245E59001E9ABC /* KWQCString.h in Headers */,
93F1992E08245E59001E9ABC /* KWQComboBox.h in Headers */,
A8EA7D2C0A19385500A8EF5F /* HTMLMapElement.h in Headers */,
A8EA7D2D0A19385500A8EF5F /* HTMLImageElement.h in Headers */,
A8EA7D2E0A19385500A8EF5F /* HTMLAreaElement.h in Headers */,
+ A8EA7EBC0A1945D000A8EF5F /* ProcessingInstruction.h in Headers */,
+ A8EA7EBE0A1945D000A8EF5F /* Notation.h in Headers */,
+ A8EA7EC00A1945D000A8EF5F /* EntityReference.h in Headers */,
+ A8EA7EC20A1945D000A8EF5F /* Entity.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
93F19A9B08245E59001E9ABC /* HTMLParser.cpp in Sources */,
93F19A9C08245E59001E9ABC /* HTMLTokenizer.cpp in Sources */,
93F19A9D08245E59001E9ABC /* Decoder.cpp in Sources */,
- 93F19AB708245E59001E9ABC /* dom_xmlimpl.cpp in Sources */,
93F19AB808245E59001E9ABC /* dom2_eventsimpl.cpp in Sources */,
93F19AB908245E59001E9ABC /* Range.cpp in Sources */,
93F19ABA08245E59001E9ABC /* dom2_traversalimpl.cpp in Sources */,
A8EA7D300A19385500A8EF5F /* HTMLImageLoader.cpp in Sources */,
A8EA7D310A19385500A8EF5F /* HTMLImageElement.cpp in Sources */,
A8EA7D320A19385500A8EF5F /* HTMLMapElement.cpp in Sources */,
+ A8EA7EBD0A1945D000A8EF5F /* ProcessingInstruction.cpp in Sources */,
+ A8EA7EBF0A1945D000A8EF5F /* Notation.cpp in Sources */,
+ A8EA7EC10A1945D000A8EF5F /* EntityReference.cpp in Sources */,
+ A8EA7EC30A1945D000A8EF5F /* Entity.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
#include "DocumentFragment.h"
#include "DocumentType.h"
#include "Element.h"
-#include "ExceptionCode.h"
+#include "Entity.h"
#include "EventNames.h"
+#include "ExceptionCode.h"
#include "Frame.h"
+#include "HTMLDocument.h"
+#include "HTMLNames.h"
#include "HTMLPlugInElement.h"
#include "JSAttr.h"
-#include "JSElement.h"
#include "JSCharacterData.h"
#include "JSDOMImplementation.h"
#include "JSDocumentFragment.h"
#include "JSDocumentType.h"
+#include "JSElement.h"
#include "JSEntity.h"
#include "JSHTMLDocument.h"
+#include "JSHTMLElementWrapperFactory.h"
#include "JSNode.h"
#include "JSNotation.h"
#include "JSProcessingInstruction.h"
#include "JSRange.h"
#include "JSText.h"
+#include "KWQKHTMLSettings.h"
#include "NamedNodeMap.h"
+#include "Notation.h"
+#include "ProcessingInstruction.h"
+#include "Range.h"
+#include "RenderCanvas.h"
#include "css_ruleimpl.h"
#include "css_stylesheetimpl.h"
#include "dom2_eventsimpl.h"
-#include "Range.h"
-#include "dom_xmlimpl.h"
-#include "HTMLDocument.h"
-#include "JSHTMLElementWrapperFactory.h"
-#include "HTMLNames.h"
-#include "KWQKHTMLSettings.h"
#include "kjs_css.h"
#include "kjs_events.h"
#include "kjs_traversal.h"
#include "kjs_window.h"
-#include "RenderCanvas.h"
+
#if __APPLE__
#include <JavaScriptCore/runtime_object.h>
{
if (!val || !val->isObject(&DOMEventTargetNode::info))
return 0;
- return static_cast<EventTargetNode*>(static_cast<DOMEventTargetNode *>(val)->impl());
+ return static_cast<EventTargetNode*>(static_cast<DOMEventTargetNode*>(val)->impl());
}
WebCore::Node* toNode(JSValue* val)
{
if (!val || !val->isObject(&DOMNode::info))
return 0;
- return static_cast<DOMNode *>(val)->impl();
+ return static_cast<DOMNode*>(val)->impl();
}
// -------------------------------------------------------------------------
JSValue *DOMNodeList::indexGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
{
- DOMNodeList *thisObj = static_cast<DOMNodeList *>(slot.slotBase());
+ DOMNodeList *thisObj = static_cast<DOMNodeList*>(slot.slotBase());
return toJS(exec, thisObj->m_impl->item(slot.index()));
}
JSValue *DOMNodeList::nameGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
{
- DOMNodeList *thisObj = static_cast<DOMNodeList *>(slot.slotBase());
+ DOMNodeList *thisObj = static_cast<DOMNodeList*>(slot.slotBase());
return toJS(exec, thisObj->m_impl->itemById(propertyName));
}
{
if (!thisObj->inherits(&KJS::DOMNodeList::info))
return throwError(exec, TypeError);
- WebCore::NodeList &list = *static_cast<DOMNodeList *>(thisObj)->impl();
+ WebCore::NodeList &list = *static_cast<DOMNodeList*>(thisObj)->impl();
if (id == DOMNodeList::Item)
return toJS(exec, list.item(args[0]->toInt32(exec)));
}
ok = true;
- return static_cast<Attr *>(static_cast<DOMNode *>(val)->impl());
+ return static_cast<Attr*>(static_cast<DOMNode*>(val)->impl());
}
Element *toElement(JSValue *val)
{
if (!val || !val->isObject(&JSElement::info))
return 0;
- return static_cast<Element *>(static_cast<JSElement *>(val)->impl());
+ return static_cast<Element*>(static_cast<JSElement*>(val)->impl());
}
DocumentType *toDocumentType(JSValue *val)
{
if (!val || !val->isObject(&JSDocumentType::info))
return 0;
- return static_cast<DocumentType *>(static_cast<DOMNode *>(val)->impl());
+ return static_cast<DocumentType*>(static_cast<DOMNode*>(val)->impl());
}
// -------------------------------------------------------------------------
} else {
// Look in the prototype (for functions) before assuming it's an item's name
JSValue *proto = prototype();
- if (proto->isObject() && static_cast<JSObject *>(proto)->hasProperty(exec, propertyName))
+ if (proto->isObject() && static_cast<JSObject*>(proto)->hasProperty(exec, propertyName))
return false;
// name or index ?
return jsNull();
JSDocument *ret = 0;
- ScriptInterpreter* interp = static_cast<ScriptInterpreter *>(exec->dynamicInterpreter());
+ ScriptInterpreter* interp = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter());
- if ((ret = static_cast<JSDocument *>(interp->getDOMObject(n))))
+ if ((ret = static_cast<JSDocument*>(interp->getDOMObject(n))))
return ret;
if (n->isHTMLDocument())
- ret = new WebCore::JSHTMLDocument(exec, static_cast<HTMLDocument *>(n));
+ ret = new WebCore::JSHTMLDocument(exec, static_cast<HTMLDocument*>(n));
else
ret = new JSDocument(exec, n);
DOMNode *ret = 0;
if (!n)
return jsNull();
- ScriptInterpreter* interp = static_cast<ScriptInterpreter *>(exec->dynamicInterpreter());
+ ScriptInterpreter* interp = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter());
Document *doc = n->document();
if ((ret = interp->getDOMNodeForDocument(doc, n)))
if (n->isHTMLElement())
ret = createJSWrapper(exec, static_pointer_cast<WebCore::HTMLElement>(node));
else
- ret = new JSElement(exec, static_cast<Element *>(n));
+ ret = new JSElement(exec, static_cast<Element*>(n));
break;
case WebCore::Node::ATTRIBUTE_NODE:
- ret = new JSAttr(exec, static_cast<Attr *>(n));
+ ret = new JSAttr(exec, static_cast<Attr*>(n));
break;
case WebCore::Node::TEXT_NODE:
case WebCore::Node::CDATA_SECTION_NODE:
- ret = new JSText(exec, static_cast<Text *>(n));
+ ret = new JSText(exec, static_cast<Text*>(n));
break;
case WebCore::Node::ENTITY_NODE:
- ret = new JSEntity(exec, static_cast<Entity *>(n));
+ ret = new JSEntity(exec, static_cast<Entity*>(n));
break;
case WebCore::Node::PROCESSING_INSTRUCTION_NODE:
- ret = new JSProcessingInstruction(exec, static_cast<ProcessingInstruction *>(n));
+ ret = new JSProcessingInstruction(exec, static_cast<ProcessingInstruction*>(n));
break;
case WebCore::Node::COMMENT_NODE:
- ret = new JSCharacterData(exec, static_cast<CharacterData *>(n));
+ ret = new JSCharacterData(exec, static_cast<CharacterData*>(n));
break;
case WebCore::Node::DOCUMENT_NODE:
// we don't want to cache the document itself in the per-document dictionary
- return toJS(exec, static_cast<Document *>(n));
+ return toJS(exec, static_cast<Document*>(n));
case WebCore::Node::DOCUMENT_TYPE_NODE:
- ret = new JSDocumentType(exec, static_cast<DocumentType *>(n));
+ ret = new JSDocumentType(exec, static_cast<DocumentType*>(n));
break;
case WebCore::Node::NOTATION_NODE:
- ret = new JSNotation(exec, static_cast<Notation *>(n));
+ ret = new JSNotation(exec, static_cast<Notation*>(n));
break;
case WebCore::Node::DOCUMENT_FRAGMENT_NODE:
ret = new JSDocumentFragment(exec, static_cast<DocumentFragment*>(n));
JSValue *DOMNamedNodesCollection::lengthGetter(ExecState* exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
{
- DOMNamedNodesCollection *thisObj = static_cast<DOMNamedNodesCollection *>(slot.slotBase());
+ DOMNamedNodesCollection *thisObj = static_cast<DOMNamedNodesCollection*>(slot.slotBase());
return jsNumber(thisObj->m_nodes.count());
}
JSValue *DOMNamedNodesCollection::indexGetter(ExecState* exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
{
- DOMNamedNodesCollection *thisObj = static_cast<DOMNamedNodesCollection *>(slot.slotBase());
+ DOMNamedNodesCollection *thisObj = static_cast<DOMNamedNodesCollection*>(slot.slotBase());
return toJS(exec, thisObj->m_nodes[slot.index()].get());
}
#import "DocumentFragment.h"
#import "Document.h"
#import "DocumentType.h"
+#import "Entity.h"
+#import "EntityReference.h"
#import "EventListener.h"
#import "FoundationExtras.h"
#import "FrameMac.h"
#import "NodeList.h"
+#import "Notation.h"
+#import "ProcessingInstruction.h"
#import "css_stylesheetimpl.h"
#import "csshelper.h"
#import "Range.h"
-#import "dom_xmlimpl.h"
#import "HTMLNames.h"
#import "QualifiedName.h"
#import "RenderImage.h"
#import "FoundationExtras.h"
#import "HTMLLinkElement.h"
#import "HTMLStyleElement.h"
+#import "ProcessingInstruction.h"
#import "css_ruleimpl.h"
#import "css_stylesheetimpl.h"
-#import "dom_xmlimpl.h"
#import <objc/objc-class.h>
using namespace WebCore;
# When we're finished with the one-file-per-class
# reorganization, we don't need these special cases.
- if ($type eq "Attr" or
- $type eq "CDATASection" or
- $type eq "CanvasPattern" or
- $type eq "CharacterData" or
- $type eq "Comment" or
- $type eq "DOMException" or
- $type eq "DOMImplementation" or
- $type eq "DOMWindow" or
- $type eq "Document" or
- $type eq "DocumentFragment" or
- $type eq "DocumentType" or
- $type eq "Element" or
- $type eq "HTMLCanvasElement" or
- $type eq "HTMLElement" or
- $type eq "Node" or
- $type eq "NodeList" or
- $type eq "Range" or
- $type eq "Text" or
- $type eq "XPathEvaluator" or
- $type eq "XPathExpression" or
- $type eq "XPathNSResolver" or
- $type eq "XPathResult") {
- $implIncludes{"${type}.h"} = 1;
- } elsif ($type eq "CSSStyleSheet" or $type eq "StyleSheet") {
+ if ($type eq "CSSStyleSheet" or $type eq "StyleSheet") {
$implIncludes{"css_stylesheetimpl.h"} = 1;
} elsif ($type eq "CSSRuleList" or
$type eq "CSSRule") {
$type eq "NodeFilter" or
$type eq "TreeWalker") {
$implIncludes{"dom2_traversalimpl.h"} = 1;
- } elsif ($type eq "ProcessingInstruction" or
- $type eq "Entity" or
- $type eq "EntityReference" or
- $type eq "Notation") {
- $implIncludes{"dom_xmlimpl.h"} = 1;
} elsif ($type eq "CanvasRenderingContext2D") {
$implIncludes{"CanvasGradient.h"} = 1;
$implIncludes{"CanvasPattern.h"} = 1;
$implIncludes{"PlatformString.h"} = 1;
} elsif ($codeGenerator->IsPrimitiveType($type) or
$type eq "DOMString" or $type eq "DOMObject") {
- # Do nothing
} else {
- die "Don't know what to include for interface $type";
+ # default, include the same named file
+ $implIncludes{"${type}.h"} = 1;
}
}
#include "DocumentFragment.h"
#include "DocumentType.h"
#include "EditingText.h"
+#include "EntityReference.h"
#include "EventListener.h"
#include "EventNames.h"
#include "ExceptionCode.h"
#include "MouseEventWithHitTestResults.h"
#include "NameNodeList.h"
#include "PlatformKeyboardEvent.h"
+#include "ProcessingInstruction.h"
#include "RegularExpression.h"
#include "RenderArena.h"
#include "RenderCanvas.h"
#include "csshelper.h"
#include "cssstyleselector.h"
#include "dom2_eventsimpl.h"
-#include "dom_xmlimpl.h"
#include "kjs_binding.h"
#include "kjs_proxy.h"
#include "xml_tokenizer.h"
--- /dev/null
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2000 Peter Kelly (pmk@post.com)
+ * 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.
+ */
+#include "config.h"
+#include "Entity.h"
+
+namespace WebCore {
+
+Entity::Entity(Document* doc)
+ : ContainerNode(doc)
+{
+}
+
+Entity::Entity(Document* doc, const String& name)
+ : ContainerNode(doc)
+ , m_name(name.impl())
+{
+}
+
+Entity::Entity(Document* doc, const String& publicId, const String& systemId, const String& notationName)
+ : ContainerNode(doc)
+ , m_publicId(publicId.impl())
+ , m_systemId(systemId.impl())
+ , m_notationName(notationName.impl())
+{
+}
+
+String Entity::nodeName() const
+{
+ return m_name.get();
+}
+
+Node::NodeType Entity::nodeType() const
+{
+ return ENTITY_NODE;
+}
+
+PassRefPtr<Node> Entity::cloneNode(bool /*deep*/)
+{
+ // Spec says cloning Entity nodes is "implementation dependent". We do not support it.
+ return 0;
+}
+
+// DOM Section 1.1.1
+bool Entity::childTypeAllowed(NodeType type)
+{
+ switch (type) {
+ case ELEMENT_NODE:
+ case PROCESSING_INSTRUCTION_NODE:
+ case COMMENT_NODE:
+ case TEXT_NODE:
+ case CDATA_SECTION_NODE:
+ case ENTITY_REFERENCE_NODE:
+ return true;
+ break;
+ default:
+ return false;
+ }
+}
+
+String Entity::toString() const
+{
+ String result = "<!ENTITY' ";
+
+ if (m_name && m_name->length()) {
+ result += " ";
+ result += m_name.get();
+ }
+
+ if (m_publicId && m_publicId->length()) {
+ result += " PUBLIC \"";
+ result += m_publicId.get();
+ result += "\" \"";
+ result += m_systemId.get();
+ result += "\"";
+ } else if (m_systemId && m_systemId->length()) {
+ result += " SYSTEM \"";
+ result += m_systemId.get();
+ result += "\"";
+ }
+
+ if (m_notationName && m_notationName->length()) {
+ result += " NDATA ";
+ result += m_notationName.get();
+ }
+
+ result += ">";
+
+ return result;
+}
+
+} // namespace
--- /dev/null
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2000 Peter Kelly (pmk@post.com)
+ * 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.
+ *
+ */
+
+#ifndef Entity_H
+#define Entity_H
+
+#include "ContainerNode.h"
+
+namespace WebCore {
+
+class Entity : public ContainerNode
+{
+public:
+ Entity(Document*);
+ Entity(Document*, const String& name);
+ Entity(Document*, const String& publicId, const String& systemId, const String& notationName);
+
+ // DOM methods & attributes for Entity
+ String publicId() const { return m_publicId.get(); }
+ String systemId() const { return m_systemId.get(); }
+ String notationName() const { return m_notationName.get(); }
+
+ virtual String nodeName() const;
+ virtual NodeType nodeType() const;
+ virtual PassRefPtr<Node> cloneNode(bool deep);
+ virtual bool childTypeAllowed(NodeType);
+ virtual String toString() const;
+
+private:
+ RefPtr<StringImpl> m_publicId;
+ RefPtr<StringImpl> m_systemId;
+ RefPtr<StringImpl> m_notationName;
+ RefPtr<StringImpl> m_name;
+};
+
+} //namespace
+
+#endif
--- /dev/null
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2000 Peter Kelly (pmk@post.com)
+ * 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.
+ */
+#include "config.h"
+#include "EntityReference.h"
+
+namespace WebCore {
+
+EntityReference::EntityReference(Document* doc)
+ : ContainerNode(doc)
+{
+}
+
+EntityReference::EntityReference(Document* doc, StringImpl* entityName)
+ : ContainerNode(doc)
+ , m_entityName(entityName)
+{
+}
+
+String EntityReference::nodeName() const
+{
+ return m_entityName.get();
+}
+
+Node::NodeType EntityReference::nodeType() const
+{
+ return ENTITY_REFERENCE_NODE;
+}
+
+PassRefPtr<Node> EntityReference::cloneNode(bool deep)
+{
+ RefPtr<EntityReference> clone = new EntityReference(document(), m_entityName.get());
+ // ### make sure children are readonly
+ // ### since we are a reference, should we clone children anyway (even if not deep?)
+ if (deep)
+ cloneChildNodes(clone.get());
+ return clone.release();
+}
+
+// DOM Section 1.1.1
+bool EntityReference::childTypeAllowed(NodeType type)
+{
+ switch (type) {
+ case ELEMENT_NODE:
+ case PROCESSING_INSTRUCTION_NODE:
+ case COMMENT_NODE:
+ case TEXT_NODE:
+ case CDATA_SECTION_NODE:
+ case ENTITY_REFERENCE_NODE:
+ return true;
+ break;
+ default:
+ return false;
+ }
+}
+
+String EntityReference::toString() const
+{
+ String result = "&";
+ result += m_entityName.get();
+ result += ";";
+
+ return result;
+}
+
+} // namespace
--- /dev/null
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2000 Peter Kelly (pmk@post.com)
+ * 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.
+ *
+ */
+
+#ifndef EntityReference_H
+#define EntityReference_H
+
+#include "ContainerNode.h"
+
+namespace WebCore {
+
+class EntityReference : public ContainerNode
+{
+public:
+ EntityReference(Document*);
+ EntityReference(Document*, StringImpl* entityName);
+
+ virtual String nodeName() const;
+ virtual NodeType nodeType() const;
+ virtual PassRefPtr<Node> cloneNode(bool deep);
+ virtual bool childTypeAllowed(NodeType);
+ virtual String toString() const;
+
+private:
+ RefPtr<StringImpl> m_entityName;
+};
+
+} //namespace
+
+#endif
--- /dev/null
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2000 Peter Kelly (pmk@post.com)
+ * 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.
+ */
+#include "config.h"
+#include "Notation.h"
+
+namespace WebCore {
+
+Notation::Notation(Document* doc) : ContainerNode(doc)
+{
+}
+
+Notation::Notation(Document* doc, const String& name, const String& publicId, const String& systemId)
+ : ContainerNode(doc)
+ , m_name(name.impl())
+ , m_publicId(publicId.impl())
+ , m_systemId(systemId.impl())
+{
+}
+
+String Notation::nodeName() const
+{
+ return m_name.get();
+}
+
+Node::NodeType Notation::nodeType() const
+{
+ return NOTATION_NODE;
+}
+
+PassRefPtr<Node> Notation::cloneNode(bool /*deep*/)
+{
+ // Spec says cloning Notation nodes is "implementation dependent". We do not support it.
+ return 0;
+}
+
+// DOM Section 1.1.1
+bool Notation::childTypeAllowed(NodeType)
+{
+ return false;
+}
+
+} // namespace
--- /dev/null
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2000 Peter Kelly (pmk@post.com)
+ * 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.
+ *
+ */
+
+#ifndef Notation_H
+#define Notation_H
+
+#include "CachedObjectClient.h"
+#include "ContainerNode.h"
+
+namespace WebCore {
+
+class Notation : public ContainerNode
+{
+public:
+ Notation(Document*);
+ Notation(Document*, const String& name, const String& publicId, const String& systemId);
+
+ // DOM methods & attributes for Notation
+ String publicId() const { return m_publicId.get(); }
+ String systemId() const { return m_systemId. get(); }
+
+ virtual String nodeName() const;
+ virtual NodeType nodeType() const;
+ virtual PassRefPtr<Node> cloneNode(bool deep);
+ virtual bool childTypeAllowed(NodeType);
+
+private:
+ RefPtr<StringImpl> m_name;
+ RefPtr<StringImpl> m_publicId;
+ RefPtr<StringImpl> m_systemId;
+};
+
+} //namespace
+
+#endif
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
-
#include "config.h"
-#include "dom_xmlimpl.h"
+#include "ProcessingInstruction.h"
#include "CachedCSSStyleSheet.h"
#include "CachedXSLStyleSheet.h"
-#include "DocLoader.h"
#include "Document.h"
+#include "DocLoader.h"
#include "ExceptionCode.h"
-#include "xml_tokenizer.h"
-
-#if KHTML_XSLT
#include "XSLStyleSheet.h"
-#endif
+#include "xml_tokenizer.h" // for parseAttributes()
namespace WebCore {
-Entity::Entity(Document* doc) : ContainerNode(doc)
-{
-}
-
-Entity::Entity(Document* doc, const String& name) : ContainerNode(doc), m_name(name.impl())
-{
-}
-
-Entity::Entity(Document* doc, const String& publicId, const String& systemId, const String& notationName)
- : ContainerNode(doc), m_publicId(publicId.impl()), m_systemId(systemId.impl()), m_notationName(notationName.impl())
-{
-}
-
-String Entity::nodeName() const
-{
- return m_name.get();
-}
-
-Node::NodeType Entity::nodeType() const
-{
- return ENTITY_NODE;
-}
-
-PassRefPtr<Node> Entity::cloneNode(bool /*deep*/)
-{
- // Spec says cloning Entity nodes is "implementation dependent". We do not support it.
- return 0;
-}
-
-// DOM Section 1.1.1
-bool Entity::childTypeAllowed(NodeType type)
-{
- switch (type) {
- case ELEMENT_NODE:
- case PROCESSING_INSTRUCTION_NODE:
- case COMMENT_NODE:
- case TEXT_NODE:
- case CDATA_SECTION_NODE:
- case ENTITY_REFERENCE_NODE:
- return true;
- break;
- default:
- return false;
- }
-}
-
-String Entity::toString() const
-{
- String result = "<!ENTITY' ";
-
- if (m_name && m_name->length()) {
- result += " ";
- result += m_name.get();
- }
-
- if (m_publicId && m_publicId->length()) {
- result += " PUBLIC \"";
- result += m_publicId.get();
- result += "\" \"";
- result += m_systemId.get();
- result += "\"";
- } else if (m_systemId && m_systemId->length()) {
- result += " SYSTEM \"";
- result += m_systemId.get();
- result += "\"";
- }
-
- if (m_notationName && m_notationName->length()) {
- result += " NDATA ";
- result += m_notationName.get();
- }
-
- result += ">";
-
- return result;
-}
-
-// -------------------------------------------------------------------------
-
-EntityReference::EntityReference(Document* doc) : ContainerNode(doc)
-{
-}
-
-EntityReference::EntityReference(Document* doc, StringImpl* entityName)
- : ContainerNode(doc), m_entityName(entityName)
-{
-}
-
-String EntityReference::nodeName() const
-{
- return m_entityName.get();
-}
-
-Node::NodeType EntityReference::nodeType() const
-{
- return ENTITY_REFERENCE_NODE;
-}
-
-PassRefPtr<Node> EntityReference::cloneNode(bool deep)
-{
- RefPtr<EntityReference> clone = new EntityReference(document(), m_entityName.get());
- // ### make sure children are readonly
- // ### since we are a reference, should we clone children anyway (even if not deep?)
- if (deep)
- cloneChildNodes(clone.get());
- return clone.release();
-}
-
-// DOM Section 1.1.1
-bool EntityReference::childTypeAllowed(NodeType type)
-{
- switch (type) {
- case ELEMENT_NODE:
- case PROCESSING_INSTRUCTION_NODE:
- case COMMENT_NODE:
- case TEXT_NODE:
- case CDATA_SECTION_NODE:
- case ENTITY_REFERENCE_NODE:
- return true;
- break;
- default:
- return false;
- }
-}
-
-String EntityReference::toString() const
-{
- String result = "&";
- result += m_entityName.get();
- result += ";";
-
- return result;
-}
-
-// -------------------------------------------------------------------------
-
-Notation::Notation(Document* doc) : ContainerNode(doc)
-{
-}
-
-Notation::Notation(Document* doc, const String& name, const String& publicId, const String& systemId)
- : ContainerNode(doc), m_name(name.impl()), m_publicId(publicId.impl()), m_systemId(systemId.impl())
-{
-}
-
-String Notation::nodeName() const
-{
- return m_name.get();
-}
-
-Node::NodeType Notation::nodeType() const
-{
- return NOTATION_NODE;
-}
-
-PassRefPtr<Node> Notation::cloneNode(bool /*deep*/)
-{
- // Spec says cloning Notation nodes is "implementation dependent". We do not support it.
- return 0;
-}
-
-// DOM Section 1.1.1
-bool Notation::childTypeAllowed(NodeType)
-{
- return false;
-}
-
-// -------------------------------------------------------------------------
-
-// ### need a way of updating these properly whenever child nodes of the processing instruction
-// change or are added/removed
-
ProcessingInstruction::ProcessingInstruction(Document* doc)
- : ContainerNode(doc), m_cachedSheet(0), m_loading(false)
-{
+ : ContainerNode(doc)
+ , m_cachedSheet(0)
+ , m_loading(false)
#if KHTML_XSLT
- m_isXSL = false;
+ , m_isXSL(false)
#endif
+{
}
ProcessingInstruction::ProcessingInstruction(Document* doc, const String& target, const String& data)
- : ContainerNode(doc), m_target(target.impl()), m_data(data.impl()), m_cachedSheet(0), m_loading(false)
-{
+ : ContainerNode(doc)
+ , m_target(target.impl())
+ , m_data(data.impl())
+ , m_cachedSheet(0)
+ , m_loading(false)
#if KHTML_XSLT
- m_isXSL = false;
+ , m_isXSL(false)
#endif
+{
}
ProcessingInstruction::~ProcessingInstruction()
*
*/
-#ifndef DOM_XmlImpl_h_
-#define DOM_XmlImpl_h_
+#ifndef ProcessingInstruction_H
+#define ProcessingInstruction_H
#include "CachedObjectClient.h"
#include "ContainerNode.h"
namespace WebCore {
- class CachedCSSStyleSheet;
-}
-namespace WebCore {
-
-class Document;
-class String;
-class ProcessingInstruction;
class StyleSheet;
-class Entity : public ContainerNode
-{
-public:
- Entity(Document*);
- Entity(Document*, const String& name);
- Entity(Document*, const String& publicId, const String& systemId, const String& notationName);
-
- // DOM methods & attributes for Entity
- String publicId() const { return m_publicId.get(); }
- String systemId() const { return m_systemId.get(); }
- String notationName() const { return m_notationName.get(); }
-
- virtual String nodeName() const;
- virtual NodeType nodeType() const;
- virtual PassRefPtr<Node> cloneNode(bool deep);
- virtual bool childTypeAllowed(NodeType);
- virtual String toString() const;
-
-private:
- RefPtr<StringImpl> m_publicId;
- RefPtr<StringImpl> m_systemId;
- RefPtr<StringImpl> m_notationName;
- RefPtr<StringImpl> m_name;
-};
-
-class EntityReference : public ContainerNode
-{
-public:
- EntityReference(Document*);
- EntityReference(Document*, StringImpl* entityName);
-
- virtual String nodeName() const;
- virtual NodeType nodeType() const;
- virtual PassRefPtr<Node> cloneNode(bool deep);
- virtual bool childTypeAllowed(NodeType);
- virtual String toString() const;
-
-private:
- RefPtr<StringImpl> m_entityName;
-};
-
-class Notation : public ContainerNode
-{
-public:
- Notation(Document*);
- Notation(Document*, const String& name, const String& publicId, const String& systemId);
-
- // DOM methods & attributes for Notation
- String publicId() const { return m_publicId.get(); }
- String systemId() const { return m_systemId. get(); }
-
- virtual String nodeName() const;
- virtual NodeType nodeType() const;
- virtual PassRefPtr<Node> cloneNode(bool deep);
- virtual bool childTypeAllowed(NodeType);
-
-private:
- RefPtr<StringImpl> m_name;
- RefPtr<StringImpl> m_publicId;
- RefPtr<StringImpl> m_systemId;
-};
-
-
class ProcessingInstruction : public ContainerNode, private CachedObjectClient
{
public:
// DOM methods & attributes for Notation
String target() const { return m_target.get(); }
String data() const { return m_data.get(); }
- void setData(const String &data, ExceptionCode&);
+ void setData(const String&, ExceptionCode&);
virtual String nodeName() const;
virtual NodeType nodeType() const;
virtual String nodeValue() const;
- virtual void setNodeValue(const String& nodeValue, ExceptionCode&);
+ virtual void setNodeValue(const String&, ExceptionCode&);
virtual PassRefPtr<Node> cloneNode(bool deep);
virtual bool childTypeAllowed(NodeType);
virtual bool offsetInCharacters() const;
#include "DocumentFragment.h"
#include "ExceptionCode.h"
#include "HTMLElement.h"
+#include "ProcessingInstruction.h"
#include "RenderBlock.h"
#include "TextIterator.h"
-#include "dom_xmlimpl.h"
#include "markup.h"
#include "visible_units.h"
Range::Range(Document* ownerDocument)
: m_ownerDocument(ownerDocument)
- , m_startContainer(ownerDocument), m_startOffset(0)
- , m_endContainer(ownerDocument), m_endOffset(0)
+ , m_startContainer(ownerDocument)
+ , m_startOffset(0)
+ , m_endContainer(ownerDocument)
+ , m_endOffset(0)
, m_detached(false)
{
}
Node* startContainer, int startOffset,
Node* endContainer, int endOffset)
: m_ownerDocument(ownerDocument)
- , m_startContainer(startContainer), m_startOffset(startOffset)
- , m_endContainer(endContainer), m_endOffset(endOffset)
+ , m_startContainer(startContainer)
+ , m_startOffset(startOffset)
+ , m_endContainer(endContainer)
+ , m_endOffset(endOffset)
, m_detached(false)
{
}
#include "HTMLTableSectionElement.h"
#include "HTMLScriptElement.h"
#include "KWQLoader.h"
-#include "dom_xmlimpl.h"
#include "HTMLTokenizer.h"
+#include "ProcessingInstruction.h"
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#include "HTMLNames.h"
#include "InlineTextBox.h"
#include "Logging.h"
+#include "ProcessingInstruction.h"
#include "Range.h"
-#include "dom_xmlimpl.h"
#include "htmlediting.h"
#include "visible_units.h"
DeprecatedString result = "";
ExceptionCode ec;
- const Text *textNode = static_cast<const Text *>(node);
+ const Text *textNode = static_cast<const Text*>(node);
unsigned startOffset = 0;
unsigned endOffset = textNode->length();
if (range && node == range->endContainer(ec))
endOffset = range->endOffset(ec);
- RenderText *textRenderer = static_cast<RenderText *>(r);
+ RenderText *textRenderer = static_cast<RenderText*>(r);
DeprecatedString str = node->nodeValue().deprecatedString();
for (InlineTextBox *box = textRenderer->firstTextBox(); box; box = box->nextTextBox()) {
unsigned start = box->m_start;
return annotate ? convertHTMLTextToInterchangeFormat(markup) : markup;
}
case Node::COMMENT_NODE:
- return static_cast<const Comment *>(node)->toString().deprecatedString();
+ return static_cast<const Comment*>(node)->toString().deprecatedString();
case Node::DOCUMENT_NODE: {
// Documents do not normally contain a docType as a child node, force it to print here instead.
const DocumentType* docType = static_cast<const Document*>(node)->doctype();
case Node::DOCUMENT_TYPE_NODE:
return static_cast<const DocumentType*>(node)->toString().deprecatedString();
case Node::PROCESSING_INSTRUCTION_NODE:
- return static_cast<const ProcessingInstruction *>(node)->toString().deprecatedString();
+ return static_cast<const ProcessingInstruction*>(node)->toString().deprecatedString();
case Node::ELEMENT_NODE: {
DeprecatedString markup = QChar('<') + node->nodeName().deprecatedString();
const Element* el = static_cast<const Element*>(node);
String additionalStyle;
if (defaultStyle && el->isHTMLElement()) {
- RefPtr<CSSComputedStyleDeclaration> computedStyle = Position(const_cast<Element *>(el), 0).computedStyle();
+ RefPtr<CSSComputedStyleDeclaration> computedStyle = Position(const_cast<Element*>(el), 0).computedStyle();
RefPtr<CSSMutableStyleDeclaration> style = computedStyle->copyInheritableProperties();
defaultStyle->diff(style.get());
if (style->length() > 0) {
- CSSMutableStyleDeclaration *inlineStyleDecl = static_cast<const HTMLElement *>(el)->inlineStyleDecl();
+ CSSMutableStyleDeclaration *inlineStyleDecl = static_cast<const HTMLElement*>(el)->inlineStyleDecl();
if (inlineStyleDecl)
inlineStyleDecl->diff(style.get());
additionalStyle = style->cssText();
Node *end = node->traverseNextSibling();
for (Node *n = node; n != end; n = n->traverseNextNode()) {
if (n->isElementNode()) {
- Element *e = static_cast<Element *>(n);
+ Element *e = static_cast<Element*>(n);
NamedAttrMap *attrs = e->attributes();
unsigned length = attrs->length();
for (unsigned i = 0; i < length; i++) {
{
ASSERT(document->documentElement()->isHTMLElement());
// FIXME: What if the document element is not an HTML element?
- HTMLElement *element = static_cast<HTMLElement *>(document->documentElement());
+ HTMLElement *element = static_cast<HTMLElement*>(document->documentElement());
RefPtr<DocumentFragment> fragment = element->createContextualFragment(markup);
ASSERT(fragment);