Crash from line break iterators in counter content
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Feb 2012 22:02:05 +0000 (22:02 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Feb 2012 22:02:05 +0000 (22:02 +0000)
commitb01957a9bc67a9975dce7169322c195dd7a567b3
tree6f41d7db8cf46d3803b5d7c0b3c9b95f28b89f4d
parentc0d219156fb782a5709a145244293eede8c36213
Crash from line break iterators in counter content
https://bugs.webkit.org/show_bug.cgi?id=72977

Patch by Ken Buchanan <kenrb@chromium.org> on 2012-02-14
Reviewed by David Hyatt.

Source/WebCore:

Calculating the width of counter text can sometimes cause the
underlying text buffer to change. This patch causes the iterator
to reset appropriately when this happens.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextLineBreak):

LayoutTests:

Test that causes asterisk counters to change during layout
and potentially confuse iterators.

* fast/css/counters/asterisk-counter-update-after-layout-crash-expected.txt: Added
* fast/css/counters/asterisk-counter-update-after-layout-crash.html: Added

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/counters/asterisk-counter-update-after-layout-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/counters/asterisk-counter-update-after-layout-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlockLineLayout.cpp