Commit c170591d authored by beidson@apple.com's avatar beidson@apple.com

WebCore:

2008-03-28  Brady Eidson  <beidson@apple.com>

        Reviewed by Sam Weinig

        More Kit->Core webarchive code movement

        * WebCore.base.exp:
        * editing/markup.cpp:
        (WebCore::createFullMarkup): Replacement for [DOMNode markupString], creating full markup at this node including 
          the document type string, which the WebKit implementation did indirectly
        * editing/markup.h:

WebKit/mac:

2008-03-28  Brady Eidson  <beidson@apple.com>

        Reviewed by Sam Weinig

        More Kit->Core webarchive code movement

        * DOM/WebDOMOperations.mm:
        (-[DOMNode markupString]): Call createFullMarkup() instead

        * WebView/WebFrame.mm: Remove obsolete _markupStringFromNode
        * WebView/WebFrameInternal.h: Ditto



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1d7b3d74
2008-03-28 Brady Eidson <beidson@apple.com>
Reviewed by Sam Weinig
More Kit->Core webarchive code movement
* WebCore.base.exp:
* editing/markup.cpp:
(WebCore::createFullMarkup): Replacement for [DOMNode markupString], creating full markup at this node including
the document type string, which the WebKit implementation did indirectly
* editing/markup.h:
2008-03-28 Darin Adler <darin@apple.com>
Reviewed by Maciej.
......@@ -353,6 +353,7 @@ __ZN7WebCore16NavigationActionC1ERKNS_4KURLENS_13FrameLoadTypeEb
__ZN7WebCore16NavigationActionC1ERKNS_4KURLENS_14NavigationTypeE
__ZN7WebCore16NavigationActionC1Ev
__ZN7WebCore16colorFromNSColorEP7NSColor
__ZN7WebCore16createFullMarkupEPKNS_4NodeE
__ZN7WebCore16enclosingIntRectERK7_NSRect
__ZN7WebCore16isEndOfParagraphERKNS_15VisiblePositionE
__ZN7WebCore17DOMImplementation14isTextMIMETypeERKNS_6StringE
......
......@@ -1107,4 +1107,21 @@ PassRefPtr<DocumentFragment> createFragmentFromNodes(Document *document, const V
return fragment.release();
}
String createFullMarkup(const Node* node)
{
if (!node)
return String();
Document* document = node->document();
if (!document)
return String();
Frame* frame = document->frame();
if (!frame)
return String();
// FIXME: This is never "for interchange". Is that right?
return frame->documentTypeString() + createMarkup(node, IncludeNode, 0);
}
}
......@@ -47,6 +47,8 @@ namespace WebCore {
String createMarkup(const Range*,
Vector<Node*>* = 0, EAnnotateForInterchange = DoNotAnnotateForInterchange, bool convertBlocksToInlines = false);
String createMarkup(const Node*, EChildrenOnly = IncludeNode, Vector<Node*>* = 0);
String createFullMarkup(const Node*);
}
......
2008-03-28 Brady Eidson <beidson@apple.com>
Reviewed by Sam Weinig
More Kit->Core webarchive code movement
* DOM/WebDOMOperations.mm:
(-[DOMNode markupString]): Call createFullMarkup() instead
* WebView/WebFrame.mm: Remove obsolete _markupStringFromNode
* WebView/WebFrameInternal.h: Ditto
2008-03-28 Brady Eidson <beidson@apple.com>
Reviewed by Sam Weinig
......
......@@ -39,6 +39,7 @@
#import <WebCore/CSSHelper.h>
#import <WebCore/Document.h>
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/markup.h>
#import <WebKit/DOMExtensions.h>
#import <WebKit/DOMHTML.h>
......@@ -57,7 +58,7 @@ using namespace WebCore;
- (NSString *)markupString
{
return [[[self ownerDocument] webFrame] _markupStringFromNode:self nodes:nil];
return createFullMarkup([self _node]);
}
@end
......
......@@ -498,17 +498,6 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return nodes;
}
- (NSString *)_markupStringFromNode:(DOMNode *)node nodes:(NSArray **)nodes
{
// FIXME: This is never "for interchange". Is that right? See the next method.
Vector<Node*> nodeList;
NSString *markupString = createMarkup([node _node], IncludeNode, nodes ? &nodeList : 0);
if (nodes)
*nodes = [self _nodesFromList:&nodeList];
return [self _stringWithDocumentTypeStringAndMarkupString:markupString];
}
- (NSString *)_markupStringFromRange:(DOMRange *)range nodes:(NSArray **)nodes
{
// FIXME: This is always "for interchange". Is that right? See the previous method.
......
......@@ -148,7 +148,6 @@ WebView *getWebView(WebFrame *webFrame);
- (NSString *)_selectedString;
- (NSString *)_stringForRange:(DOMRange *)range;
- (NSString *)_markupStringFromNode:(DOMNode *)node nodes:(NSArray **)nodes;
- (NSString *)_markupStringFromRange:(DOMRange *)range nodes:(NSArray **)nodes;
- (NSRect)_caretRectAtNode:(DOMNode *)node offset:(int)offset affinity:(NSSelectionAffinity)affinity;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment