[Webkit-unassigned] [Bug 38231] crash in WebCore::CompositeEditCommand::splitTreeToNode when indenting pre
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 28 10:18:35 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=38231
--- Comment #8 from Ryosuke Niwa <rniwa at webkit.org> 2010-04-28 10:18:34 PST ---
(In reply to comment #5)
> This seems very fragile, so maybe someone has some better ideas. For example,
> maybe rather than trying to indent each paragraph, we would try to do a single
> indent if everything is in a single node. Or maybe we can split the pre into
> multiple pre tags before we start moving paragraphs. Thoughts?
In my broken fix for indentation, I did that. In particular
extendRangeToWrappingNodes in htmlediting.cpp extends the range as much as
possible. See http://trac.webkit.org/changeset/46142 for usage.
> - for (Node* n = start.node(); n && n != outerNode; n = n->parentNode())
> + Node* n = start.node();
> + if (start.node() == end.node()) {
> + ASSERT(start.node()->isTextNode());
> + String text = plainText(Range::create(document(), start, end).get());
> + ancestors.append(document()->createTextNode(text));
> + n = n->parentNode();
> + }
> +
> + for (; n && n != outerNode; n = n->parentNode())
I'm not fully convinced that when start.node() == end.node(), it should be a
text node. And also I'm not a fun to making cloneParagraphUnderNewElement
smarter unless cloneParagraph is doing something unexpected.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list