diff options
Diffstat (limited to 'WebKit/mac/WebView/WebHTMLRepresentation.mm')
-rw-r--r-- | WebKit/mac/WebView/WebHTMLRepresentation.mm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/WebKit/mac/WebView/WebHTMLRepresentation.mm b/WebKit/mac/WebView/WebHTMLRepresentation.mm index 3f69870..39489e8 100644 --- a/WebKit/mac/WebView/WebHTMLRepresentation.mm +++ b/WebKit/mac/WebView/WebHTMLRepresentation.mm @@ -28,7 +28,7 @@ #import "WebHTMLRepresentation.h" -#import "DOMNodeInternal.h" +#import "DOMElementInternal.h" #import "DOMRangeInternal.h" #import "WebArchive.h" #import "WebBasePluginPackage.h" @@ -47,6 +47,7 @@ #import <WebCore/FrameLoader.h> #import <WebCore/FrameLoaderClient.h> #import <WebCore/HTMLFormControlElement.h> +#import <WebCore/HTMLFormElement.h> #import <WebCore/HTMLInputElement.h> #import <WebCore/HTMLNames.h> #import <WebCore/MIMETypeRegistry.h> @@ -259,13 +260,13 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second) - (NSAttributedString *)attributedStringFrom:(DOMNode *)startNode startOffset:(int)startOffset to:(DOMNode *)endNode endOffset:(int)endOffset { - return [NSAttributedString _web_attributedStringFromRange:Range::create([startNode _node]->document(), [startNode _node], startOffset, [endNode _node], endOffset).get()]; + return [NSAttributedString _web_attributedStringFromRange:Range::create(core(startNode)->document(), core(startNode), startOffset, core(endNode), endOffset).get()]; } static HTMLFormElement* formElementFromDOMElement(DOMElement *element) { - Node* node = [element _node]; - return node && node->hasTagName(formTag) ? static_cast<HTMLFormElement *>(node) : 0; + Element* node = core(element); + return node && node->hasTagName(formTag) ? static_cast<HTMLFormElement*>(node) : 0; } - (DOMElement *)elementWithName:(NSString *)name inForm:(DOMElement *)form @@ -277,7 +278,7 @@ static HTMLFormElement* formElementFromDOMElement(DOMElement *element) AtomicString targetName = name; for (unsigned i = 0; i < elements.size(); i++) { HTMLFormControlElement* elt = elements[i]; - if (elt->name() == targetName) + if (elt->formControlName() == targetName) return kit(elt); } return nil; @@ -285,7 +286,7 @@ static HTMLFormElement* formElementFromDOMElement(DOMElement *element) static HTMLInputElement* inputElementFromDOMElement(DOMElement* element) { - Node* node = [element _node]; + Element* node = core(element); return node && node->hasTagName(inputTag) ? static_cast<HTMLInputElement*>(node) : 0; } |