Chromium: Hang parsing bidi control chars on Mac OS X 10.6
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2013 00:51:18 +0000 (00:51 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2013 00:51:18 +0000 (00:51 +0000)
commitb0da44a5ddbde494e39bb595cef336c622643eb7
treea1c8200a35a9633eacde0cf482d1568128a31def
parent36f71ec0f5ecf60a611dca8fe10b7b324d5f3231
Chromium: Hang parsing bidi control chars on Mac OS X 10.6
https://bugs.webkit.org/show_bug.cgi?id=108877

This was broken a while ago by:
    https://bugs.webkit.org/show_bug.cgi?id=83045

On 10.6, CoreText will not produce any runs covering the
Unicode BiDi RTL mark control char, which causes an infinite
loop in ComplexTextController::indexOfCurrentRun() due to no
run covering the character at offset 0.

This patch fixes that issue by finding the earliest run
explicitly via the minimum stringBegin() index instead of
relying on a run existing that covers offset 0.

Fixes hang on many BiDi wikipedia pages on Chromium/Mac10.6.
Chromium bug: http://crbug.com/167844

Source/WebCore:

New test in the same style as the harfbuzz-buffer-overrun.html
test (in the same folder).

Patch by Alexei Svitkine <asvitkine@chromium.org> on 2013-02-07
Reviewed by Eric Seidel.

Test: fast/text/international/rtl-mark.html

* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::indexOfCurrentRun):

LayoutTests:

New test in the same style as harfbuzz-buffer-overrun.html
in the same folder.

Patch by Alexei Svitkine <asvitkine@chromium.org> on 2013-02-07
Reviewed by Eric Seidel.

* fast/text/international/rtl-mark-expected.txt: Added.
* fast/text/international/rtl-mark.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/international/rtl-mark-expected.txt [new file with mode: 0644]
LayoutTests/fast/text/international/rtl-mark.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/mac/ComplexTextController.cpp