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
+2013-02-07 Alexei Svitkine <asvitkine@chromium.org>
+
+ 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
+
+ New test in the same style as harfbuzz-buffer-overrun.html
+ in the same folder.
+
+ Reviewed by Eric Seidel.
+
+ * fast/text/international/rtl-mark-expected.txt: Added.
+ * fast/text/international/rtl-mark.html: Added.
+
2013-02-07 Kentaro Hara <haraken@chromium.org>
Implement FocusEvent constructor
--- /dev/null
+PASS: does not hang
--- /dev/null
+<html>
+<body>
+<p>‏بحرین
</p>
+<script>
+// Force layout.
+document.body.offsetTop;
+
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+document.body.innerHTML = "PASS: does not hang";
+</script>
+</body>
+</html>
+2013-02-07 Alexei Svitkine <asvitkine@chromium.org>
+
+ 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
+
+ New test in the same style as the harfbuzz-buffer-overrun.html
+ test (in the same folder).
+
+ Reviewed by Eric Seidel.
+
+ Test: fast/text/international/rtl-mark.html
+
+ * platform/graphics/mac/ComplexTextController.cpp:
+ (WebCore::ComplexTextController::indexOfCurrentRun):
+
2013-02-07 Kentaro Hara <haraken@chromium.org>
Implement FocusEvent constructor
return m_currentRun;
}
+ if (m_runIndices.isEmpty()) {
+ unsigned firstRun = 0;
+ unsigned firstRunOffset = stringBegin(*m_complexTextRuns[0]);
+ for (unsigned i = 1; i < runCount; ++i) {
+ unsigned offset = stringBegin(*m_complexTextRuns[i]);
+ if (offset < firstRunOffset) {
+ firstRun = i;
+ firstRunOffset = offset;
+ }
+ }
+ m_runIndices.uncheckedAppend(firstRun);
+ }
+
while (m_runIndices.size() <= m_currentRun) {
- unsigned offset = m_runIndices.isEmpty() ? 0 : stringEnd(*m_complexTextRuns[m_runIndices.last()]);
+ unsigned offset = stringEnd(*m_complexTextRuns[m_runIndices.last()]);
for (unsigned i = 0; i < runCount; ++i) {
if (offset == stringBegin(*m_complexTextRuns[i])) {