Hi, When loading a simple xml-document into a WebFrame, extracting a DOMRange and prints out its markupString, the original xml has been padded with a lot of junk. For example: <span class="Apple-style-span" ..> and other apple-span-tags rather than the original xml-structure. Is this a bug or a feature? (Reason I asked was that I was recommended this approach as a way of saving a file after manipulating the DOMstructure) To reproduce: Load xml-file into webview (I used http://www.catb.org/~esr/writings/cathedral-bazaar/ introduction.xml) - Select the preface-node (=>selectedItem) (I added the following test-code to the DOMTreeViewer example, in DOMDatasource.m:119 and clicked around) DOMRange *myRange = [[[_webView mainFrame] DOMDocument] createRange]; [myRange selectNode: selectedItem]; NSLog( [myRange markupString]);
Reassigning to webkit-unassigned, to make sure more people see this.
Reporter, Stefan, could you tell us: a. if you're still having this? b. if so, could you tell us more accurately how to reproduce it?
I can reproduce this, and also with ToT. I do not know whether this is a bug or a feature, though. Additionally, I can see that the ToT result is badly broken, tags are not opened and closed correctly: <title/>Why You Should Care</title> ... <surname/>Raymond</surname> ...etc. Looks like we need a separate bug about the latter, but it should have easier steps to reproduce... CC'ing Anders and Eric, maybe they will have some ideas about this?
A separate bug to cover serialization troubles would be greatly apprecaited. If it's a regression, please mark it a p1 and add the Regression keyword, thanks.
Looks like this is confirmed, but not a bug. Looks like the serialization issues were closed in #7413, so this can be closed as well.
Mass moving XML DOM bugs to the "DOM" Component.
@ap - do you know any tips on how to reproduce, the URL works: http://www.catb.org/~esr/writings/cathedral-bazaar/introduction.xml I am not sure about this piece: I added the following test-code to the DOMTreeViewer example, in DOMDatasource.m:119 and clicked around) DOMRange *myRange = [[[_webView mainFrame] DOMDocument] createRange]; [myRange selectNode: selectedItem]; NSLog( [myRange markupString]);
DOMRange no longer has the markupString SPI. From some code inspection, I do not see WebKit ever adding Apple-style-span any more, although it does check for it in a few places. Adding Ryosuke in case I'm overlooking something.
Thank you for looking into this. I have not touched this project since 2005 so can't verify/reproduce so go ahead and close.