Bug 32422 - InsertUnorderedList falls into an infinite loop because startOfCurrentParagraph stays on the same node
Summary: InsertUnorderedList falls into an infinite loop because startOfCurrentParagra...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows Vista
: P1 Normal
Assignee: Nobody
URL: http://skypher.com/SkyLined/Repro/Web...
Keywords:
Depends on: 42436 36430 41403
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-11 04:24 PST by Berend-Jan Wever
Modified: 2011-08-01 09:41 PDT (History)
4 users (show)

See Also:


Attachments
Repro (424 bytes, text/html)
2009-12-11 04:24 PST, Berend-Jan Wever
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Berend-Jan Wever 2009-12-11 04:24:09 PST
Created attachment 44669 [details]
Repro

<BODY></BODY>
<SCRIPT>
  document.execCommand("SelectAll",false,"");
  document.designMode="on";
  document.execCommand("InsertParagraph",false,1);
  document.execCommand("Indent",6);
  document.execCommand("insertimage",false,"ftp:");
  document.execCommand("insertimage",false);
  document.execCommand("SelectAll",3);
  document.execCommand("subscript","");
  document.execCommand("insertunorderedlist",false,3);
</SCRIPT>
Comment 1 Berend-Jan Wever 2009-12-11 04:27:14 PST
Does not affect Safari, only Chrome.
Comment 2 Ryosuke Niwa 2010-03-22 12:31:55 PDT
I suspect this is a duplicate of the bug 33668.
Comment 3 Ryosuke Niwa 2010-03-22 14:30:22 PDT
This bug is caused by startOfCurrentParagraph not moving forward on http://trac.webkit.org/browser/trunk/WebCore/editing/InsertListCommand.cpp#L96.  It stays on the same node while we add more LI elements to the document.  We need to cleanup InsertListCommmand first so that removing/creating list element does not rely on selection.
Comment 4 Berend-Jan Wever 2011-08-01 00:54:05 PDT
@Ryosuke: the repro loads fast and without crashing for me in Chromium 15.0.840.0 with WebKit 535.1 (@91997). I'm assuming this got fixed together with some of your other changes to code in this area.
Comment 5 Ryosuke Niwa 2011-08-01 09:41:26 PDT
As I said on some other bugs, there's an inherent design issue in IndentOutdentCommand and InsertListCommand, and it's simply not worth my time to fix any inifinite loop or crash involving these two classes until we come up with a more comprehensive design fix.