[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 07:40:39 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=38231
--- Comment #6 from Ojan Vafai <ojan at chromium.org> 2010-04-28 07:40:39 PST ---
(From update of attachment 54532)
> diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
> index a91efb68da9a3f83287d760013e02df18a64a864..4a0842fed9d643c7183cb1aaa31b179f52965110 100644
> --- a/WebCore/ChangeLog
> +++ b/WebCore/ChangeLog
> + No new tests. (OOPS!)
Add test?
> +++ b/WebCore/editing/CompositeEditCommand.cpp
> @@ -754,7 +754,15 @@ void CompositeEditCommand::cloneParagraphUnderNewElement(Position& start, Positi
> Vector<RefPtr<Node> > ancestors;
>
> // Insert each node from innerNode to outerNode (excluded) in a list.
> - 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();
> + }
I don't really get this. What does creating a new text node fix? Maybe this
deserves a comment?
> +++ b/WebCore/editing/IndentOutdentCommand.cpp
> @@ -154,11 +154,17 @@ void IndentOutdentCommand::indentRegion(const VisiblePosition& startOfSelection,
Maybe this deserves a comment about why this case needs to recompute positions?
> + if (recomputePositions)
> + endOfNextParagraph = endOfParagraph(startOfCurrentParagraph);
Does startOfCurrentParagraph exist?
--
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