Title: [222132] trunk/Source/WebCore
- Revision
- 222132
- Author
- [email protected]
- Date
- 2017-09-17 01:06:57 -0700 (Sun, 17 Sep 2017)
Log Message
[Harfbuzz] Test fast/text/complex-text-selection.html is failing since r222090
https://bugs.webkit.org/show_bug.cgi?id=177035
Reviewed by Michael Catanzaro.
The problem was not actually introduced in r222090, but revelaed by that change. The bug was added in r222086,
when adding the support for shaping a range of characters. We are not correctly filtering the characters in case
of rtl in some cases.
Fixes: fast/text/complex-text-selection.html
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun): When checking if the current character is inside
the given range, continue or break the loop depending on whether text is rtl or not.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (222131 => 222132)
--- trunk/Source/WebCore/ChangeLog 2017-09-16 18:46:44 UTC (rev 222131)
+++ trunk/Source/WebCore/ChangeLog 2017-09-17 08:06:57 UTC (rev 222132)
@@ -1,3 +1,20 @@
+2017-09-17 Carlos Garcia Campos <[email protected]>
+
+ [Harfbuzz] Test fast/text/complex-text-selection.html is failing since r222090
+ https://bugs.webkit.org/show_bug.cgi?id=177035
+
+ Reviewed by Michael Catanzaro.
+
+ The problem was not actually introduced in r222090, but revelaed by that change. The bug was added in r222086,
+ when adding the support for shaping a range of characters. We are not correctly filtering the characters in case
+ of rtl in some cases.
+
+ Fixes: fast/text/complex-text-selection.html
+
+ * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
+ (WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun): When checking if the current character is inside
+ the given range, continue or break the loop depending on whether text is rtl or not.
+
2017-09-16 Michael Catanzaro <[email protected]>
[GTK] Build failure with enchant-2.1.1
Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp (222131 => 222132)
--- trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp 2017-09-16 18:46:44 UTC (rev 222131)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp 2017-09-17 08:06:57 UTC (rev 222132)
@@ -577,10 +577,16 @@
for (unsigned i = 0; i < numGlyphs; ++i) {
uint16_t currentCharacterIndex = currentRun->startIndex() + glyphToCharacterIndexes[i];
- if (currentCharacterIndex < from)
+ if (currentCharacterIndex < from) {
+ if (m_run.rtl())
+ break;
continue;
- if (currentCharacterIndex >= to)
+ }
+ if (currentCharacterIndex >= to) {
+ if (m_run.rtl())
+ continue;
break;
+ }
const FloatPoint& currentOffset = offsets[i];
const FloatPoint& nextOffset = (i == numGlyphs - 1) ? firstOffsetOfNextRun : offsets[i + 1];
float glyphAdvanceX = advances[i] + nextOffset.x() - currentOffset.x();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes