Commit 03a86c79 authored by kocienda's avatar kocienda

WebCore:

        Reviewed by Chris

        * WebCore.pbproj/project.pbxproj:
        * khtml/xml/dom2_rangeimpl.h: Now includes createInstance glue function as do the other
        khtml DOM objects that we reflect into ObjC.
        * kwq/DOM-compat.h: Added. Compatibility declarations for DOM SPI. Note that this file
        is copied into WebKit by the build system as needed.
        * kwq/DOM.h: Added. New home for DOM SPI. Note that this file is copied into WebKit by the build
        system as needed.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::recordFormValue): Updated usage to new DOM SPI.
        * kwq/WebCoreBridge.h: Updated usage to new DOM SPI.
        * kwq/WebCoreBridge.mm: Updated usage to new DOM SPI. Needed to add DOM range impl include since
        includes jiggered around and this needed header was no longer included indirectly.
        (-[WebCoreBridge elementForView:]): Ditto.
        (inputElementFromDOMElement): Ditto.
        (formElementFromDOMElement): Ditto.
        (-[WebCoreBridge elementWithName:inForm:]): Ditto.
        (-[WebCoreBridge elementDoesAutoComplete:]): Ditto.
        (-[WebCoreBridge elementIsPassword:]): Ditto.
        (-[WebCoreBridge currentForm]): Ditto.
        (-[WebCoreBridge controlsInForm:]): Ditto.
        (-[WebCoreBridge searchForLabels:beforeElement:]): Ditto.
        (-[WebCoreBridge matchLabels:againstElement:]): Ditto.
        (-[WebCoreBridge elementAtPoint:]): Ditto.
        (-[WebCoreBridge DOMDocument]): Ditto.
        (-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]): Ditto.
        (-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]): Ditto.
        (-[WebCoreBridge selectionStart]): Ditto.
        (-[WebCoreBridge selectionEnd]): Ditto.
        * kwq/WebCoreDOM.h: New home for all private declarations needed for reflecting DOM into ObjC.
        * kwq/WebCoreDOM.mm: Added. New home for all implementations needed for reflecting DOM into ObjC.
        * kwq/WebCoreDOMDocument.mm: Removed. All ObjC DOM implementation now in WebCoreDOM.mm.
        * kwq/WebCoreDOMNode.mm: Removed. All ObjC DOM implementation now in WebCoreDOM.mm.
        * kwq/WebCoreDOMPrivate.h: Removed.
        * kwq/WebDOMDocument.h: Removed.
        * kwq/WebDOMElement.h: Removed.
        * kwq/WebDOMNode.h: Removed.

