https://bugs.webkit.org/show_bug.cgi?id=161493
Reviewed by Michael Catanzaro.
Source/WebCore:
Use the first glyph origin as the initial advance of every complex text run.
* platform/graphics/cairo/FontCairo.cpp:
(WebCore::FontCascade::drawGlyphs): Update the yOffset using the height advance.
* platform/graphics/cairo/GraphicsContextImplCairo.cpp:
(WebCore::GraphicsContextImplCairo::drawGlyphs): Ditto.
* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Set the initial advance.
LayoutTests:
Rebaseline fast/text/international/hebrew-vowels.html.
* platform/gtk/fast/text/international/hebrew-vowels-expected.png:
* platform/gtk/fast/text/international/hebrew-vowels-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243602
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2019-03-28 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [FreeType] Incorrect application of glyph positioning in the Y direction
+ https://bugs.webkit.org/show_bug.cgi?id=161493
+
+ Reviewed by Michael Catanzaro.
+
+ Rebaseline fast/text/international/hebrew-vowels.html.
+
+ * platform/gtk/fast/text/international/hebrew-vowels-expected.png:
+ * platform/gtk/fast/text/international/hebrew-vowels-expected.txt:
+
2019-03-27 Ryosuke Niwa <rniwa@webkit.org>
[macOS] Select element doesn't show popup if select element had lost focus while popup was previosuly shown
RenderText {#text} at (0,0) size 458x17
text run at (0,0) width 458: "The vowel (two vertical dots) should be centered beneath the main letter."
RenderBlock {DIV} at (0,86) size 784x91
- RenderText {#text} at (33,1) size 67x88
- text run at (33,1) width 67 RTL: "\x{5E1}\x{5B0} "
- RenderText {#text} at (0,1) size 34x88
- text run at (0,1) width 34 RTL: "\x{5E9}\x{5B0}"
+ RenderText {#text} at (57,1) size 66x88
+ text run at (57,1) width 66 RTL: "\x{5E1}\x{5B0} "
+ RenderText {#text} at (0,1) size 57x88
+ text run at (0,1) width 57 RTL: "\x{5E9}\x{5B0}"
RenderText {#text} at (0,0) size 0x0
RenderBlock {HR} at (0,185) size 784x2 [border: (1px inset #000000)]
RenderBlock {P} at (0,203) size 784x18
+2019-03-28 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [FreeType] Incorrect application of glyph positioning in the Y direction
+ https://bugs.webkit.org/show_bug.cgi?id=161493
+
+ Reviewed by Michael Catanzaro.
+
+ Use the first glyph origin as the initial advance of every complex text run.
+
+ * platform/graphics/cairo/FontCairo.cpp:
+ (WebCore::FontCascade::drawGlyphs): Update the yOffset using the height advance.
+ * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
+ (WebCore::GraphicsContextImplCairo::drawGlyphs): Ditto.
+ * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
+ (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Set the initial advance.
+
2019-03-27 Ryosuke Niwa <rniwa@webkit.org>
[macOS] Select element doesn't show popup if select element had lost focus while popup was previosuly shown
for (size_t i = 0; i < numGlyphs; ++i) {
glyphs[i] = { glyphsData[i], xOffset, yOffset };
xOffset += advances[i].width();
+ yOffset -= advances[i].height();
}
}
for (size_t i = 0; i < numGlyphs; ++i) {
glyphs[i] = { glyphsData[i], xOffset, yOffset };
xOffset += advances[i].width();
+ yOffset -= advances[i].height();
}
}
float advanceX = harfBuzzPositionToFloat(glyphPositions[i].x_advance);
float advanceY = harfBuzzPositionToFloat(glyphPositions[i].y_advance);
+ if (!i)
+ m_initialAdvance = { offsetX, -offsetY };
+
m_glyphs[i] = glyph;
m_baseAdvances[i] = { advanceX, advanceY };
m_glyphOrigins[i] = { offsetX, offsetY };