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-118221-20200108151945.patch (text/plain), 7.72 KB, created by
Fujii Hironori
on 2020-01-07 22:19:47 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2020-01-07 22:19:47 PST
Size:
7.72 KB
patch
obsolete
>Subversion Revision: 254186 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 5a829921e374f947d373e9aa3c30c4661d361a52..de1cefd9ac205582494fe823c331d7fb89280366 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,36 @@ >+2020-01-07 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [HarfBuzz][GTK] fast/text/complex-first-glyph-with-initial-advance.html is failing >+ https://bugs.webkit.org/show_bug.cgi?id=118221 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Arabic diacritics made glyphs vertically unaligned if the first >+ glyph had a vertical offset. >+ >+ The initial advance should be same with the first glyph origin for >+ HarfBuzz. See the diagram in ComplexTextController.h for details. >+ <https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/ComplexTextController.h?rev=224007#L109> >+ >+ drawGlyphs of Cairo port was assuming upward y-axis for glyph >+ advances even though those of Mac and AppleWin port are assuming >+ downward y-axis. This is a problem for Windows ports because >+ AppleWin and WinCairo port are sharing the code calculating >+ advances. >+ >+ Covered by existing tests. >+ >+ * platform/graphics/cairo/FontCairo.cpp: >+ (WebCore::FontCascade::drawGlyphs): >+ * platform/graphics/cairo/GraphicsContextImplCairo.cpp: >+ (WebCore::GraphicsContextImplCairo::drawGlyphs): >+ Sum up the height of advances into yOffset instead of subtraction. >+ >+ * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: >+ (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): >+ Don't negate offsetY. Set m_initialAdvance as the first item of >+ m_glyphOrigins. >+ > 2020-01-07 Devin Rousso <drousso@apple.com> > > Web Inspector: unable to edit or view the source of style sheets injected by safari app extensions >diff --git a/Source/WebCore/platform/graphics/cairo/FontCairo.cpp b/Source/WebCore/platform/graphics/cairo/FontCairo.cpp >index e10ebe44e060cfb9b8322d7b0752fea164403262..2319c1312f53539a1bb45f7a602d5e7f8b350e37 100644 >--- a/Source/WebCore/platform/graphics/cairo/FontCairo.cpp >+++ b/Source/WebCore/platform/graphics/cairo/FontCairo.cpp >@@ -65,7 +65,7 @@ void FontCascade::drawGlyphs(GraphicsContext& context, const Font& font, const G > for (size_t i = 0; i < numGlyphs; ++i) { > glyphs[i] = { glyphsData[i], xOffset, yOffset }; > xOffset += advances[i].width(); >- yOffset -= advances[i].height(); >+ yOffset += advances[i].height(); > } > } > >diff --git a/Source/WebCore/platform/graphics/cairo/GraphicsContextImplCairo.cpp b/Source/WebCore/platform/graphics/cairo/GraphicsContextImplCairo.cpp >index 43fc49226610a9b660d6996f4cf57add5f129cb2..9c76e2912f81fc94adb5c484452713460dcfb28f 100644 >--- a/Source/WebCore/platform/graphics/cairo/GraphicsContextImplCairo.cpp >+++ b/Source/WebCore/platform/graphics/cairo/GraphicsContextImplCairo.cpp >@@ -248,7 +248,7 @@ void GraphicsContextImplCairo::drawGlyphs(const Font& font, const GlyphBuffer& g > for (size_t i = 0; i < numGlyphs; ++i) { > glyphs[i] = { glyphsData[i], xOffset, yOffset }; > xOffset += advances[i].width(); >- yOffset -= advances[i].height(); >+ yOffset += advances[i].height(); > } > } > >diff --git a/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp b/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp >index 69c8c90f05f4d9f203c899df7201f419d6c932c8..257e89f3fa532a7ab7fa465fed2eb2c02354a74e 100644 >--- a/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp >+++ b/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp >@@ -164,17 +164,15 @@ ComplexTextController::ComplexTextRun::ComplexTextRun(hb_buffer_t* buffer, const > } > > float offsetX = harfBuzzPositionToFloat(glyphPositions[i].x_offset); >- float offsetY = -harfBuzzPositionToFloat(glyphPositions[i].y_offset); >+ float offsetY = harfBuzzPositionToFloat(glyphPositions[i].y_offset); > 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 }; > } >+ m_initialAdvance = toFloatSize(m_glyphOrigins[0]); > } > > static const hb_tag_t s_vertTag = HB_TAG('v', 'e', 'r', 't'); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index f2814dec2a9037c1ce210ab331dea05549c016bd..5115e8c3ebc149eac79853ad907941f5faaffd8c 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,17 @@ >+2020-01-07 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [HarfBuzz][GTK] fast/text/complex-first-glyph-with-initial-advance.html is failing >+ https://bugs.webkit.org/show_bug.cgi?id=118221 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/gtk/TestExpectations: Unmarked >+ fast/text/complex-first-glyph-with-initial-advance.html and >+ fast/text/initial-advance-in-intermediate-run-complex.html. >+ * platform/wincairo/TestExpectations: Unmarked >+ fast/text/complex-first-glyph-with-initial-advance.html and >+ fast/text/complex-initial-advance.html. >+ > 2020-01-07 Fujii Hironori <fujii.hironori@gmail.com> > > [GTK] fast/text/atsui-rtl-override-selection.html is failing since r254114 >diff --git a/LayoutTests/platform/gtk/TestExpectations b/LayoutTests/platform/gtk/TestExpectations >index 39bea5c6f4e1ae08d2f1b51eccb556cad764d929..3efdcbe178becfc882ee9b908703c3a7dcbd0af1 100644 >--- a/LayoutTests/platform/gtk/TestExpectations >+++ b/LayoutTests/platform/gtk/TestExpectations >@@ -2944,8 +2944,6 @@ webkit.org/b/169007 css3/flexbox/flex-item-contains-strict.html [ Failure ] > webkit.org/b/118220 http/tests/cache/partitioned-cache.html [ Failure ] > webkit.org/b/118220 http/tests/cache/partitioned-cache-iframe.html [ Failure ] > >-webkit.org/b/118221 fast/text/complex-first-glyph-with-initial-advance.html [ ImageOnlyFailure ] >- > webkit.org/b/118416 storage/websql/sql-error-codes.html [ Failure ] > > webkit.org/b/120105 http/tests/navigation/post-frames-goback1-uncached.html [ Failure ] >@@ -3306,8 +3304,6 @@ webkit.org/b/168551 http/tests/misc/slow-loading-animated-image.html [ ImageOnly > > webkit.org/b/168552 fast/text/hyphenate-locale.html [ Failure ] > >-webkit.org/b/168555 fast/text/initial-advance-in-intermediate-run-complex.html [ ImageOnlyFailure ] >- > webkit.org/b/168719 fast/css/paint-order-shadow.html [ ImageOnlyFailure ] > > webkit.org/b/169075 editing/deleting/skip-virama-001.html [ Failure ] >diff --git a/LayoutTests/platform/wincairo/TestExpectations b/LayoutTests/platform/wincairo/TestExpectations >index 848c1d7acc96d64bb901acb01beab1ab46ad1669..01a5122d7812ae2ff8a94255e00e4c4eb9742121 100644 >--- a/LayoutTests/platform/wincairo/TestExpectations >+++ b/LayoutTests/platform/wincairo/TestExpectations >@@ -1714,9 +1714,7 @@ fast/text/break-word-pre-wrap.html [ ImageOnlyFailure ] > fast/text/chinese-font-name-aliases-2.html [ ImageOnlyFailure ] > fast/text/chinese-font-name-aliases.html [ ImageOnlyFailure ] > fast/text/combining-mark-paint.html [ ImageOnlyFailure ] >-fast/text/complex-first-glyph-with-initial-advance.html [ ImageOnlyFailure ] > fast/text/complex-grapheme-cluster-with-initial-advance.html [ ImageOnlyFailure ] >-fast/text/complex-initial-advance.html [ ImageOnlyFailure ] > fast/text/complex-small-caps-non-bmp-capitalize.html [ ImageOnlyFailure ] > fast/text/decorations-vertical-underline.html [ ImageOnlyFailure ] > fast/text/ellipsis-text-rtl.html [ ImageOnlyFailure ]
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 118221
:
386814
|
387067
| 387077