RESOLVED FIXED 56407
REGRESSION (r81165): Assert running editing/style/iframe-onload-crash.html with non-Mac editing behavior
https://bugs.webkit.org/show_bug.cgi?id=56407
Summary REGRESSION (r81165): Assert running editing/style/iframe-onload-crash.html wi...
David Levin
Reported 2011-03-15 13:29:21 PDT
ASSERTION FAILED: destination.deepEquivalent().anchorNode()->inDocument() third_party/WebKit/Source/WebCore/editing/CompositeEditCommand.cpp(987) : void WebCore::CompositeEditCommand::moveParagraphs(const WebCore::VisiblePosition&, const WebCore::VisiblePosition&, const WebCore::VisiblePosition&, bool, bool) [28191:28191:1053796965558:ERROR:process_util_posix.cc(108)] Received signal 11 It may happen in other places but this is the first bot I see doing this.
Attachments
Patch (3.64 KB, patch)
2011-03-15 18:55 PDT, Levi Weintraub
no flags
Patch (13.35 KB, patch)
2011-03-16 12:16 PDT, Levi Weintraub
rniwa: review+
David Levin
Comment 1 2011-03-15 13:32:45 PDT
Started happening after http://trac.webkit.org/changeset/81165 landed.
Levi Weintraub
Comment 3 2011-03-15 17:46:09 PDT
Mac editing behavior masks this bug, but in the end it comes down to issues with canHaveChildrenForEditing, which failed to take into account whether the node actually had children. Any node with children should return true for canHaveChildrenForEditing. I'm testing this change before uploading, but I've validated it fixes this crash.
Levi Weintraub
Comment 4 2011-03-15 18:55:06 PDT
Ryosuke Niwa
Comment 5 2011-03-15 19:02:09 PDT
Comment on attachment 85895 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=85895&action=review > Source/WebCore/editing/htmlediting.cpp:92 > + || node->hasChildNodes()); Now that I think about it, it's odd that a function named "canHaveChildrenForEditing" changes its return value depending on whether or not the node has children. Can we add this fix in editingIgnoresContent? I started to think that these two functions are really wrong.
Ryosuke Niwa
Comment 6 2011-03-15 19:42:48 PDT
Our note: return !node->hasTagName(hrTag) && // only if no children !node->hasTagName(brTag) && // always !node->hasTagName(imgTag) && // always !node->hasTagName(buttonTag) && // editable? !node->hasTagName(inputTag) && // shadow !node->hasTagName(textareaTag) && // shadow !node->hasTagName(objectTag) && // useFallbackContents returns false !node->hasTagName(iframeTag) && // always !node->hasTagName(embedTag) && // when render isn't RenderEmbeddedObject? !node->hasTagName(appletTag) && // when renderer isn't RenderApplet?? !node->hasTagName(selectTag) && // shadow !node->hasTagName(datagridTag) && #if ENABLE(WML) !node->hasTagName(WMLNames::doTag) && // ?? #endif !node->isTextNode();
David Levin
Comment 7 2011-03-15 19:45:54 PDT
Can we get something in to fix this or rollout the original while it is being addressed?
Ryosuke Niwa
Comment 8 2011-03-15 20:29:17 PDT
(In reply to comment #7) > Can we get something in to fix this or rollout the original while it is being addressed? We're working on it. We should be able to fix it by tomorrow. r81165 was indeed a correct change it's just that it revealed another editing bug. I'd rather not revert the patch given that the crash doesn't seem to reproduce on release build.
Ryosuke Niwa
Comment 9 2011-03-15 21:38:13 PDT
Adam Roben (:aroben)
Comment 10 2011-03-15 23:58:33 PDT
I added this test to the Windows Skipped file. Please remove it when fixing this bug.
Philippe Normand
Comment 11 2011-03-16 08:41:37 PDT
Also skipped in GTK: http://trac.webkit.org/changeset/81246 Please unskip when landing the fix!
David Levin
Comment 12 2011-03-16 08:51:36 PDT
Comment on attachment 85895 [details] Patch r- I think there are comments waiting to be addressed. Plus there are at least three skipped files that should be modified which aren't in this patch. Please consider the cost imposed on lots of people when leaving stuff like this in the tree. (Several people had to investigate this failure, search bugs, modify skipped list, add comments here, etc.) In order words, it may seem good to leave an improvement in the tree but it imposes a cost on lots of other people. In addition leaving asserts in the tree makes it harder for people to use debug builds to test things because they may hit this assert and think something it wrong etc. If an assert will only take a short time to fix, then it will only take a short while to get in the original patch. If it will take along while to fix, then the patch shouldn't be left in anyway. In short, please consider rolling out in the future.
Levi Weintraub
Comment 13 2011-03-16 12:16:47 PDT
Levi Weintraub
Comment 14 2011-03-16 12:18:39 PDT
David Levin
Comment 15 2011-03-16 12:23:15 PDT
Yeah!
Note You need to log in before you can comment on or make changes to this bug.