Bug 12801 - Assertion failure in createMarkup() (root) when doing Select All, Copy in an SVG document
Summary: Assertion failure in createMarkup() (root) when doing Select All, Copy in an ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-17 23:07 PST by mitz
Modified: 2007-03-01 09:21 PST (History)
1 user (show)

See Also:


Attachments
Test case (will assert when instructions are followed) (220 bytes, image/svg+xml)
2007-02-17 23:17 PST, mitz
no flags Details
Non-SVG test case (ditto) (72 bytes, application/xml)
2007-02-17 23:22 PST, mitz
no flags Details
Look for <body> (and assert if not found) only in HTML documents (3.52 KB, patch)
2007-02-18 06:45 PST, mitz
ap: review-
Details | Formatted Diff | Diff
remove the assertion (3.39 KB, patch)
2007-02-28 11:01 PST, Alexey Proskuryakov
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2007-02-17 23:07:28 PST
To reproduce: open the attachment w/ a debug build of TOT WebKit, choose Edit > Select All and the Edit > Copy.

Actual result:
ASSERTION FAILED: root
(WebCore/editing/markup.cpp:397 WebCore::DeprecatedString WebCore::createMarkup(const WebCore::Range*, WTF::Vector<WebCore::Node*, 0ul>*, WebCore::EAnnotateForInterchange))
Comment 1 mitz 2007-02-17 23:17:04 PST
Created attachment 13218 [details]
Test case (will assert when instructions are followed)
Comment 2 mitz 2007-02-17 23:22:34 PST
Created attachment 13219 [details]
Non-SVG test case (ditto)
Comment 3 mitz 2007-02-18 06:45:39 PST
Created attachment 13225 [details]
Look for <body> (and assert if not found) only in HTML documents
Comment 4 mitz 2007-02-18 09:51:49 PST
Comment on attachment 13225 [details]
Look for <body> (and assert if not found) only in HTML documents

Based on Alexey's comments, I am going to leave this to other people who know what they're doing.
Comment 5 Alexey Proskuryakov 2007-02-18 09:53:31 PST
Comment on attachment 13225 [details]
Look for <body> (and assert if not found) only in HTML documents

I think it is wrong to introduce different behavior for HTML and XHTML here (since isHTMLDocument() returns false for XHML).

I am not quite sure about the correct solution, but maybe one can just traverse up the hierarchy until seeing either a node that's not an HTML element, or a body.
Comment 6 Alexey Proskuryakov 2007-02-28 11:01:36 PST
Created attachment 13427 [details]
remove the assertion

Not that I know what I'm doing... :-)
Comment 7 Maciej Stachowiak 2007-02-28 19:42:15 PST
Comment on attachment 13427 [details]
remove the assertion

I think removing the assertion is probably right. r=me
Comment 8 Alexey Proskuryakov 2007-03-01 09:21:24 PST
Committed revision 19926.