[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:47:54 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit cb935e9a56f0087cd6996d1b5a01e4950bc7b635
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 8 22:47:11 2002 +0000
More DOM implementation.
* khtml/dom/dom_text.h:
* khtml/dom/dom_xml.h:
* khtml/xml/dom_textimpl.h:
* khtml/xml/dom_xmlimpl.h:
* kwq/WebCoreDOM.h:
* kwq/WebCoreDOMNode.mm:
(DOM::CharacterDataImpl::createInstance):
(DOM::TextImpl::createInstance):
(DOM::ProcessingInstructionImpl::createInstance):
(-[WebCoreDOMCharacterData data]):
(-[WebCoreDOMCharacterData setData:]):
(-[WebCoreDOMCharacterData length]):
(-[WebCoreDOMCharacterData substringData::]):
(-[WebCoreDOMCharacterData appendData:]):
(-[WebCoreDOMCharacterData insertData::]):
(-[WebCoreDOMCharacterData deleteData::]):
(-[WebCoreDOMText splitText:]):
(+[WebCoreDOMCDATASection CDATASectionWithImpl:DOM::]):
(-[WebCoreDOMProcessingInstruction data]):
(-[WebCoreDOMProcessingInstruction setData:]):
* kwq/WebCoreDOMPrivate.h:
* kwq/WebDOMElement.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 8b3118b..8bdbc39 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,32 @@
2002-10-08 Richard Williamson <rjw at apple.com>
+ More DOM implementation.
+
+ * khtml/dom/dom_text.h:
+ * khtml/dom/dom_xml.h:
+ * khtml/xml/dom_textimpl.h:
+ * khtml/xml/dom_xmlimpl.h:
+ * kwq/WebCoreDOM.h:
+ * kwq/WebCoreDOMNode.mm:
+ (DOM::CharacterDataImpl::createInstance):
+ (DOM::TextImpl::createInstance):
+ (DOM::ProcessingInstructionImpl::createInstance):
+ (-[WebCoreDOMCharacterData data]):
+ (-[WebCoreDOMCharacterData setData:]):
+ (-[WebCoreDOMCharacterData length]):
+ (-[WebCoreDOMCharacterData substringData::]):
+ (-[WebCoreDOMCharacterData appendData:]):
+ (-[WebCoreDOMCharacterData insertData::]):
+ (-[WebCoreDOMCharacterData deleteData::]):
+ (-[WebCoreDOMText splitText:]):
+ (+[WebCoreDOMCDATASection CDATASectionWithImpl:DOM::]):
+ (-[WebCoreDOMProcessingInstruction data]):
+ (-[WebCoreDOMProcessingInstruction setData:]):
+ * kwq/WebCoreDOMPrivate.h:
+ * kwq/WebDOMElement.h:
+
+2002-10-08 Richard Williamson <rjw at apple.com>
+
Implemented WebCoreDOMElement.
Fixed extra deref of impl in subclasses
of WebCoreDOMNode.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 8b3118b..8bdbc39 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,32 @@
2002-10-08 Richard Williamson <rjw at apple.com>
+ More DOM implementation.
+
+ * khtml/dom/dom_text.h:
+ * khtml/dom/dom_xml.h:
+ * khtml/xml/dom_textimpl.h:
+ * khtml/xml/dom_xmlimpl.h:
+ * kwq/WebCoreDOM.h:
+ * kwq/WebCoreDOMNode.mm:
+ (DOM::CharacterDataImpl::createInstance):
+ (DOM::TextImpl::createInstance):
+ (DOM::ProcessingInstructionImpl::createInstance):
+ (-[WebCoreDOMCharacterData data]):
+ (-[WebCoreDOMCharacterData setData:]):
+ (-[WebCoreDOMCharacterData length]):
+ (-[WebCoreDOMCharacterData substringData::]):
+ (-[WebCoreDOMCharacterData appendData:]):
+ (-[WebCoreDOMCharacterData insertData::]):
+ (-[WebCoreDOMCharacterData deleteData::]):
+ (-[WebCoreDOMText splitText:]):
+ (+[WebCoreDOMCDATASection CDATASectionWithImpl:DOM::]):
+ (-[WebCoreDOMProcessingInstruction data]):
+ (-[WebCoreDOMProcessingInstruction setData:]):
+ * kwq/WebCoreDOMPrivate.h:
+ * kwq/WebDOMElement.h:
+
+2002-10-08 Richard Williamson <rjw at apple.com>
+
Implemented WebCoreDOMElement.
Fixed extra deref of impl in subclasses
of WebCoreDOMNode.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 8b3118b..8bdbc39 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,32 @@
2002-10-08 Richard Williamson <rjw at apple.com>
+ More DOM implementation.
+
+ * khtml/dom/dom_text.h:
+ * khtml/dom/dom_xml.h:
+ * khtml/xml/dom_textimpl.h:
+ * khtml/xml/dom_xmlimpl.h:
+ * kwq/WebCoreDOM.h:
+ * kwq/WebCoreDOMNode.mm:
+ (DOM::CharacterDataImpl::createInstance):
+ (DOM::TextImpl::createInstance):
+ (DOM::ProcessingInstructionImpl::createInstance):
+ (-[WebCoreDOMCharacterData data]):
+ (-[WebCoreDOMCharacterData setData:]):
+ (-[WebCoreDOMCharacterData length]):
+ (-[WebCoreDOMCharacterData substringData::]):
+ (-[WebCoreDOMCharacterData appendData:]):
+ (-[WebCoreDOMCharacterData insertData::]):
+ (-[WebCoreDOMCharacterData deleteData::]):
+ (-[WebCoreDOMText splitText:]):
+ (+[WebCoreDOMCDATASection CDATASectionWithImpl:DOM::]):
+ (-[WebCoreDOMProcessingInstruction data]):
+ (-[WebCoreDOMProcessingInstruction setData:]):
+ * kwq/WebCoreDOMPrivate.h:
+ * kwq/WebDOMElement.h:
+
+2002-10-08 Richard Williamson <rjw at apple.com>
+
Implemented WebCoreDOMElement.
Fixed extra deref of impl in subclasses
of WebCoreDOMNode.
diff --git a/WebCore/khtml/dom/dom_text.h b/WebCore/khtml/dom/dom_text.h
index 409062c..8b051a9 100644
--- a/WebCore/khtml/dom/dom_text.h
+++ b/WebCore/khtml/dom/dom_text.h
@@ -48,6 +48,10 @@ class CharacterDataImpl;
*/
class CharacterData : public Node
{
+#ifdef APPLE_CHANGES
+ friend class CharacterDataImpl;
+#endif
+
public:
CharacterData();
CharacterData(const CharacterData &other);
@@ -266,7 +270,9 @@ class TextImpl;
class Text : public CharacterData
{
friend class Document;
-
+#ifdef APPLE_CHANGES
+ friend class TextImpl;
+#endif
public:
Text();
Text(const Text &other);
diff --git a/WebCore/khtml/dom/dom_xml.h b/WebCore/khtml/dom/dom_xml.h
index 7bb8f72..c24ec2f 100644
--- a/WebCore/khtml/dom/dom_xml.h
+++ b/WebCore/khtml/dom/dom_xml.h
@@ -261,6 +261,9 @@ protected:
class ProcessingInstruction : public Node
{
friend class Document;
+#ifdef APPLE_CHANGES
+ friend class ProcessingInstructionImpl;
+#endif
public:
ProcessingInstruction();
ProcessingInstruction(const ProcessingInstruction &other);
diff --git a/WebCore/khtml/xml/dom_textimpl.h b/WebCore/khtml/xml/dom_textimpl.h
index 3c47555..ec50886 100644
--- a/WebCore/khtml/xml/dom_textimpl.h
+++ b/WebCore/khtml/xml/dom_textimpl.h
@@ -29,6 +29,10 @@
namespace DOM {
class DocumentImpl;
+#ifdef APPLE_CHANGES
+ class CharacterData;
+ class Text;
+#endif
class CharacterDataImpl : public NodeImpl
{
@@ -61,6 +65,10 @@ public:
virtual void dump(QTextStream *stream, QString ind = "") const;
#endif
+#ifdef APPLE_CHANGES
+ static CharacterData createInstance(CharacterDataImpl *impl);
+#endif
+
protected:
// note: since DOMStrings are shared, str should always be copied when making
// a change or returning a string
@@ -115,6 +123,10 @@ public:
virtual void recalcStyle( StyleChange = NoChange );
virtual bool childTypeAllowed( unsigned short type );
+#ifdef APPLE_CHANGES
+ static Text createInstance(TextImpl *impl);
+#endif
+
protected:
virtual TextImpl *createNew(DOMStringImpl *_str);
};
diff --git a/WebCore/khtml/xml/dom_xmlimpl.h b/WebCore/khtml/xml/dom_xmlimpl.h
index 8722817..5995f00 100644
--- a/WebCore/khtml/xml/dom_xmlimpl.h
+++ b/WebCore/khtml/xml/dom_xmlimpl.h
@@ -38,6 +38,9 @@ class DocumentImpl;
class CSSStyleSheetImpl;
class StyleSheetImpl;
class DOMString;
+#ifdef APPLE_CHANGES
+class ProcessingInstruction;
+#endif
class EntityImpl : public NodeBaseImpl
{
@@ -150,6 +153,10 @@ public:
virtual void setStyleSheet(const DOM::DOMString &url, const DOM::DOMString &sheet);
virtual void setStyleSheet(CSSStyleSheetImpl* sheet);
+#ifdef APPLE_CHANGES
+ static ProcessingInstruction createInstance(ProcessingInstructionImpl *impl);
+#endif
+
protected:
DOMStringImpl *m_target;
DOMStringImpl *m_data;
diff --git a/WebCore/kwq/WebCoreDOM.h b/WebCore/kwq/WebCoreDOM.h
index 34a49cc..a77dcdc 100644
--- a/WebCore/kwq/WebCoreDOM.h
+++ b/WebCore/kwq/WebCoreDOM.h
@@ -27,20 +27,21 @@ typedef DOM::NamedNodeMapImpl NamedNodeMapImpl;
#endif
- at protocol WebDOMNode;
- at protocol WebDOMNamedNodeMap;
- at protocol WebDOMNodeList;
- at protocol WebDOMImplementation;
- at protocol WebDOMDocumentType;
- at protocol WebDOMDocument;
- at protocol WebDOMEntityReference;
- at protocol WebDOMElement;
@protocol WebDOMAttr;
- at protocol WebDOMDocumentFragment;
- at protocol WebDOMText;
+ at protocol WebDOMCharacterData;
@protocol WebDOMComment;
@protocol WebDOMCDATASection;
+ at protocol WebDOMDocument;
+ at protocol WebDOMDocumentFragment;
+ at protocol WebDOMDocumentType;
+ at protocol WebDOMElement;
+ at protocol WebDOMEntityReference;
+ at protocol WebDOMImplementation;
+ at protocol WebDOMNamedNodeMap;
+ at protocol WebDOMNode;
+ at protocol WebDOMNodeList;
@protocol WebDOMProcessingInstruction;
+ at protocol WebDOMText;
@interface WebCoreDOMNode : NSObject <WebDOMNode>
{
@@ -84,13 +85,16 @@ typedef DOM::NamedNodeMapImpl NamedNodeMapImpl;
@interface WebCoreDOMDocumentFragment : WebCoreDOMNode <WebDOMDocumentFragment>
@end
- at interface WebCoreDOMText : WebCoreDOMNode <WebDOMText>
+ at interface WebCoreDOMCharacterData : WebCoreDOMNode <WebDOMCharacterData>
+ at end
+
+ at interface WebCoreDOMText : WebCoreDOMCharacterData <WebDOMText>
@end
- at interface WebCoreDOMComment : WebCoreDOMNode <WebDOMComment>
+ at interface WebCoreDOMComment : WebCoreDOMCharacterData <WebDOMComment>
@end
- at interface WebCoreDOMCDATASection : WebCoreDOMNode <WebDOMCDATASection>
+ at interface WebCoreDOMCDATASection : WebCoreDOMText <WebDOMCDATASection>
@end
@interface WebCoreDOMProcessingInstruction : WebCoreDOMNode <WebDOMProcessingInstruction>
diff --git a/WebCore/kwq/WebCoreDOMNode.mm b/WebCore/kwq/WebCoreDOMNode.mm
index 1f9ee90..d70d9c6 100644
--- a/WebCore/kwq/WebCoreDOMNode.mm
+++ b/WebCore/kwq/WebCoreDOMNode.mm
@@ -24,6 +24,20 @@ DOM::Element DOM::ElementImpl::createInstance(DOM::ElementImpl *impl)
return DOM::Element(impl);
}
+DOM::CharacterData DOM::CharacterDataImpl::createInstance(DOM::CharacterDataImpl *impl)
+{
+ return DOM::CharacterData(impl);
+}
+
+DOM::Text DOM::TextImpl::createInstance(DOM::TextImpl *impl)
+{
+ return DOM::Text(impl);
+}
+
+DOM::ProcessingInstruction DOM::ProcessingInstructionImpl::createInstance(ProcessingInstructionImpl *impl)
+{
+ return DOM::ProcessingInstruction(impl);
+}
@implementation WebCoreDOMNode
@@ -406,18 +420,6 @@ DOM::Element DOM::ElementImpl::createInstance(DOM::ElementImpl *impl)
@end
- at implementation WebCoreDOMCDATASection
-
-+ (WebCoreDOMCDATASection *)CDATASectionWithImpl: (DOM::CDATASectionImpl *)_impl
-{
- return [[(WebCoreDOMCDATASection *)[[self class] alloc] initWithImpl: _impl] autorelease];
-}
-- initWithImpl:(DOM::CDATASectionImpl *)coreImpl { return [super initWithImpl:coreImpl]; }
-- (DOM::CDATASectionImpl *)impl { return (DOM::CDATASectionImpl *)impl; }
-
-// No additional methods.
- at end
-
@implementation WebCoreDOMDocumentFragment
+ (WebCoreDOMDocumentFragment *)documentFragmentWithImpl: (DOM::DocumentFragmentImpl *)_impl
@@ -430,14 +432,6 @@ DOM::Element DOM::ElementImpl::createInstance(DOM::ElementImpl *impl)
// No additional methods.
@end
- at implementation WebCoreDOMComment
-
-+ (WebCoreDOMComment *)commentWithImpl: (DOM::CommentImpl *)_impl { return [[(WebCoreDOMComment *)[[self class] alloc] initWithImpl: _impl] autorelease]; }
-- initWithImpl:(DOM::CommentImpl *)coreImpl { return [super initWithImpl:coreImpl]; }
-- (DOM::CommentImpl *)impl { return (DOM::CommentImpl *)impl; }
-
- at end
-
@implementation WebCoreDOMElement
+ (WebCoreDOMElement *)elementWithImpl: (DOM::ElementImpl *)_impl { return [[(WebCoreDOMElement *)[[self class] alloc] initWithImpl: _impl] autorelease]; }
@@ -576,6 +570,73 @@ DOM::Element DOM::ElementImpl::createInstance(DOM::ElementImpl *impl)
@end
+ at implementation WebCoreDOMCharacterData
+
++ (WebCoreDOMCharacterData *)commentWithImpl: (DOM::CharacterDataImpl *)_impl { return [[(WebCoreDOMCharacterData *)[[self class] alloc] initWithImpl: _impl] autorelease]; }
+- initWithImpl:(DOM::CharacterDataImpl *)coreImpl { return [super initWithImpl:coreImpl]; }
+- (DOM::CharacterDataImpl *)impl { return (DOM::CharacterDataImpl *)impl; }
+
+- (NSString *)data
+{
+ DOM::CharacterData instance = DOM::CharacterDataImpl::createInstance([self impl]);
+ DOM::DOMString data = instance.data();
+ return domStringToNSString(data);
+}
+
+- (void)setData: (NSString *)data
+{
+ DOM::CharacterData instance = DOM::CharacterDataImpl::createInstance([self impl]);
+ return instance.setData(NSStringToDOMString(data));
+}
+
+- (unsigned long)length
+{
+ DOM::CharacterData instance = DOM::CharacterDataImpl::createInstance([self impl]);
+ return instance.length();
+}
+
+- (NSString *)substringData: (unsigned long)offset :(unsigned long)count
+{
+ DOM::CharacterData instance = DOM::CharacterDataImpl::createInstance([self impl]);
+ DOM::DOMString substring = instance.substringData(offset,count);
+ return domStringToNSString(substring);
+}
+
+- (void)appendData:(NSString *)arg
+{
+ DOM::CharacterData instance = DOM::CharacterDataImpl::createInstance([self impl]);
+ instance.appendData(NSStringToDOMString(arg));
+}
+
+- (void)insertData:(unsigned long)offset :(NSString *)arg
+{
+ DOM::CharacterData instance = DOM::CharacterDataImpl::createInstance([self impl]);
+ instance.insertData(offset, NSStringToDOMString(arg));
+}
+
+- (void)deleteData:(unsigned long)offset :(unsigned long) count
+{
+ DOM::CharacterData instance = DOM::CharacterDataImpl::createInstance([self impl]);
+ instance.deleteData(offset, count);
+}
+
+- (void)replaceData:(unsigned long)offset :(unsigned long)count :(NSString *)arg;
+{
+ DOM::CharacterData instance = DOM::CharacterDataImpl::createInstance([self impl]);
+ instance.replaceData(offset, count, NSStringToDOMString(arg));
+}
+
+ at end
+
+ at implementation WebCoreDOMComment
+
++ (WebCoreDOMComment *)commentWithImpl: (DOM::CommentImpl *)_impl { return [[(WebCoreDOMComment *)[[self class] alloc] initWithImpl: _impl] autorelease]; }
+- initWithImpl:(DOM::CommentImpl *)coreImpl { return [super initWithImpl:coreImpl]; }
+- (DOM::CommentImpl *)impl { return (DOM::CommentImpl *)impl; }
+
+// No additional methods.
+
+ at end
@implementation WebCoreDOMText
@@ -583,8 +644,25 @@ DOM::Element DOM::ElementImpl::createInstance(DOM::ElementImpl *impl)
- initWithImpl:(DOM::TextImpl *)coreImpl { return [super initWithImpl:coreImpl]; }
- (DOM::TextImpl *)impl { return (DOM::TextImpl *)impl; }
+- (id<WebDOMText>)splitText: (unsigned long)offset
+{
+ DOM::Text instance = DOM::TextImpl::createInstance([self impl]);
+ return [WebCoreDOMText textWithImpl: (DOM::TextImpl *)instance.splitText(offset).handle()];
+}
+
@end
+ at implementation WebCoreDOMCDATASection
+
++ (WebCoreDOMCDATASection *)CDATASectionWithImpl: (DOM::CDATASectionImpl *)_impl
+{
+ return [[(WebCoreDOMCDATASection *)[[self class] alloc] initWithImpl: _impl] autorelease];
+}
+- initWithImpl:(DOM::CDATASectionImpl *)coreImpl { return [super initWithImpl:coreImpl]; }
+- (DOM::CDATASectionImpl *)impl { return (DOM::CDATASectionImpl *)impl; }
+
+// No additional methods.
+ at end
@implementation WebCoreDOMProcessingInstruction
@@ -593,6 +671,26 @@ DOM::Element DOM::ElementImpl::createInstance(DOM::ElementImpl *impl)
- initWithImpl:(DOM::ProcessingInstructionImpl *)coreImpl { return [super initWithImpl:coreImpl]; }
- (DOM::ProcessingInstructionImpl *)impl { return (DOM::ProcessingInstructionImpl *)impl; }
+- (NSString *)target;
+{
+ DOM::ProcessingInstruction instance = DOM::ProcessingInstructionImpl::createInstance([self impl]);
+ DOM::DOMString data = instance.data();
+ return domStringToNSString(data);
+}
+
+- (NSString *)data
+{
+ DOM::ProcessingInstruction instance = DOM::ProcessingInstructionImpl::createInstance([self impl]);
+ DOM::DOMString data = instance.data();
+ return domStringToNSString(data);
+}
+
+- (void)setData:(NSString *)data
+{
+ DOM::ProcessingInstruction instance = DOM::ProcessingInstructionImpl::createInstance([self impl]);
+ return instance.setData(NSStringToDOMString(data));
+}
+
@end
diff --git a/WebCore/kwq/WebCoreDOMPrivate.h b/WebCore/kwq/WebCoreDOMPrivate.h
index f92c61c..b25cc0c 100644
--- a/WebCore/kwq/WebCoreDOMPrivate.h
+++ b/WebCore/kwq/WebCoreDOMPrivate.h
@@ -4,6 +4,8 @@
*/
#include <dom/dom_element.h>
#include <dom/dom_string.h>
+#include <dom/dom_text.h>
+#include <dom/dom_xml.h>
#include <xml/dom_textimpl.h>
#include <xml/dom_xmlimpl.h>
#include <xml/dom2_rangeimpl.h>
@@ -58,6 +60,12 @@ extern DOM::DOMString NSStringToDOMString(NSString *aString);
- (DOM::DocumentFragmentImpl *)impl;
@end
+ at interface WebCoreDOMCharacterData (CorePrivate)
++ (WebCoreDOMCharacterData *)characterDataWithImpl: (DOM::CharacterDataImpl *)impl;
+- initWithImpl: (DOM::CharacterDataImpl *)coreImpl;
+- (DOM::CharacterDataImpl *)impl;
+ at end
+
@interface WebCoreDOMText (CorePrivate)
+ (WebCoreDOMText *)textWithImpl: (DOM::TextImpl *)impl;
- initWithImpl: (DOM::TextImpl *)coreImpl;
diff --git a/WebCore/kwq/WebDOMElement.h b/WebCore/kwq/WebDOMElement.h
index a821fee..1ab0f3a 100644
--- a/WebCore/kwq/WebDOMElement.h
+++ b/WebCore/kwq/WebDOMElement.h
@@ -10,7 +10,7 @@
@protocol WebDOMNodeList;
- at protocol WebDOMAttr <NSObject>
+ at protocol WebDOMAttr <WebDOMNode>
- (NSString *)name;
@@ -25,7 +25,7 @@
@end
- at protocol WebDOMCharacterData <NSObject>
+ at protocol WebDOMCharacterData <WebDOMNode>
- (NSString *)data;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list