<rdar://problem/12104508> TextIterator takes O(n^2) to iterate over n empty blocks
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2012 16:43:56 +0000 (16:43 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2012 16:43:56 +0000 (16:43 +0000)
commit404593084635f51e7077fc91c36a6704d065022c
tree0130684b518ccb6c7f0ea42eef23bdc28cb94649
parent872357b966e45f06ed8a4128b973cac6a1c17dd3
<rdar://problem/12104508> TextIterator takes O(n^2) to iterate over n empty blocks
https://bugs.webkit.org/show_bug.cgi?id=94429

Reviewed by Sam Weinig.

No new tests, because behavior is unchanged.

* editing/TextIterator.cpp:
(WebCore::TextIterator::shouldRepresentNodeOffsetZero): Enhanced the check for nodes that
cannot contain VisiblePosition to also check for zero-height blocks.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/TextIterator.cpp