Title: [222202] trunk/Source/WebCore
- Revision
- 222202
- Author
- [email protected]
- Date
- 2017-09-18 23:35:27 -0700 (Mon, 18 Sep 2017)
Log Message
[Harfbuzz] adjustSelectionRectForComplexText() should also pass the character range when shaping
https://bugs.webkit.org/show_bug.cgi?id=177049
Reviewed by Michael Catanzaro.
Now that the shaper support receiving a range we should use that also in
adjustSelectionRectForComplexText(). This will ensure consistent results with
getGlyphsAndAdvancesForComplexText().
* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
(WebCore::FontCascade::adjustSelectionRectForComplexText const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (222201 => 222202)
--- trunk/Source/WebCore/ChangeLog 2017-09-19 04:15:56 UTC (rev 222201)
+++ trunk/Source/WebCore/ChangeLog 2017-09-19 06:35:27 UTC (rev 222202)
@@ -1,3 +1,17 @@
+2017-09-18 Carlos Garcia Campos <[email protected]>
+
+ [Harfbuzz] adjustSelectionRectForComplexText() should also pass the character range when shaping
+ https://bugs.webkit.org/show_bug.cgi?id=177049
+
+ Reviewed by Michael Catanzaro.
+
+ Now that the shaper support receiving a range we should use that also in
+ adjustSelectionRectForComplexText(). This will ensure consistent results with
+ getGlyphsAndAdvancesForComplexText().
+
+ * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
+ (WebCore::FontCascade::adjustSelectionRectForComplexText const):
+
2017-09-19 Dean Jackson <[email protected]>
[WebGL] VideoTextureCopierCV doesn't correctly restore vertex attribute state
Modified: trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp (222201 => 222202)
--- trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp 2017-09-19 04:15:56 UTC (rev 222201)
+++ trunk/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp 2017-09-19 06:35:27 UTC (rev 222202)
@@ -92,13 +92,14 @@
void FontCascade::adjustSelectionRectForComplexText(const TextRun& run, LayoutRect& selectionRect, unsigned from, unsigned to) const
{
HarfBuzzShaper shaper(this, run);
- if (shaper.shape()) {
- // FIXME: This should mimic Mac port.
- FloatRect rect = shaper.selectionRect(FloatPoint(selectionRect.location()), selectionRect.height().toInt(), from, to);
- selectionRect = LayoutRect(rect);
+ GlyphBuffer glyphBuffer;
+ if (!shaper.shape(&glyphBuffer, from, to)) {
+ LOG_ERROR("Shaper couldn't shape text run.");
return;
}
- LOG_ERROR("Shaper couldn't shape text run.");
+
+ // FIXME: This should mimic Mac port.
+ selectionRect = LayoutRect(shaper.selectionRect(selectionRect.location(), selectionRect.height().toInt(), from, to));
}
} // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes