[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:38:17 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c990724968572a91f0676998aae544be5e8f5635
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed May 5 18:37:31 2004 +0000
Tests:
Reviewed by kocienda.
* Blot/BlotDocument.m:
(-[BlotDocument dataRepresentationOfType:]): updated to use outerHTML
WebCore:
- DOM Extensions API tweaks
- Implemented outerHTML
Reviewed by kocienda.
* WebCore-combined.exp:
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::outerHTML): new
(HTMLElementImpl::setOuterHTML): mew
* khtml/html/html_elementimpl.h:
* kwq/DOMExtensions.h: removed background methods on table and table cell since these are unnecessary conveniences
* kwq/DOMHTML.mm:
(-[DOMHTMLElement outerHTML]): new
(-[DOMHTMLElement setOuterHTML:]): mew
WebKit:
- DOM Extensions API tweaks
Reviewed by kocienda.
* DOM.subproj/DOMExtensions.h: copied from WebCore
* DOM.subproj/WebDOMOperations.h: added header doc comments
* DOM.subproj/WebDOMOperations.m:
(-[DOMNode _URLsFromSelectors:]): use renamed URLWithAttributeString
(-[DOMDocument URLWithAttributeString:]): renamed
(-[DOMHTMLTableElement _web_background]): new private method
(-[DOMHTMLTableElement _subresourceURLs]): use new private method
(-[DOMHTMLTableCellElement _web_background]): new private method
(-[DOMHTMLTableCellElement _subresourceURLs]): use new private method
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 0fecd15..40023a9 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,20 @@
+2004-05-05 Chris Blumenberg <cblu at apple.com>
+
+ - DOM Extensions API tweaks
+ - Implemented outerHTML
+
+ Reviewed by kocienda.
+
+ * WebCore-combined.exp:
+ * khtml/html/html_elementimpl.cpp:
+ (HTMLElementImpl::outerHTML): new
+ (HTMLElementImpl::setOuterHTML): mew
+ * khtml/html/html_elementimpl.h:
+ * kwq/DOMExtensions.h: removed background methods on table and table cell since these are unnecessary conveniences
+ * kwq/DOMHTML.mm:
+ (-[DOMHTMLElement outerHTML]): new
+ (-[DOMHTMLElement setOuterHTML:]): mew
+
2004-05-04 David Hyatt <hyatt at apple.com>
Fix for 3641331, make sure <th> elements don't reset text-align to center if they inherit a specified
diff --git a/WebCore/WebCore-combined.exp b/WebCore/WebCore-combined.exp
index c8ea890..e8ea8b7 100644
--- a/WebCore/WebCore-combined.exp
+++ b/WebCore/WebCore-combined.exp
@@ -1,5 +1,6 @@
.objc_class_name_DOMImplementation
.objc_class_name_DOMNode
+.objc_class_name_DOMNodeFilter
.objc_class_name_DOMNodeList
.objc_class_name_DOMNamedNodeMap
.objc_class_name_DOMCharacterData
diff --git a/WebCore/khtml/html/html_elementimpl.cpp b/WebCore/khtml/html/html_elementimpl.cpp
index 8dbc5f1..4b2beb0 100644
--- a/WebCore/khtml/html/html_elementimpl.cpp
+++ b/WebCore/khtml/html/html_elementimpl.cpp
@@ -639,6 +639,11 @@ DOMString HTMLElementImpl::innerHTML() const
return toHTML();
}
+DOMString HTMLElementImpl::outerHTML() const
+{
+ return recursive_toHTML(true);
+}
+
DOMString HTMLElementImpl::innerText() const
{
DOMString text;
@@ -763,6 +768,19 @@ bool HTMLElementImpl::setInnerHTML( const DOMString &html )
return !ec;
}
+bool HTMLElementImpl::setOuterHTML( const DOMString &html )
+{
+ DocumentFragmentImpl *fragment = createContextualFragment( html );
+ if (fragment == NULL) {
+ return false;
+ }
+
+ int ec = 0;
+ parentNode()->replaceChild(fragment, this, ec);
+ return !ec;
+}
+
+
bool HTMLElementImpl::setInnerText( const DOMString &text )
{
// following the IE specs.
diff --git a/WebCore/khtml/html/html_elementimpl.h b/WebCore/khtml/html/html_elementimpl.h
index 37e1790..bd5f8da 100644
--- a/WebCore/khtml/html/html_elementimpl.h
+++ b/WebCore/khtml/html/html_elementimpl.h
@@ -146,9 +146,11 @@ public:
void createMappedDecl(HTMLAttributeImpl* attr);
DOMString innerHTML() const;
+ DOMString outerHTML() const;
DOMString innerText() const;
DocumentFragmentImpl *createContextualFragment( const DOMString &html );
bool setInnerHTML( const DOMString &html );
+ bool setOuterHTML( const DOMString &html );
bool setInnerText( const DOMString &text );
virtual DOMString namespaceURI() const;
diff --git a/WebCore/kwq/DOMExtensions.h b/WebCore/kwq/DOMExtensions.h
index c78e165..f0ec0c2 100644
--- a/WebCore/kwq/DOMExtensions.h
+++ b/WebCore/kwq/DOMExtensions.h
@@ -27,19 +27,8 @@
@class DOMCSSStyleDeclaration;
- at interface DOMHTMLEmbedElement : DOMHTMLElement
-- (NSString *)align;
-- (void)setAlign:(NSString *)align;
-- (long)height;
-- (void)setHeight:(long)height;
-- (NSString *)name;
-- (void)setName:(NSString *)name;
-- (NSString *)src;
-- (void)setSrc:(NSString *)src;
-- (NSString *)type;
-- (void)setType:(NSString *)type;
-- (long)width;
-- (void)setWidth:(long)width;
+ at interface DOMDocument (DOMDocumentExtensions)
+- (DOMCSSStyleDeclaration *)createCSSStyleDeclaration;
@end
@interface DOMHTMLElement (DOMHTMLElementExtensions)
@@ -47,22 +36,25 @@
- (void)setInnerHTML:(NSString *)innerHTML;
- (NSString *)innerText;
- (void)setInnerText:(NSString *)innerText;
+- (NSString *)outerHTML;
+- (void)setOuterHTML:(NSString *)outerHTML;
- (DOMHTMLCollection *)children;
- (NSString *)contentEditable;
- (void)setContentEditable:(NSString *)contentEditable;
- (BOOL)isContentEditable;
@end
- at interface DOMHTMLTableElement (DOMHTMLTableElementExtensions)
-- (NSString *)background;
-- (void)setBackground:(NSString *)background;
- at end
-
- at interface DOMHTMLTableCellElement (DOMHTMLTableCellElementExtensions)
-- (NSString *)background;
-- (void)setBackground:(NSString *)background;
- at end
-
- at interface DOMDocument (DOMDocumentExtensions)
-- (DOMCSSStyleDeclaration *)createCSSStyleDeclaration;
+ at interface DOMHTMLEmbedElement : DOMHTMLElement
+- (NSString *)align;
+- (void)setAlign:(NSString *)align;
+- (long)height;
+- (void)setHeight:(long)height;
+- (NSString *)name;
+- (void)setName:(NSString *)name;
+- (NSString *)src;
+- (void)setSrc:(NSString *)src;
+- (NSString *)type;
+- (void)setType:(NSString *)type;
+- (long)width;
+- (void)setWidth:(long)width;
@end
diff --git a/WebCore/kwq/DOMHTML.mm b/WebCore/kwq/DOMHTML.mm
index bedb14c..3edd057 100644
--- a/WebCore/kwq/DOMHTML.mm
+++ b/WebCore/kwq/DOMHTML.mm
@@ -362,6 +362,16 @@ using DOM::NodeImpl;
[self _HTMLElementImpl]->setInnerHTML(innerHTML);
}
+- (NSString *)outerHTML
+{
+ return [self _HTMLElementImpl]->outerHTML();
+}
+
+- (void)setOuterHTML:(NSString *)outerHTML
+{
+ [self _HTMLElementImpl]->setOuterHTML(outerHTML);
+}
+
- (NSString *)innerText
{
return [self _HTMLElementImpl]->innerText();
@@ -3940,29 +3950,3 @@ using DOM::NodeImpl;
}
@end
-
- at implementation DOMHTMLTableElement (DOMHTMLTableElementExtensions)
-
-- (NSString *)background
-{
- return [self _tableElementImpl]->getAttribute(ATTR_BACKGROUND);
-}
-
-- (void)setBackground:(NSString *)background
-{
- [self _tableElementImpl]->setAttribute(ATTR_BACKGROUND, background);
-}
- at end
-
- at implementation DOMHTMLTableCellElement (DOMHTMLTableCellElementExtensions)
-
-- (NSString *)background
-{
- return [self _tableCellElementImpl]->getAttribute(ATTR_BACKGROUND);
-}
-
-- (void)setBackground:(NSString *)background
-{
- [self _tableCellElementImpl]->setAttribute(ATTR_BACKGROUND, background);
-}
- at end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 08fd63a..96f22f4 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2004-05-05 Chris Blumenberg <cblu at apple.com>
+
+ - DOM Extensions API tweaks
+
+ Reviewed by kocienda.
+
+ * DOM.subproj/DOMExtensions.h: copied from WebCore
+ * DOM.subproj/WebDOMOperations.h: added header doc comments
+ * DOM.subproj/WebDOMOperations.m:
+ (-[DOMNode _URLsFromSelectors:]): use renamed URLWithAttributeString
+ (-[DOMDocument URLWithAttributeString:]): renamed
+ (-[DOMHTMLTableElement _web_background]): new private method
+ (-[DOMHTMLTableElement _subresourceURLs]): use new private method
+ (-[DOMHTMLTableCellElement _web_background]): new private method
+ (-[DOMHTMLTableCellElement _subresourceURLs]): use new private method
+
2004-05-04 Ken Kocienda <kocienda at apple.com>
Reviewed by Hyatt
diff --git a/WebKit/DOM.subproj/DOMExtensions.h b/WebKit/DOM.subproj/DOMExtensions.h
index c78e165..f0ec0c2 100644
--- a/WebKit/DOM.subproj/DOMExtensions.h
+++ b/WebKit/DOM.subproj/DOMExtensions.h
@@ -27,19 +27,8 @@
@class DOMCSSStyleDeclaration;
- at interface DOMHTMLEmbedElement : DOMHTMLElement
-- (NSString *)align;
-- (void)setAlign:(NSString *)align;
-- (long)height;
-- (void)setHeight:(long)height;
-- (NSString *)name;
-- (void)setName:(NSString *)name;
-- (NSString *)src;
-- (void)setSrc:(NSString *)src;
-- (NSString *)type;
-- (void)setType:(NSString *)type;
-- (long)width;
-- (void)setWidth:(long)width;
+ at interface DOMDocument (DOMDocumentExtensions)
+- (DOMCSSStyleDeclaration *)createCSSStyleDeclaration;
@end
@interface DOMHTMLElement (DOMHTMLElementExtensions)
@@ -47,22 +36,25 @@
- (void)setInnerHTML:(NSString *)innerHTML;
- (NSString *)innerText;
- (void)setInnerText:(NSString *)innerText;
+- (NSString *)outerHTML;
+- (void)setOuterHTML:(NSString *)outerHTML;
- (DOMHTMLCollection *)children;
- (NSString *)contentEditable;
- (void)setContentEditable:(NSString *)contentEditable;
- (BOOL)isContentEditable;
@end
- at interface DOMHTMLTableElement (DOMHTMLTableElementExtensions)
-- (NSString *)background;
-- (void)setBackground:(NSString *)background;
- at end
-
- at interface DOMHTMLTableCellElement (DOMHTMLTableCellElementExtensions)
-- (NSString *)background;
-- (void)setBackground:(NSString *)background;
- at end
-
- at interface DOMDocument (DOMDocumentExtensions)
-- (DOMCSSStyleDeclaration *)createCSSStyleDeclaration;
+ at interface DOMHTMLEmbedElement : DOMHTMLElement
+- (NSString *)align;
+- (void)setAlign:(NSString *)align;
+- (long)height;
+- (void)setHeight:(long)height;
+- (NSString *)name;
+- (void)setName:(NSString *)name;
+- (NSString *)src;
+- (void)setSrc:(NSString *)src;
+- (NSString *)type;
+- (void)setType:(NSString *)type;
+- (long)width;
+- (void)setWidth:(long)width;
@end
diff --git a/WebKit/DOM.subproj/WebDOMOperations.h b/WebKit/DOM.subproj/WebDOMOperations.h
index 01e378e..b4dd9f6 100644
--- a/WebKit/DOM.subproj/WebDOMOperations.h
+++ b/WebKit/DOM.subproj/WebDOMOperations.h
@@ -18,12 +18,23 @@
@result A WebArchive representing the node and the children of the node.
*/
- (WebArchive *)webArchive;
-- (NSString *)markupString;
+
@end
@interface DOMDocument (WebDOMDocumentOperations)
+
+/*!
+ @method webFrame
+ @abstract Returns the frame of the DOM document.
+*/
- (WebFrame *)webFrame;
-- (NSURL *)URLWithRelativeString:(NSString *)string;
+
+/*!
+ @method URLWithAttributeString
+ @abstract Constructs a URL given an attribute string.
+*/
+- (NSURL *)URLWithAttributeString:(NSString *)string;
+
@end
@interface DOMRange (WebDOMRangeOperations)
@@ -33,6 +44,11 @@
@result A WebArchive representing the range.
*/
- (WebArchive *)webArchive;
+
+/*!
+ @method markupString
+ @result A markup string representing the range.
+*/
- (NSString *)markupString;
@end
diff --git a/WebKit/DOM.subproj/WebDOMOperations.m b/WebKit/DOM.subproj/WebDOMOperations.m
index d62ab80..afe16f6 100644
--- a/WebKit/DOM.subproj/WebDOMOperations.m
+++ b/WebKit/DOM.subproj/WebDOMOperations.m
@@ -45,7 +45,7 @@
do {
NSString *string = [self performSelector:selector];
if ([string length] > 0) {
- [URLs addObject:[[self ownerDocument] URLWithRelativeString:string]];
+ [URLs addObject:[[self ownerDocument] URLWithAttributeString:string]];
}
} while ((selector = va_arg(args, SEL)) != nil);
@@ -68,7 +68,7 @@
return [[self _bridge] webFrame];
}
-- (NSURL *)URLWithRelativeString:(NSString *)string
+- (NSURL *)URLWithAttributeString:(NSString *)string
{
return [[self _bridge] URLWithRelativeString:string];
}
@@ -183,18 +183,28 @@
@implementation DOMHTMLTableElement (WebDOMHTMLTableElementOperations)
+- (NSString *)_web_background
+{
+ return [self getAttribute:@"background"];
+}
+
- (NSArray *)_subresourceURLs
{
- return [self _URLsFromSelectors:@selector(background), nil];
+ return [self _URLsFromSelectors:@selector(_web_background), nil];
}
@end
@implementation DOMHTMLTableCellElement (WebDOMHTMLTableCellElementOperations)
+- (NSString *)_web_background
+{
+ return [self getAttribute:@"background"];
+}
+
- (NSArray *)_subresourceURLs
{
- return [self _URLsFromSelectors:@selector(background), nil];
+ return [self _URLsFromSelectors:@selector(_web_background), nil];
}
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list