Unstyled XML viewer crashes when XML contains an element with id="tree"
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 Jun 2013 08:14:48 +0000 (08:14 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 Jun 2013 08:14:48 +0000 (08:14 +0000)
commit25ee91f4faaa8ef43d4c6e73d7814d34f8cb8e0d
tree20743cd5cca918268d807a825a278ac5469ff106
parentd70f14a9cc4a236c005097e816c18c89dfff9d8e
Unstyled XML viewer crashes when XML contains an element with id="tree"
https://bugs.webkit.org/show_bug.cgi?id=117117
<rdar://problem/13727267>

Reviewed by Darin Adler.

Source/WebCore:

Test: http/tests/xmlviewer/dumpAsText/existing-tree-element-crash.xml

* xml/XMLViewer.css: Removed the rule to hide source document, as we no longer
keep it in the tree.

* xml/XMLViewer.js:
(prepareWebKitXMLViewer): Make sourceXML a detached tree, as otherwise it can
have ID conflicts with elements we add.
(sourceXMLLoaded): Removed some commented out code. Removed code that was checking
whether an extension took over XML display, as it makes no sense to duplicate this
functionality in an extension.

LayoutTests:

* http/tests/xmlviewer/dumpAsText/existing-tree-element-crash-expected.txt: Added.
* http/tests/xmlviewer/dumpAsText/existing-tree-element-crash.xml: Added.

* xmlviewer: Removed.
* xmlviewer/extensions-api-expected.txt: Removed.
* xmlviewer/extensions-api.html: Removed.
* xmlviewer/resources: Removed.
* xmlviewer/resources/sample.xml: Removed.
The "API" no longer exists.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/xmlviewer/dumpAsText/existing-tree-element-crash-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/xmlviewer/dumpAsText/existing-tree-element-crash.xml [new file with mode: 0644]
LayoutTests/xmlviewer/extensions-api-expected.txt [deleted file]
LayoutTests/xmlviewer/extensions-api.html [deleted file]
LayoutTests/xmlviewer/resources/sample.xml [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/xml/XMLViewer.css
Source/WebCore/xml/XMLViewer.js