WebKit:

        Reviewed by Chris

        Updated usage of DOM SPI to use new names and conventions.

        Unless indicated otherwise, the changes were to update protocol names for, which
        changed from using a "WebDOM" prefix to a "DOM" prefix, and changing now need
        only include the DOM.h header from WebKit to get everything.

        * DOM.subproj/DOM-compat.h: Added. This header contains some compatibility declarations
        to work with older clients of our DOM SPI. Though this file is checked into WebKit,
        it really lives and should be updated in WebCore. It is copied into WebKit by the build
        system as needed.
        * DOM.subproj/DOM.h: Added. This file includes the new "guts" of the DOM SPI. As above,
        this file is checked into WebKit, it really lives and should be updated in WebCore.
        It is copied into WebKit by the build system as needed.
        * DOM.subproj/WebDOMDocument.h: Removed declarations. Now just includes DOM.h and DOM-compat.h
        * DOM.subproj/WebDOMDocument.m: Removed.
        * DOM.subproj/WebDOMElement.h: Removed declarations. Now just includes DOM.h and DOM-compat.h
        * DOM.subproj/WebDOMElement.m: Removed.
        * DOM.subproj/WebDOMNode.h: Removed declarations. Now just includes DOM.h and DOM-compat.h
        * DOM.subproj/WebDOMNode.m: Removed.
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge loadURL:referrer:reload:onLoadEvent:target:triggeringEvent:form:formValues:])
        (-[WebBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:])
        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        * WebView.subproj/WebFormDelegate.h:
        * WebView.subproj/WebFormDelegate.m:
        (-[WebFormDelegate frame:sourceFrame:willSubmitForm:withValues:submissionListener:])
        * WebView.subproj/WebFrame.h: Unrelated change. Removed -undoManager accessor from public header. Moved to private header.
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:])
        (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:])
        (-[WebFrame undoManager]): Moved -undoManager accessor to private category implementation.
        (-[WebFormState initWithForm:values:sourceFrame:])
        (-[WebFormState form])
        (-[WebFrame childFrames])
        * WebView.subproj/WebFramePrivate.h: Moved in -undoManager accessor.
        * WebView.subproj/WebHTMLRepresentation.h:
        * WebView.subproj/WebHTMLRepresentation.m:
        (-[WebHTMLRepresentation DOMDocument])
        (-[WebHTMLRepresentation setSelectionFrom:startOffset:to:endOffset:])
        (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:])
        (-[WebHTMLRepresentation elementWithName:inForm:])
        (-[WebHTMLRepresentation elementForView:])
        (-[WebHTMLRepresentation elementDoesAutoComplete:])
        (-[WebHTMLRepresentation elementIsPassword:])
        (-[WebHTMLRepresentation formForElement:])
        (-[WebHTMLRepresentation controlsInForm:])
        (-[WebHTMLRepresentation searchForLabels:beforeElement:])
        (-[WebHTMLRepresentation matchLabels:againstElement:])
        * WebView.subproj/WebHTMLView.m:
        * copy-webcore-files-to-webkit: Added. Copies DOM.h and DOM-compat.h from WebCore when they
        have been updated there.

