WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-161493-20160926215617.patch (text/plain), 8.77 KB, created by
Frédéric Wang Nélar
on 2016-09-26 12:59:15 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang Nélar
Created:
2016-09-26 12:59:15 PDT
Size:
8.77 KB
patch
obsolete
>Subversion Revision: 206367 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e22079c27cf2340ed19324e02cee64054871c8f5..bc1554e8790640e57f25f2a6fef24a4bb47328c5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2016-09-26 Khaled Hosny <khaledhosny@eglug.org> >+ >+ [FreeType] Fix vertical glyph positioning >+ https://bugs.webkit.org/show_bug.cgi?id=161493 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: fast/text/YPosTest.html >+ >+ * platform/graphics/GlyphBuffer.h: >+ (WebCore::GlyphBuffer::clear): >+ (WebCore::GlyphBuffer::offsetAt): >+ (WebCore::GlyphBuffer::add): >+ (WebCore::GlyphBuffer::shrink): >+ (WebCore::GlyphBuffer::swap): >+ * platform/graphics/harfbuzz/HarfBuzzShaper.cpp: >+ (WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun): >+ > 2016-09-25 Antti Koivisto <antti@apple.com> > > AuthorStyleSheets shouldn't trigger synchronous style resolutions >diff --git a/Source/WebCore/platform/graphics/GlyphBuffer.h b/Source/WebCore/platform/graphics/GlyphBuffer.h >index 0b243b2ad832fe4078c329ef75249725ae960d99..57b9969d74db31df0046f2e561c12624b221e83a 100644 >--- a/Source/WebCore/platform/graphics/GlyphBuffer.h >+++ b/Source/WebCore/platform/graphics/GlyphBuffer.h >@@ -87,7 +87,7 @@ public: > m_advances.clear(); > if (m_offsetsInString) > m_offsetsInString->clear(); >-#if PLATFORM(WIN) >+#if PLATFORM(WIN) || USE(CAIRO) > m_offsets.clear(); > #endif > } >@@ -121,7 +121,7 @@ public: > > FloatSize offsetAt(unsigned index) const > { >-#if PLATFORM(WIN) >+#if PLATFORM(WIN) || USE(CAIRO) > return m_offsets[index]; > #else > UNUSED_PARAM(index); >@@ -149,7 +149,7 @@ public: > m_advances.append(FloatSize(width, 0)); > #endif > >-#if PLATFORM(WIN) >+#if PLATFORM(WIN) || USE(CAIRO) > if (offset) > m_offsets.append(*offset); > else >@@ -163,7 +163,7 @@ public: > } > > #if !USE(WINGDI) >- void add(Glyph glyph, const Font* font, GlyphBufferAdvance advance, unsigned offsetInString = noOffset) >+ void add(Glyph glyph, const Font* font, GlyphBufferAdvance advance, unsigned offsetInString = noOffset, const FloatSize* offset = 0) > { > m_font.append(font); > #if USE(CAIRO) >@@ -176,6 +176,15 @@ public: > > m_advances.append(advance); > >+#if PLATFORM(WIN) || USE(CAIRO) >+ if (offset) >+ m_offsets.append(*offset); >+ else >+ m_offsets.append(FloatSize()); >+#else >+ UNUSED_PARAM(offset); >+#endif >+ > if (offsetInString != noOffset && m_offsetsInString) > m_offsetsInString->append(offsetInString); > } >@@ -212,7 +221,7 @@ public: > m_advances.shrink(truncationPoint); > if (m_offsetsInString) > m_offsetsInString->shrink(truncationPoint); >-#if PLATFORM(WIN) >+#if PLATFORM(WIN) || USE(CAIRO) > m_offsets.shrink(truncationPoint); > #endif > } >@@ -232,7 +241,7 @@ private: > m_advances[index1] = m_advances[index2]; > m_advances[index2] = s; > >-#if PLATFORM(WIN) >+#if PLATFORM(WIN) || USE(CAIRO) > FloatSize offset = m_offsets[index1]; > m_offsets[index1] = m_offsets[index2]; > m_offsets[index2] = offset; >@@ -244,7 +253,7 @@ private: > Vector<GlyphBufferAdvance, 2048> m_advances; > GlyphBufferAdvance m_initialAdvance; > std::unique_ptr<Vector<unsigned, 2048>> m_offsetsInString; >-#if PLATFORM(WIN) >+#if PLATFORM(WIN) || USE(CAIRO) > Vector<FloatSize, 2048> m_offsets; > #endif > float m_leadingExpansion; >diff --git a/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp b/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp >index 55d59e2693dbf44483d112392bae80e110ca6e3d..3dc6e3d448131e0c9f7c22e0cb0360ca66d26c6a 100644 >--- a/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp >+++ b/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp >@@ -572,14 +572,15 @@ void HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun(GlyphBuffer* glyphBuffer, Ha > FloatPoint& nextOffset = (i == numGlyphs - 1) ? firstOffsetOfNextRun : offsets[i + 1]; > float glyphAdvanceX = advances[i] + nextOffset.x() - currentOffset.x(); > float glyphAdvanceY = nextOffset.y() - currentOffset.y(); >+ FloatSize offset(currentOffset.x(), currentOffset.y()); > if (m_run.rtl()) { > if (currentCharacterIndex > m_run.length()) > m_startOffset.move(glyphAdvanceX, glyphAdvanceY); > else >- glyphBuffer->add(glyphs[i], currentRun->fontData(), createGlyphBufferAdvance(glyphAdvanceX, glyphAdvanceY), currentCharacterIndex); >+ glyphBuffer->add(glyphs[i], currentRun->fontData(), createGlyphBufferAdvance(glyphAdvanceX, glyphAdvanceY), currentCharacterIndex, &offset); > } else { > if (currentCharacterIndex < m_run.length()) >- glyphBuffer->add(glyphs[i], currentRun->fontData(), createGlyphBufferAdvance(glyphAdvanceX, glyphAdvanceY), currentCharacterIndex); >+ glyphBuffer->add(glyphs[i], currentRun->fontData(), createGlyphBufferAdvance(glyphAdvanceX, glyphAdvanceY), currentCharacterIndex, &offset); > } > } > } >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index fe2c3169d89d668c6f0cb9ade162f3829f31003a..f139e7e6e32533b748daf2b00819f0a096c7141e 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2016-09-26 Khaled Hosny <khaledhosny@eglug.org> >+ >+ [FreeType] Fix vertical glyph positioning >+ https://bugs.webkit.org/show_bug.cgi?id=161493 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/text/YPosTest-expected-mismatch.html: Added. >+ * fast/text/YPosTest.html: Added. >+ * fast/text/YPosTest.otf: Added. >+ > 2016-09-25 Chris Dumez <cdumez@apple.com> > > Unviewed, skip slow web-platform test in Debug builds >diff --git a/LayoutTests/fast/text/YPosTest-expected-mismatch.html b/LayoutTests/fast/text/YPosTest-expected-mismatch.html >new file mode 100644 >index 0000000000000000000000000000000000000000..31a8dfe82bf93ee803cb59443e0ce96800ede7fd >--- /dev/null >+++ b/LayoutTests/fast/text/YPosTest-expected-mismatch.html >@@ -0,0 +1,19 @@ >+<html> >+ <head> >+ <meta charset="utf8"/> >+ <style> >+ @font-face { >+ font-family: YPosTest; >+ src: url('YPosTest.otf') format('opentype'); >+ } >+ p { >+ font-size: 50px; >+ font-family: YPosTest; >+ text-rendering: optimizeLegibility; >+ } >+ </style> >+ </head> >+ <body> >+ <p>اا</p> >+ </body> >+</html> >diff --git a/LayoutTests/fast/text/YPosTest.html b/LayoutTests/fast/text/YPosTest.html >new file mode 100644 >index 0000000000000000000000000000000000000000..071679a8969b51fcfe74b6495eeb26f891ae0986 >--- /dev/null >+++ b/LayoutTests/fast/text/YPosTest.html >@@ -0,0 +1,19 @@ >+<html> >+ <head> >+ <meta charset="utf8"/> >+ <style> >+ @font-face { >+ font-family: YPosTest; >+ src: url('YPosTest.otf') format('opentype'); >+ } >+ p { >+ font-size: 50px; >+ font-family: YPosTest; >+ text-rendering: optimizeLegibility; >+ } >+ </style> >+ </head> >+ <body> >+ <p>ات</p> >+ </body> >+</html> >diff --git a/LayoutTests/fast/text/YPosTest.otf b/LayoutTests/fast/text/YPosTest.otf >new file mode 100644 >index 0000000000000000000000000000000000000000..d5b74006edc15570b1ed569c747e1c6717c46d97 >GIT binary patch >literal 2300 >zcmd5-O>7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bEg6HAm{sGsX?SsMnp46Y2=!elIgZUl6}O >z6~u5*EFXobM0`vigLo6~;QHEXAu=9&sYNDQ<mLbR_O&<ArfSy$XZdW+i1)<%;sZXa >zV)$6()T^&&->5g7*@kE|wl6pI#^Cmr^VOeQW@Bf4z?t2?yffPw2ynN8O|KiW`^g7R >zsJ}j-B3Q52&APwa3Gws$olp<S5ytUp_a~?b?}W^reSa#zpfVG&sSKtLZ0pdfzMF3* >z-|?CFxitE%s+GY|(Xv-@++7d%mbmBh0HUa?r5msCmEA8t?8-;><Xbk|Iu09YE4k__ >z0wt@u0+rd@-U*c+5%9e3^E?lc4!YU}{G8KwD=^qpCev8^*qC*9E2@!a@EtIyr?aj3 >V?dNV^Bi^6qXH-V@vZ|VL%U@=Kjidko > >literal 0 >HcmV?d00001 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mmaxfield
:
review-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 161493
:
287632
|
287633
|
287634
|
287860
|
289820
|
289849
|
334733
|
366166
|
366167