[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:34:16 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 0acf5349ef2ab6dc729d392b43a1aebd1750d1a2
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Apr 14 01:00:47 2004 +0000
WebCore:
- Removed WebCoreElementIsEditableKey. This functionality is available via [DOMNode isContentEditable].
Reviewed by rjw.
* WebCore-combined.exp:
* WebCore.exp:
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]): removed use of WebCoreElementIsEditableKey
(-[WebCoreBridge URLWithRelativeString:]): new method for WebKit API
WebKit:
- Added WebElementDOMNodeKey as a potential API so that clients can get the node from an element dictionary.
- Removed WebElementIsEditableKey. This functionality is available via [DOMNode isContentEditable].
Reviewed by rjw.
* DOM.subproj/WebDOMOperations.h:
* DOM.subproj/WebDOMOperations.m:
(-[DOMDocument URLWithRelativeString:]): new potential API
* WebView.subproj/WebDefaultContextMenuDelegate.m:
(-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]): indenting tweak
(-[WebDefaultUIDelegate copyImageToClipboard:]): use WebElementDOMNodeKey
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _handleMouseDragged:]): use WebElementDOMNodeKey
(-[WebHTMLView _dragOperationForDraggingInfo:]): use isContentEditable
* WebView.subproj/WebView.h:
* WebView.subproj/WebView.m:
* WebView.subproj/WebViewPrivate.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a612e21..80295eb 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2004-04-13 Chris Blumenberg <cblu at apple.com>
+
+ - Removed WebCoreElementIsEditableKey. This functionality is available via [DOMNode isContentEditable].
+
+ Reviewed by rjw.
+
+ * WebCore-combined.exp:
+ * WebCore.exp:
+ * kwq/WebCoreBridge.h:
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge elementAtPoint:]): removed use of WebCoreElementIsEditableKey
+ (-[WebCoreBridge URLWithRelativeString:]): new method for WebKit API
+
2004-04-13 David Hyatt <hyatt at apple.com>
Fix for 3559764, make sure overflow is applied consistently using a separate bit on render objects, so that
diff --git a/WebCore/WebCore-combined.exp b/WebCore/WebCore-combined.exp
index aa56999..63aa7af 100644
--- a/WebCore/WebCore-combined.exp
+++ b/WebCore/WebCore-combined.exp
@@ -1,3 +1,6 @@
+.objc_class_name_DOMDocument
+.objc_class_name_DOMHTMLAnchorElement
+.objc_class_name_DOMHTMLAreaElement
.objc_class_name_DOMHTMLImageElement
.objc_class_name_DOMNode
.objc_class_name_DOMRange
diff --git a/WebCore/WebCore.exp b/WebCore/WebCore.exp
index 589727a..b7bf47b 100644
--- a/WebCore/WebCore.exp
+++ b/WebCore/WebCore.exp
@@ -1,3 +1,6 @@
+.objc_class_name_DOMDocument
+.objc_class_name_DOMHTMLAnchorElement
+.objc_class_name_DOMHTMLAreaElement
.objc_class_name_DOMHTMLImageElement
.objc_class_name_DOMNode
.objc_class_name_DOMRange
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 81cd133..a08367a 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -72,7 +72,6 @@ extern NSString *WebCoreElementImageAltStringKey;
extern NSString *WebCoreElementImageKey;
extern NSString *WebCoreElementImageRectKey;
extern NSString *WebCoreElementImageURLKey;
-extern NSString *WebCoreElementIsEditableKey;
extern NSString *WebCoreElementIsSelectedKey;
extern NSString *WebCoreElementLinkURLKey;
extern NSString *WebCoreElementLinkTargetFrameKey;
@@ -204,6 +203,8 @@ typedef enum {
- (NSString *)renderTreeAsExternalRepresentation;
- (NSDictionary *)elementAtPoint:(NSPoint)point;
+- (NSURL *)URLWithRelativeString:(NSString *)string;
+
- (DOMElement *)elementWithName:(NSString *)name inForm:(DOMElement *)form;
- (DOMElement *)elementForView:(NSView *)view;
- (BOOL)elementDoesAutoComplete:(DOMElement *)element;
@@ -246,8 +247,6 @@ typedef enum {
- (NSRect)visibleSelectionRect;
- (NSImage *)selectionImage;
-- (NSImage *)imageForImageElement:(DOMHTMLImageElement *)element;
-
- (DOMNode *)selectionStart;
- (int)selectionStartOffset;
- (DOMNode *)selectionEnd;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 870cc75..6d1b3fe 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -111,13 +111,12 @@ using KParts::URLArgs;
using KJS::Bindings::RootObject;
-NSString *WebCoreElementDOMNodeKey = @"WebCoreElementDOMNode"; // not in WebKit API for now, could be in API some day
+NSString *WebCoreElementDOMNodeKey = @"WebElementDOMNode";
NSString *WebCoreElementFrameKey = @"WebElementFrame";
NSString *WebCoreElementImageAltStringKey = @"WebElementImageAltString";
NSString *WebCoreElementImageKey = @"WebElementImage";
NSString *WebCoreElementImageRectKey = @"WebElementImageRect";
NSString *WebCoreElementImageURLKey = @"WebElementImageURL";
-NSString *WebCoreElementIsEditableKey = @"WebElementIsEditable";
NSString *WebCoreElementIsSelectedKey = @"WebElementIsSelected";
NSString *WebCoreElementLinkURLKey = @"WebElementLinkURL";
NSString *WebCoreElementLinkTargetFrameKey = @"WebElementTargetFrame";
@@ -944,9 +943,6 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
NodeImpl *node = nodeInfo.innerNonSharedNode();
if (node) {
- [element setObject:[NSNumber numberWithBool:node->isContentEditable()]
- forKey:WebCoreElementIsEditableKey];
-
[element setObject:[DOMNode _nodeWithImpl:node] forKey:WebCoreElementDOMNodeKey];
if (node->renderer() && node->renderer()->isImage()) {
@@ -994,6 +990,16 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
return element;
}
+- (NSURL *)URLWithRelativeString:(NSString *)string
+{
+ DocumentImpl *doc = _part->xmlDocImpl();
+ if (!doc) {
+ return nil;
+ }
+ QString rel = parseURL(QString::fromNSString(string)).string();
+ return KURL(doc->baseURL(), rel, doc->decoder() ? doc->decoder()->codec() : 0).getNSURL();
+}
+
- (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag
{
return _part->findString(string, forward, caseFlag, wrapFlag);
@@ -1144,15 +1150,6 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
return selectionImage;
}
-- (NSImage *)imageForImageElement:(DOMHTMLImageElement *)element
-{
- RenderImage *r = static_cast<RenderImage *>([element _nodeImpl]->renderer());
- if (r && r->isImage() && !r->isDisplayingError()) {
- return r->pixmap().image();
- }
- return nil;
-}
-
- (void)setName:(NSString *)name
{
_part->KHTMLPart::setName(QString::fromNSString(name));
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 96e0b9e..30e40d9 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,25 @@
2004-04-13 Chris Blumenberg <cblu at apple.com>
+ - Added WebElementDOMNodeKey as a potential API so that clients can get the node from an element dictionary.
+ - Removed WebElementIsEditableKey. This functionality is available via [DOMNode isContentEditable].
+
+ Reviewed by rjw.
+
+ * DOM.subproj/WebDOMOperations.h:
+ * DOM.subproj/WebDOMOperations.m:
+ (-[DOMDocument URLWithRelativeString:]): new potential API
+ * WebView.subproj/WebDefaultContextMenuDelegate.m:
+ (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]): indenting tweak
+ (-[WebDefaultUIDelegate copyImageToClipboard:]): use WebElementDOMNodeKey
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView _handleMouseDragged:]): use WebElementDOMNodeKey
+ (-[WebHTMLView _dragOperationForDraggingInfo:]): use isContentEditable
+ * WebView.subproj/WebView.h:
+ * WebView.subproj/WebView.m:
+ * WebView.subproj/WebViewPrivate.h:
+
+2004-04-13 Chris Blumenberg <cblu at apple.com>
+
Fixed deployment build failure.
Reviewed by john.
diff --git a/WebKit/DOM.subproj/WebDOMOperations.h b/WebKit/DOM.subproj/WebDOMOperations.h
index e9c5012..4ae9914 100644
--- a/WebKit/DOM.subproj/WebDOMOperations.h
+++ b/WebKit/DOM.subproj/WebDOMOperations.h
@@ -5,7 +5,8 @@
Public header file.
*/
-#import <WebKit/DOM.h>
+#import <WebKit/DOMCore.h>
+#import <WebKit/DOMRange.h>
@class WebArchive;
@@ -14,11 +15,11 @@
- (NSString *)markupString;
@end
+ at interface DOMDocument (WebDOMDocumentOperations)
+- (NSURL *)URLWithRelativeString:(NSString *)string;
+ at end
+
@interface DOMRange (WebDOMRangeOperations)
- (WebArchive *)webArchive;
- (NSString *)markupString;
@end
-
- at interface DOMHTMLImageElement (WebDOMHTMLImageElementOperations)
-- (NSImage *)image;
- at end
diff --git a/WebKit/DOM.subproj/WebDOMOperations.m b/WebKit/DOM.subproj/WebDOMOperations.m
index d17e537..eb0c225 100644
--- a/WebKit/DOM.subproj/WebDOMOperations.m
+++ b/WebKit/DOM.subproj/WebDOMOperations.m
@@ -5,6 +5,7 @@
#import <WebKit/WebDOMOperations.h>
+#import <WebKit/WebAssertions.h>
#import <WebKit/WebBridge.h>
#import <WebKit/WebDataSourcePrivate.h>
#import <WebKit/WebFramePrivate.h>
@@ -39,6 +40,15 @@
@end
+ at implementation DOMDocument (WebDOMDocumentOperations)
+
+- (NSURL *)URLWithRelativeString:(NSString *)string
+{
+ return [[self _bridge] URLWithRelativeString:string];
+}
+
+ at end
+
@implementation DOMRange (WebDOMRangeOperations)
- (WebBridge *)_bridge
@@ -60,12 +70,3 @@
}
@end
-
- at implementation DOMHTMLImageElement (WebDOMHTMLImageElementOperations)
-
-- (NSImage *)image
-{
- return [[self _bridge] imageForImageElement:self];
-}
-
- at end
diff --git a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
index f28c0bd..e92ea95 100644
--- a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
@@ -104,9 +104,9 @@
- (NSArray *)webView: (WebView *)wv contextMenuItemsForElement: (NSDictionary *)element defaultMenuItems: (NSArray *)defaultMenuItems
{
NSMutableArray *menuItems = [NSMutableArray array];
-
+
NSURL *linkURL = [element objectForKey:WebElementLinkURLKey];
-
+
if (linkURL) {
if([WebView _canHandleRequest:[NSURLRequest requestWithURL:linkURL]]) {
[menuItems addObject:[self menuItemWithTag:WebMenuItemTagOpenLinkInNewWindow]];
@@ -114,7 +114,7 @@
}
[menuItems addObject:[self menuItemWithTag:WebMenuItemTagCopyLinkToClipboard]];
}
-
+
NSURL *imageURL = [element objectForKey:WebElementImageURLKey];
if (imageURL) {
if (linkURL) {
@@ -124,33 +124,33 @@
[menuItems addObject:[self menuItemWithTag:WebMenuItemTagDownloadImageToDisk]];
[menuItems addObject:[self menuItemWithTag:WebMenuItemTagCopyImageToClipboard]];
}
-
+
if (!imageURL && !linkURL) {
if ([[element objectForKey:WebElementIsSelectedKey] boolValue]) {
[menuItems addObject:[self menuItemWithTag:WebMenuItemTagCopy]];
} else {
- if ([wv canGoBack]) {
- [menuItems addObject:[self menuItemWithTag:WebMenuItemTagGoBack]];
- }
- if ([wv canGoForward]) {
- [menuItems addObject:[self menuItemWithTag:WebMenuItemTagGoForward]];
- }
- if ([wv isLoading]) {
- [menuItems addObject:[self menuItemWithTag:WebMenuItemTagStop]];
- } else {
- [menuItems addObject:[self menuItemWithTag:WebMenuItemTagReload]];
- }
-
+ if ([wv canGoBack]) {
+ [menuItems addObject:[self menuItemWithTag:WebMenuItemTagGoBack]];
+ }
+ if ([wv canGoForward]) {
+ [menuItems addObject:[self menuItemWithTag:WebMenuItemTagGoForward]];
+ }
+ if ([wv isLoading]) {
+ [menuItems addObject:[self menuItemWithTag:WebMenuItemTagStop]];
+ } else {
+ [menuItems addObject:[self menuItemWithTag:WebMenuItemTagReload]];
+ }
+
WebFrame *webFrame = [element objectForKey:WebElementFrameKey];
if (webFrame != [wv mainFrame]) {
[menuItems addObject:[self menuItemWithTag:WebMenuItemTagOpenFrameInNewWindow]];
}
}
}
-
+
// Attach element as the represented object to each item.
[menuItems makeObjectsPerformSelector:@selector(setRepresentedObject:) withObject:element];
-
+
return menuItems;
}
@@ -215,7 +215,7 @@
[[NSPasteboard generalPasteboard] _web_writeImage:[element objectForKey:WebElementImageKey]
URL:linkURL ? linkURL : [element objectForKey:WebElementImageURLKey]
title:[element objectForKey:WebElementImageAltStringKey]
- archive:[[element objectForKey:WebCoreElementDOMNodeKey] webArchive]];
+ archive:[[element objectForKey:WebElementDOMNodeKey] webArchive]];
}
- (void)openFrameInNewWindow:(id)sender
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index fa55d8e..22b48f0 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -6,6 +6,7 @@
#import <WebKit/WebHTMLView.h>
#import <WebKit/DOM.h>
+#import <WebKit/DOMExtensions.h>
#import <WebKit/WebArchive.h>
#import <WebKit/WebBridge.h>
#import <WebKit/WebClipView.h>
@@ -744,7 +745,7 @@ static WebHTMLView *lastHitView = nil;
WebImageRenderer *image = [element objectForKey:WebElementImageKey];
ASSERT([image isKindOfClass:[WebImageRenderer class]]);
[self _web_dragImage:image
- archive:[[element objectForKey:WebCoreElementDOMNodeKey] webArchive]
+ archive:[[element objectForKey:WebElementDOMNodeKey] webArchive]
rect:[[element objectForKey:WebElementImageRectKey] rectValue]
URL:linkURL ? linkURL : imageURL
title:[element objectForKey:WebElementImageAltStringKey]
@@ -1668,7 +1669,7 @@ static WebHTMLView *lastHitView = nil;
{
NSPoint point = [self convertPoint:[sender draggingLocation] fromView:nil];
NSDictionary *element = [self _elementAtPoint:point];
- if ([[element objectForKey:WebElementIsEditableKey] boolValue] && [[self _bridge] moveCaretToPoint:point]) {
+ if ([[element objectForKey:WebElementDOMNodeKey] isContentEditable] && [[self _bridge] moveCaretToPoint:point]) {
if (_private->isDragging) {
if ([[element objectForKey:WebElementIsSelectedKey] boolValue]) {
return NSDragOperationMove;
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index 5d66038..391a9d9 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -24,7 +24,6 @@ extern NSString *WebElementImageAltStringKey; // NSString of the ALT attribute o
extern NSString *WebElementImageKey; // NSImage of the image element
extern NSString *WebElementImageRectKey; // NSValue of an NSRect, the rect of the image element
extern NSString *WebElementImageURLKey; // NSURL of the image element
-extern NSString *WebElementIsEditableKey; // NSNumber of BOOL indicating whether the element is editable or not
extern NSString *WebElementIsSelectedKey; // NSNumber of BOOL indicating whether the element is selected or not
extern NSString *WebElementLinkURLKey; // NSURL of the link if the element is within an anchor
extern NSString *WebElementLinkTargetFrameKey; // NSString of the target of the anchor
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 068dbc0..6e17835 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -59,12 +59,12 @@
#import <Foundation/NSURLRequestPrivate.h>
#import <Foundation/NSUserDefaults_NSURLExtras.h>
+NSString *WebElementDOMNodeKey = @"WebElementDOMNode";
NSString *WebElementFrameKey = @"WebElementFrame";
NSString *WebElementImageKey = @"WebElementImage";
NSString *WebElementImageAltStringKey = @"WebElementImageAltString";
NSString *WebElementImageRectKey = @"WebElementImageRect";
NSString *WebElementImageURLKey = @"WebElementImageURL";
-NSString *WebElementIsEditableKey = @"WebElementIsEditable";
NSString *WebElementIsSelectedKey = @"WebElementIsSelected";
NSString *WebElementLinkURLKey = @"WebElementLinkURL";
NSString *WebElementLinkTargetFrameKey = @"WebElementTargetFrame";
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index 9b577e3..2e66618 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -29,6 +29,9 @@ typedef struct _WebResourceDelegateImplementationCache {
uint delegateImplementsIdentifierForRequest:1;
} WebResourceDelegateImplementationCache;
+// To be made public:
+extern NSString *WebElementDOMNodeKey;
+
extern NSString *_WebCanGoBackKey;
extern NSString *_WebCanGoForwardKey;
extern NSString *_WebEstimatedProgressKey;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list