WebBrowser:

        Reviewed by Chris

        Updated usage of DOM SPI to use new names and conventions.

        In each case, protocol names for DOM objects were changed from using a
        "WebDOM" prefix to a "DOM" prefix, and clients now need only include the
        DOM.h header from WebKit to get everything.

        * BrowserWebController.m:
        (-[FormDelegate frame:sourceFrame:willSubmitForm:withValues:submissionListener:])
        * Debug/SnippetController.m:
        (lastNode)
        (-[SnippetController loadComplete])
        * FormCompletionController.h:
        * FormCompletionController.m:
        (+[FormCompletionController loginInfoForForm:inFrame:])
        (+[FormCompletionController _frame:sourceFrame:willSubmitLoginForm:withValues:formInfo:submissionListener:])
        (+[FormCompletionController _frame:sourceFrame:willSubmitRegularForm:withValues:])
        (+[FormCompletionController frame:sourceFrame:willSubmitForm:withValues:submissionListener:])
        (+[FormCompletionController currentFormInFrame:])
        (+[FormCompletionController currentFrameAndForm:inWebView:])
        (+[FormCompletionController autoFillInWebView:])
        (+[FormCompletionController autoFillPasswordInFrame:])
        (-[FormCompletionController initWithSourceField:frame:])
        (-[FormCompletionController maxStringLength])
        (+[AutoFillController autoFillerForFrame:form:create:])
        (+[AutoFillController abMatchInFrame:form:fieldName:])
        (+[AutoFillController recordABMatch:inFrame:form:fieldName:])
        (+[AutoFillController clearAutoFilledView:inFrame:form:])
        (-[AutoFillController _fieldNameForAutoFillOfView:rep:])
        (-[FormToABBinder abPointerForFieldName:view:rep:foundByPageScan:])


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1e1f9883
2004-02-26 Ken Kocienda <kocienda@apple.com>
Reviewed by Chris
* WebCore.pbproj/project.pbxproj:
* khtml/xml/dom2_rangeimpl.h: Now includes createInstance glue function as do the other
khtml DOM objects that we reflect into ObjC.
* kwq/DOM-compat.h: Added. Compatibility declarations for DOM SPI. Note that this file
is copied into WebKit by the build system as needed.
* kwq/DOM.h: Added. New home for DOM SPI. Note that this file is copied into WebKit by the build
system as needed.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::recordFormValue): Updated usage to new DOM SPI.
* kwq/WebCoreBridge.h: Updated usage to new DOM SPI.
* kwq/WebCoreBridge.mm: Updated usage to new DOM SPI. Needed to add DOM range impl include since
includes jiggered around and this needed header was no longer included indirectly.
(-[WebCoreBridge elementForView:]): Ditto.
(inputElementFromDOMElement): Ditto.
(formElementFromDOMElement): Ditto.
(-[WebCoreBridge elementWithName:inForm:]): Ditto.
(-[WebCoreBridge elementDoesAutoComplete:]): Ditto.
(-[WebCoreBridge elementIsPassword:]): Ditto.
(-[WebCoreBridge currentForm]): Ditto.
(-[WebCoreBridge controlsInForm:]): Ditto.
(-[WebCoreBridge searchForLabels:beforeElement:]): Ditto.
(-[WebCoreBridge matchLabels:againstElement:]): Ditto.
(-[WebCoreBridge elementAtPoint:]): Ditto.
(-[WebCoreBridge DOMDocument]): Ditto.
(-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]): Ditto.
(-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]): Ditto.
(-[WebCoreBridge selectionStart]): Ditto.
(-[WebCoreBridge selectionEnd]): Ditto.
* kwq/WebCoreDOM.h: New home for all private declarations needed for reflecting DOM into ObjC.
* kwq/WebCoreDOM.mm: Added. New home for all implementations needed for reflecting DOM into ObjC.
* kwq/WebCoreDOMDocument.mm: Removed. All ObjC DOM implementation now in WebCoreDOM.mm.
* kwq/WebCoreDOMNode.mm: Removed. All ObjC DOM implementation now in WebCoreDOM.mm.
* kwq/WebCoreDOMPrivate.h: Removed.
* kwq/WebDOMDocument.h: Removed.
* kwq/WebDOMElement.h: Removed.
* kwq/WebDOMNode.h: Removed.
2004-02-25 John Sullivan <sullivan@apple.com>
WebCore part of fix for <rdar://problem/3546370>: add a way to tab to menus,
......
......@@ -468,7 +468,6 @@
F5B2A4FE02E2220F018635CB,
F58785DB02DE375901EA4122,
F565A2740352509B01A80180,
F565A27D035284E301A80180,
F56234E103026D7301629B47,
F58785DE02DE375901EA4122,
F5517DC4031AB56301A80180,
......@@ -482,9 +481,6 @@
F58785E402DE375901EA4122,
517FA6B30370BD6100CA2D3A,
F58785E602DE375901EA4122,
F5EDAAF7035345D901A80180,
F5EDAAF8035345D901A80180,
F5EDAAFA035345D901A80180,
F587861502DE382001EA4122,
F58786DF02DE3B8601EA4122,
F58786EC02DE3B8601EA4122,
......@@ -512,14 +508,16 @@
BC745A1D05955F390058C893,
BCBDB03A0597B36E00B83B92,
BCBDB096059A28B100B83B92,
BEB1DD2805C197F800DD1F43,
BEB1DD3205C1980700DD1F43,
BEB1DD3E05C1982000DD1F43,
BC7FDE3405C1D9AB0070A902,
BC7E782205C5EB700088A50F,
BC3B364905C9D5E200E42902,
BC3B364A05C9D5E200E42902,
BE9580F905DA973B00EC5B54,
BE16801905EDB91A00B87935,
BE16801A05EDB91A00B87935,
BE9185E105EE59B80081354D,
BE9185E205EE59B80081354D,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
......@@ -750,8 +748,6 @@
9377FB58032C235C008635CE,
93861DE2032C2E52008635CE,
93CCF7D7033BD43C008635CE,
F565A2780352643A01A80180,
F565A27B0352675C01A80180,
93386B93037045B3008635CE,
517FA6B70370C7ED00CA2D3A,
931C8A190380288B008635CE,
......@@ -789,13 +785,14 @@
BC745A1C05955F390058C893,
BCBDB0390597B36E00B83B92,
BCBDB095059A28B100B83B92,
BEB1DD2705C197F800DD1F43,
BEB1DD3105C1980700DD1F43,
BEB1DD3D05C1982000DD1F43,
BC7FDE3305C1D9AB0070A902,
BC3B364805C9D5E200E42902,
BC433AD005D3046F003A5A14,
BE9580F805DA973B00EC5B54,
BE16801C05EDBAC000B87935,
BE9185E305EE59B80081354D,
BE9185E405EE59B80081354D,
);
isa = PBXSourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
......@@ -2508,6 +2505,48 @@
//BE2
//BE3
//BE4
BE16801705EDB91A00B87935 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
path = DOM.h;
refType = 4;
sourceTree = "<group>";
};
BE16801805EDB91A00B87935 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
path = "DOM-compat.h";
refType = 4;
sourceTree = "<group>";
};
BE16801905EDB91A00B87935 = {
fileRef = BE16801705EDB91A00B87935;
isa = PBXBuildFile;
settings = {
};
};
BE16801A05EDB91A00B87935 = {
fileRef = BE16801805EDB91A00B87935;
isa = PBXBuildFile;
settings = {
};
};
BE16801B05EDBAC000B87935 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.cpp.objcpp;
path = WebCoreDOM.mm;
refType = 4;
sourceTree = "<group>";
};
BE16801C05EDBAC000B87935 = {
fileRef = BE16801B05EDBAC000B87935;
isa = PBXBuildFile;
settings = {
};
};
BE26F15305517DE000BFA0C3 = {
fileEncoding = 30;
isa = PBXFileReference;
......@@ -2539,16 +2578,16 @@
settings = {
};
};
BE9580F605DA973B00EC5B54 = {
BE9185DD05EE59B80081354D = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.cpp.cpp;
name = htmlediting_impl.cpp;
path = editing/htmlediting_impl.cpp;
lastKnownFileType = sourcecode.c.h;
name = htmlediting.h;
path = editing/htmlediting.h;
refType = 4;
sourceTree = "<group>";
};
BE9580F705DA973B00EC5B54 = {
BE9185DE05EE59B80081354D = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
......@@ -2557,14 +2596,44 @@
refType = 4;
sourceTree = "<group>";
};
BE9580F805DA973B00EC5B54 = {
fileRef = BE9580F605DA973B00EC5B54;
BE9185DF05EE59B80081354D = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.cpp.cpp;
name = htmlediting_impl.cpp;
path = editing/htmlediting_impl.cpp;
refType = 4;
sourceTree = "<group>";
};
BE9185E005EE59B80081354D = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.cpp.cpp;
name = htmlediting.cpp;
path = editing/htmlediting.cpp;
refType = 4;
sourceTree = "<group>";
};
BE9185E105EE59B80081354D = {
fileRef = BE9185DD05EE59B80081354D;
isa = PBXBuildFile;
settings = {
};
};
BE9185E205EE59B80081354D = {
fileRef = BE9185DE05EE59B80081354D;
isa = PBXBuildFile;
settings = {
};
};
BE9580F905DA973B00EC5B54 = {
fileRef = BE9580F705DA973B00EC5B54;
BE9185E305EE59B80081354D = {
fileRef = BE9185DF05EE59B80081354D;
isa = PBXBuildFile;
settings = {
};
};
BE9185E405EE59B80081354D = {
fileRef = BE9185E005EE59B80081354D;
isa = PBXBuildFile;
settings = {
};
......@@ -2588,46 +2657,16 @@
};
BEB1DD0805C197DF00DD1F43 = {
children = (
BEB1DD2605C197F800DD1F43,
BEB1DD2505C197F800DD1F43,
BE9580F605DA973B00EC5B54,
BE9580F705DA973B00EC5B54,
BE9185E005EE59B80081354D,
BE9185DD05EE59B80081354D,
BE9185DE05EE59B80081354D,
BE9185DF05EE59B80081354D,
);
isa = PBXGroup;
name = editing;
refType = 4;
sourceTree = "<group>";
};
BEB1DD2505C197F800DD1F43 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.cpp.cpp;
name = htmlediting.cpp;
path = editing/htmlediting.cpp;
refType = 4;
sourceTree = "<group>";
};
BEB1DD2605C197F800DD1F43 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = htmlediting.h;
path = editing/htmlediting.h;
refType = 4;
sourceTree = "<group>";
};
BEB1DD2705C197F800DD1F43 = {
fileRef = BEB1DD2505C197F800DD1F43;
isa = PBXBuildFile;
settings = {
};
};
BEB1DD2805C197F800DD1F43 = {
fileRef = BEB1DD2605C197F800DD1F43;
isa = PBXBuildFile;
settings = {
};
};
BEB1DD2F05C1980700DD1F43 = {
fileEncoding = 30;
isa = PBXFileReference;
......@@ -6168,13 +6207,10 @@
};
F565A2700352410501A80180 = {
children = (
BE16801705EDB91A00B87935,
BE16801805EDB91A00B87935,
F565A2730352509B01A80180,
F565A2770352643A01A80180,
F565A27A0352675C01A80180,
F565A27C035284E301A80180,
F5EDAAF3035345D901A80180,
F5EDAAF4035345D901A80180,
F5EDAAF6035345D901A80180,
BE16801B05EDBAC000B87935,
);
isa = PBXGroup;
name = DOM;
......@@ -6198,49 +6234,6 @@
);
};
};
F565A2770352643A01A80180 = {
fileEncoding = 4;
isa = PBXFileReference;
lastKnownFileType = sourcecode.cpp.objcpp;
name = WebCoreDOMDocument.mm;
path = kwq/WebCoreDOMDocument.mm;
refType = 2;
sourceTree = SOURCE_ROOT;
};
F565A2780352643A01A80180 = {
fileRef = F565A2770352643A01A80180;
isa = PBXBuildFile;
settings = {
};
};
F565A27A0352675C01A80180 = {
fileEncoding = 4;
isa = PBXFileReference;
lastKnownFileType = sourcecode.cpp.objcpp;
path = WebCoreDOMNode.mm;
refType = 4;
sourceTree = "<group>";
};
F565A27B0352675C01A80180 = {
fileRef = F565A27A0352675C01A80180;
isa = PBXBuildFile;
settings = {
};
};
F565A27C035284E301A80180 = {
fileEncoding = 4;
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
path = WebCoreDOMPrivate.h;
refType = 4;
sourceTree = "<group>";
};
F565A27D035284E301A80180 = {
fileRef = F565A27C035284E301A80180;
isa = PBXBuildFile;
settings = {
};
};
F565AE8502ECA583018635CA = {
fileEncoding = 30;
isa = PBXFileReference;
......@@ -10128,51 +10121,6 @@
settings = {
};
};
F5EDAAF3035345D901A80180 = {
fileEncoding = 4;
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = WebDOMDocument.h;
path = kwq/WebDOMDocument.h;
refType = 2;
sourceTree = SOURCE_ROOT;
};
F5EDAAF4035345D901A80180 = {
fileEncoding = 4;
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = WebDOMElement.h;
path = kwq/WebDOMElement.h;
refType = 2;
sourceTree = SOURCE_ROOT;
};
F5EDAAF6035345D901A80180 = {
fileEncoding = 4;
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = WebDOMNode.h;
path = kwq/WebDOMNode.h;
refType = 2;
sourceTree = SOURCE_ROOT;
};
F5EDAAF7035345D901A80180 = {
fileRef = F5EDAAF3035345D901A80180;
isa = PBXBuildFile;
settings = {
};
};
F5EDAAF8035345D901A80180 = {
fileRef = F5EDAAF4035345D901A80180;
isa = PBXBuildFile;
settings = {
};
};
F5EDAAFA035345D901A80180 = {
fileRef = F5EDAAF6035345D901A80180;
isa = PBXBuildFile;
settings = {
};
};
//F50
//F51
//F52
......
......@@ -88,6 +88,10 @@ public:
bool readOnly() { return false; }
#if APPLE_CHANGES
static Range createInstance (RangeImpl *impl);
#endif
protected:
DocumentPtr *m_ownerDocument;
NodeImpl *m_startContainer;
......
/*
DOM-compat.h
Copyright 2004, Apple, Inc. All rights reserved.
*/
@protocol DOMNode;
@protocol DOMNamedNodeMap;
@protocol DOMNodeList;
@protocol DOMImplementation;
@protocol DOMDocumentFragment;
@protocol DOMDocument;
@protocol DOMCharacterData;
@protocol DOMAttr;
@protocol DOMElement;
@protocol DOMText;
@protocol DOMComment;
@protocol DOMCDATASection;
@protocol DOMDocumentType;
@protocol DOMNotation;
@protocol DOMEntity;
@protocol DOMEntityReference;
@protocol DOMProcessingInstruction;
@protocol WebDOMNode <DOMNode>
@end
@protocol WebDOMNamedNodeMap <DOMNamedNodeMap>
@end
@protocol WebDOMNodeList <DOMNodeList>
@end
@protocol WebDOMDocumentType <DOMDocumentType>
@end
@protocol WebDOMDocumentFragment <DOMDocumentFragment>
@end
@protocol WebDOMImplementation <DOMImplementation>
@end
@protocol WebDOMDocument <DOMDocument>
@end
@protocol WebDOMAttr <DOMAttr>
@end
@protocol WebDOMCharacterData <DOMCharacterData>
@end
@protocol WebDOMComment <DOMComment>
@end
@protocol WebDOMText <DOMText>
@end
@protocol WebDOMCDATASection <DOMCDATASection>
@end
@protocol WebDOMProcessingInstruction <DOMProcessingInstruction>
@end
@protocol WebDOMEntityReference <DOMEntityReference>
@end
@protocol WebDOMElement <DOMElement>
@end
#define WebNodeType DOMNodeType
#define WebDOMAttr DOMAttr
#define WebDOMComment DOMComment
#define WebDOMCDATASection DOMCDATASection
#define WebDOMDocument DOMDocument
#define WebDOMElement DOMElement
#define WebDOMEntityReference DOMEntityReference
#define WebDOMNamedNodeMap DOMNamedNodeMap
#define WebDOMNode DOMNode
#define WebDOMNodeList DOMNodeList
#define WebDOMProcessingInstruction DOMProcessingInstruction
#define WebDOMText DOMText
This diff is collapsed.
This diff is collapsed.
......@@ -34,8 +34,9 @@
#import "KWQPrinter.h"
#import "KWQWindowWidget.h"
#import "WebCoreBridge.h"
#import "WebCoreDOMPrivate.h"
#import "WebCoreDOM.h"
#import "WebCoreViewFactory.h"
#import "DOM.h"
#import "csshelper.h"
#import "html_documentimpl.h"
#import "html_misc.h"
......@@ -572,9 +573,11 @@ void KWQKHTMLPart::recordFormValue(const QString &name, const QString &value, HT
if (!_formValuesAboutToBeSubmitted) {
_formValuesAboutToBeSubmitted = [[NSMutableDictionary alloc] init];
ASSERT(!_formAboutToBeSubmitted);
_formAboutToBeSubmitted = [[WebCoreDOMElement elementWithImpl:element] retain];
_formAboutToBeSubmitted = [[WebCoreDOMElement objectWithImpl:element] retain];
} else {
ASSERT([_formAboutToBeSubmitted elementImpl] == element);
if ([_formAboutToBeSubmitted isKindOfClass:[WebCoreDOMElement class]]) {
ASSERT([(WebCoreDOMElement *)_formAboutToBeSubmitted impl] == element);
}
}
[_formValuesAboutToBeSubmitted setObject:value.getNSString() forKey:name.getNSString()];
}
......
......@@ -59,9 +59,9 @@ typedef khtml::RenderPart KHTMLRenderPart;
@protocol WebCoreResourceLoader;
@protocol WebCoreFileButton;
@protocol WebCoreFileButtonDelegate;
@protocol WebDOMDocument;
@protocol WebDOMNode;
@protocol WebDOMElement;
@protocol DOMDocument;
@protocol DOMNode;
@protocol DOMElement;
extern NSString *WebCoreElementDOMNodeKey;
extern NSString *WebCoreElementFrameKey;
......@@ -179,15 +179,15 @@ typedef enum {
- (NSString *)renderTreeAsExternalRepresentation;
- (NSDictionary *)elementAtPoint:(NSPoint)point;
- (id <WebDOMElement>)elementWithName:(NSString *)name inForm:(id <WebDOMElement>)form;
- (id <WebDOMElement>)elementForView:(NSView *)view;
- (BOOL)elementDoesAutoComplete:(id <WebDOMElement>)element;
- (BOOL)elementIsPassword:(id <WebDOMElement>)element;
- (id <WebDOMElement>)formForElement:(id <WebDOMElement>)element;
- (id <WebDOMElement>)currentForm;
- (NSArray *)controlsInForm:(id <WebDOMElement>)form;
- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(id <WebDOMElement>)element;
- (NSString *)matchLabels:(NSArray *)labels againstElement:(id <WebDOMElement>)element;
- (id <DOMElement>)elementWithName:(NSString *)name inForm:(id <DOMElement>)form;
- (id <DOMElement>)elementForView:(NSView *)view;
- (BOOL)elementDoesAutoComplete:(id <DOMElement>)element;
- (BOOL)elementIsPassword:(id <DOMElement>)element;
- (id <DOMElement>)formForElement:(id <DOMElement>)element;
- (id <DOMElement>)currentForm;
- (NSArray *)controlsInForm:(id <DOMElement>)form;
- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(id <DOMElement>)element;
- (NSString *)matchLabels:(NSArray *)labels againstElement:(id <DOMElement>)element;
- (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag;
- (void)jumpToSelection;
......@@ -198,9 +198,9 @@ typedef enum {
- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string;
- (id <WebDOMDocument>)DOMDocument;
- (id <DOMDocument>)DOMDocument;
- (void)setSelectionFrom:(id <WebDOMNode>)start startOffset:(int)startOffset to:(id <WebDOMNode>)end endOffset:(int) endOffset;
- (void)setSelectionFrom:(id <DOMNode>)start startOffset:(int)startOffset to:(id <DOMNode>)end endOffset:(int) endOffset;
- (BOOL)isSelectionEditable;
- (BOOL)moveCaretToPoint:(NSPoint)point;
......@@ -225,12 +225,12 @@ typedef enum {
- (NSRect)visibleSelectionRect;
- (NSImage *)selectionImage;
- (id <WebDOMNode>)selectionStart;
- (id <DOMNode>)selectionStart;
- (int)selectionStartOffset;
- (id <WebDOMNode>)selectionEnd;
- (id <DOMNode>)selectionEnd;
- (int)selectionEndOffset;
- (NSAttributedString *)attributedStringFrom:(id <WebDOMNode>)startNode startOffset:(int)startOffset to:(id <WebDOMNode>)endNode endOffset:(int)endOffset;
- (NSAttributedString *)attributedStringFrom:(id <DOMNode>)startNode startOffset:(int)startOffset to:(id <DOMNode>)endNode endOffset:(int)endOffset;
+ (NSString *)stringWithData:(NSData *)data textEncoding:(CFStringEncoding)textEncoding;
+ (NSString *)stringWithData:(NSData *)data textEncodingName:(NSString *)textEncodingName;
......@@ -267,8 +267,8 @@ typedef enum {
- (void)frameDetached;
- (NSView *)documentView;
- (void)loadURL:(NSURL *)URL referrer:(NSString *)referrer reload:(BOOL)reload onLoadEvent:(BOOL)onLoad target:(NSString *)target triggeringEvent:(NSEvent *)event form:(NSObject <WebDOMElement> *)form formValues:(NSDictionary *)values;
- (void)postWithURL:(NSURL *)URL referrer:(NSString *)referrer target:(NSString *)target data:(NSData *)data contentType:(NSString *)contentType triggeringEvent:(NSEvent *)event form:(NSObject <WebDOMElement> *)form formValues:(NSDictionary *)values;
- (void)loadURL:(NSURL *)URL referrer:(NSString *)referrer reload:(BOOL)reload onLoadEvent:(BOOL)onLoad target:(NSString *)target triggeringEvent:(NSEvent *)event form:(NSObject <DOMElement> *)form formValues:(NSDictionary *)values;
- (void)postWithURL:(NSURL *)URL referrer:(NSString *)referrer target:(NSString *)target data:(NSData *)data contentType:(NSString *)contentType triggeringEvent:(NSEvent *)event form:(NSObject <DOMElement> *)form formValues:(NSDictionary *)values;
- (WebCoreBridge *)createWindowWithURL:(NSURL *)URL frameName:(NSString *)name;
- (void)showWindow;
......
......@@ -29,6 +29,7 @@
#import "dom_node.h"
#import "dom_docimpl.h"
#import "dom_nodeimpl.h"
#import "dom2_rangeimpl.h"
#import "htmlediting.h"
#import "html_documentimpl.h"
#import "html_formimpl.h"
......@@ -64,7 +65,8 @@
#import "KWQPrinter.h"
#import "KWQAccObjectCache.h"
#import "WebCoreDOMPrivate.h"
#import "DOM.h"
#import "WebCoreDOM.h"
#import "WebCoreImageRenderer.h"
#import "WebCoreTextRendererFactory.h"
#import "WebCoreViewFactory.h"
......@@ -711,7 +713,7 @@ static BOOL nowPrinting(WebCoreBridge *self)
return _part->sendContextMenuEvent(event);
}
- (id <WebDOMElement>)elementForView:(NSView *)view
- (id <DOMElement>)elementForView:(NSView *)view
{
// FIXME: implemented currently for only a subset of the KWQ widgets
if ([view conformsToProtocol:@protocol(KWQWidgetHolder)]) {
......@@ -719,7 +721,7 @@ static BOOL nowPrinting(WebCoreBridge *self)
QWidget *widget = [widgetHolder widget];
if (widget != nil) {
NodeImpl *node = static_cast<const RenderWidget *>(widget->eventFilterObject())->element();
return [WebCoreDOMElement elementWithImpl:static_cast<ElementImpl *>(node)];
return [WebCoreDOMElement objectWithImpl:static_cast<ElementImpl *>(node)];
}
}
return nil;
......@@ -737,27 +739,27 @@ static NSView *viewForElement(DOM::ElementImpl *elementImpl)
return nil;
}
static HTMLInputElementImpl *inputElementFromDOMElement(id <WebDOMElement>element)
static HTMLInputElementImpl *inputElementFromDOMElement(id <DOMElement> element)
{
ASSERT([(NSObject *)element isKindOfClass:[WebCoreDOMElement class]]);
DOM::ElementImpl *domElement = [(WebCoreDOMElement *)element elementImpl];
DOM::ElementImpl *domElement = [(WebCoreDOMElement *)element impl];
if (domElement && idFromNode(domElement) == ID_INPUT) {
return static_cast<HTMLInputElementImpl *>(domElement);
}
return nil;
}
static HTMLFormElementImpl *formElementFromDOMElement(id <WebDOMElement>element)