[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:25:09 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 4b6af97952ed0288cd91edfff6af8316fee06183
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Feb 2 23:23:10 2004 +0000
WebCore:
Fixed: <rdar://problem/3546924>: REGRESSION: dragging text or images over a WebView is jerky
Reviewed by mjs.
* WebCore-combined.exp:
* WebCore.exp:
* kwq/WebCoreBridge.h: added the DOM node element key constant (SPI for now)
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]): instead of calling toHTML for every node, put the node on the element so the caller can get the HTML string representation when it needs to.
* kwq/WebCoreDOMNode.mm:
(-[WebCoreDOMNode HTMLString]): new
WebKit:
Fixed: <rdar://problem/3546924>: REGRESSION: dragging text or images over a WebView is jerky
Reviewed by mjs.
* DOM.subproj/WebDOMNode.h: added HTMLString to the protocol
* WebView.subproj/WebDefaultContextMenuDelegate.m:
(-[WebDefaultUIDelegate copyImageToClipboard:]): get the HTML representation via the DOM node
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _handleMouseDragged:]): get the HTML representation via the DOM node
* WebView.subproj/WebView.h: removed the HTML string element key constant
* WebView.subproj/WebView.m: removed the HTML string element key constant
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5b4eaf6..f93a5d7 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,17 @@
+2004-02-02 Chris Blumenberg <cblu at apple.com>
+
+ Fixed: <rdar://problem/3546924>: REGRESSION: dragging text or images over a WebView is jerky
+
+ Reviewed by mjs.
+
+ * WebCore-combined.exp:
+ * WebCore.exp:
+ * kwq/WebCoreBridge.h: added the DOM node element key constant (SPI for now)
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge elementAtPoint:]): instead of calling toHTML for every node, put the node on the element so the caller can get the HTML string representation when it needs to.
+ * kwq/WebCoreDOMNode.mm:
+ (-[WebCoreDOMNode HTMLString]): new
+
2004-02-02 Darin Adler <darin at apple.com>
Reviewed by Maciej.
diff --git a/WebCore/WebCore-combined.exp b/WebCore/WebCore-combined.exp
index 722fe4b..1eab8a1 100644
--- a/WebCore/WebCore-combined.exp
+++ b/WebCore/WebCore-combined.exp
@@ -11,6 +11,7 @@
.objc_class_name_WebCoreSettings
.objc_class_name_WebCoreTextRendererFactory
.objc_class_name_WebCoreViewFactory
+_WebCoreElementDOMNodeKey
_WebCoreElementFrameKey
_WebCoreElementImageAltStringKey
_WebCoreElementImageKey
diff --git a/WebCore/WebCore.exp b/WebCore/WebCore.exp
index b35128a..3b346d3 100644
--- a/WebCore/WebCore.exp
+++ b/WebCore/WebCore.exp
@@ -11,6 +11,7 @@
.objc_class_name_WebCoreSettings
.objc_class_name_WebCoreTextRendererFactory
.objc_class_name_WebCoreViewFactory
+_WebCoreElementDOMNodeKey
_WebCoreElementFrameKey
_WebCoreElementImageAltStringKey
_WebCoreElementImageKey
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 93916ea..86c67c4 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -63,8 +63,8 @@ typedef khtml::RenderPart KHTMLRenderPart;
@protocol WebDOMNode;
@protocol WebDOMElement;
+extern NSString *WebCoreElementDOMNodeKey;
extern NSString *WebCoreElementFrameKey;
-extern NSString *WebCoreElementHTMLStringKey;
extern NSString *WebCoreElementImageAltStringKey;
extern NSString *WebCoreElementImageKey;
extern NSString *WebCoreElementImageRectKey;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 10c133a..03e732c 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -90,8 +90,8 @@ using KParts::URLArgs;
using KJS::Bindings::RootObject;
+NSString *WebCoreElementDOMNodeKey = @"WebCoreElementDOMNode"; // not in WebKit API for now, could be in API some day
NSString *WebCoreElementFrameKey = @"WebElementFrame";
-NSString *WebCoreElementHTMLStringKey = @"WebElementHTMLString";
NSString *WebCoreElementImageAltStringKey = @"WebElementImageAltString";
NSString *WebCoreElementImageKey = @"WebElementImage";
NSString *WebCoreElementImageRectKey = @"WebElementImageRect";
@@ -877,10 +877,8 @@ static HTMLFormElementImpl *formElementFromDOMElement(id <WebDOMElement>element)
if (node) {
[element setObject:[NSNumber numberWithBool:node->isContentEditable()]
forKey:WebCoreElementIsEditableKey];
- NSString *HTMLString = node->recursive_toHTML(true).getNSString();
- if ([HTMLString length] != 0) {
- [element setObject:HTMLString forKey:WebCoreElementHTMLStringKey];
- }
+
+ [element setObject:[WebCoreDOMNode nodeWithImpl:node] forKey:WebCoreElementDOMNodeKey];
if (node->renderer() && node->renderer()->isImage()) {
RenderImage *r = static_cast<RenderImage *>(node->renderer());
diff --git a/WebCore/kwq/WebCoreDOMNode.mm b/WebCore/kwq/WebCoreDOMNode.mm
index f83c15c..a5c009f 100644
--- a/WebCore/kwq/WebCoreDOMNode.mm
+++ b/WebCore/kwq/WebCoreDOMNode.mm
@@ -350,6 +350,12 @@ DOM::ProcessingInstruction DOM::ProcessingInstructionImpl::createInstance(Proces
return instance.hasAttributes();
}
+- (NSString *)HTMLString
+{
+ DOM::Node instance([self impl]);
+ return instance.handle()->recursive_toHTML(true).getNSString();
+}
+
@end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 6ed9765..edb8c4f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,19 @@
2004-02-02 Chris Blumenberg <cblu at apple.com>
+ Fixed: <rdar://problem/3546924>: REGRESSION: dragging text or images over a WebView is jerky
+
+ Reviewed by mjs.
+
+ * DOM.subproj/WebDOMNode.h: added HTMLString to the protocol
+ * WebView.subproj/WebDefaultContextMenuDelegate.m:
+ (-[WebDefaultUIDelegate copyImageToClipboard:]): get the HTML representation via the DOM node
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView _handleMouseDragged:]): get the HTML representation via the DOM node
+ * WebView.subproj/WebView.h: removed the HTML string element key constant
+ * WebView.subproj/WebView.m: removed the HTML string element key constant
+
+2004-02-02 Chris Blumenberg <cblu at apple.com>
+
Fixed: <rdar://problem/3546426>: when copying images via context menus, only some data is added to the pasteboard
Reviewed by john.
diff --git a/WebKit/DOM.subproj/WebDOMNode.h b/WebKit/DOM.subproj/WebDOMNode.h
index 21859f8..2b975c7 100644
--- a/WebKit/DOM.subproj/WebDOMNode.h
+++ b/WebKit/DOM.subproj/WebDOMNode.h
@@ -76,6 +76,8 @@ enum WebNodeType {
- (BOOL)hasAttributes;
+- (NSString *)HTMLString;
+
@end
diff --git a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
index 974b427..a6c3537 100644
--- a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
@@ -6,15 +6,17 @@
#import <WebKit/WebDataSourcePrivate.h>
#import <WebKit/WebDefaultContextMenuDelegate.h>
#import <WebKit/WebDefaultUIDelegate.h>
+#import <WebKit/WebDOMNode.h>
#import <WebKit/WebFramePrivate.h>
+#import <WebKit/WebLocalizableStrings.h>
#import <WebKit/WebNSPasteboardExtras.h>
#import <WebKit/WebFrameView.h>
#import <WebKit/WebPolicyDelegate.h>
#import <WebKit/WebViewPrivate.h>
#import <WebKit/WebUIDelegate.h>
+#import <WebCore/WebCoreBridge.h>
-#import <WebKit/WebLocalizableStrings.h>
#import <Foundation/NSURLConnection.h>
#import <Foundation/NSURLRequest.h>
#import <Foundation/NSURLRequestPrivate.h>
@@ -213,7 +215,7 @@
URL:linkURL ? linkURL : imageURL
title:[element objectForKey:WebElementImageAltStringKey]
fileWrapper:[webView _fileWrapperForURL:imageURL]
- HTMLString:[element objectForKey:WebElementHTMLStringKey]];
+ HTMLString:[[element objectForKey:WebCoreElementDOMNodeKey] HTMLString]];
}
- (void)openFrameInNewWindow:(id)sender
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 4669c0f..f123850 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -677,7 +677,7 @@ static WebHTMLView *lastHitView = nil;
rect:[[element objectForKey:WebElementImageRectKey] rectValue]
URL:linkURL ? linkURL : imageURL
title:[element objectForKey:WebElementImageAltStringKey]
- HTMLString:[element objectForKey:WebElementHTMLStringKey]
+ HTMLString:[[element objectForKey:WebCoreElementDOMNodeKey] HTMLString]
event:_private->mouseDownEvent];
} else if (linkURL) {
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index 2986406..5d66038 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -20,7 +20,6 @@
// the WebContextMenuDelegate's contextMenuItemsForElement and the WebwebViewPolicyDelegate's clickPolicyForElement.
extern NSString *WebElementFrameKey; // WebFrame of the element
-extern NSString *WebElementHTMLStringKey; // NSString of the HTML representation of the element
extern NSString *WebElementImageAltStringKey; // NSString of the ALT attribute of the image element
extern NSString *WebElementImageKey; // NSImage of the image element
extern NSString *WebElementImageRectKey; // NSValue of an NSRect, the rect of the image element
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 25de2da..ab07064 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -64,7 +64,6 @@ static const struct UserAgentSpoofTableEntry *_web_findSpoofTableEntry(const cha
#undef __inline
NSString *WebElementFrameKey = @"WebElementFrame";
-NSString *WebElementHTMLStringKey = @"WebElementHTMLString";
NSString *WebElementImageKey = @"WebElementImage";
NSString *WebElementImageAltStringKey = @"WebElementImageAltString";
NSString *WebElementImageRectKey = @"WebElementImageRect";
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list