RESOLVED FIXED 160892
[Cocoa] Distinguish between paint advances and base advances
https://bugs.webkit.org/show_bug.cgi?id=160892
Summary [Cocoa] Distinguish between paint advances and base advances
Myles C. Maxfield
Reported 2016-08-15 23:10:08 PDT
Distinguish between paint advances and base advances
Attachments
WIP (87.16 KB, patch)
2016-08-15 23:10 PDT, Myles C. Maxfield
no flags
Patch (16.99 KB, patch)
2016-08-22 20:05 PDT, Myles C. Maxfield
no flags
WIP (90.60 KB, patch)
2016-08-23 02:44 PDT, Myles C. Maxfield
no flags
Patch (94.53 KB, patch)
2016-08-23 18:17 PDT, Myles C. Maxfield
no flags
Archive of layout-test-results from ews101 for mac-yosemite (1.11 MB, application/zip)
2016-08-23 18:55 PDT, Build Bot
no flags
Archive of layout-test-results from ews116 for mac-yosemite (1.82 MB, application/zip)
2016-08-23 20:26 PDT, Build Bot
no flags
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (1.18 MB, application/zip)
2016-08-24 19:11 PDT, Build Bot
no flags
WIP (351.14 KB, patch)
2016-08-26 16:29 PDT, Myles C. Maxfield
no flags
Needs to pass svg/ tests (363.93 KB, patch)
2016-08-29 14:55 PDT, Myles C. Maxfield
no flags
Patch (363.80 KB, patch)
2016-08-29 16:14 PDT, Myles C. Maxfield
no flags
Archive of layout-test-results from ews106 for mac-yosemite-wk2 (1.20 MB, application/zip)
2016-08-30 03:01 PDT, Build Bot
no flags
Archive of layout-test-results from ews103 for mac-yosemite (1.08 MB, application/zip)
2016-08-30 08:58 PDT, Build Bot
no flags
Archive of layout-test-results from ews115 for mac-yosemite (1.60 MB, application/zip)
2016-08-30 11:20 PDT, Build Bot
no flags
Patch (491.89 KB, patch)
2016-08-30 14:00 PDT, Myles C. Maxfield
no flags
Patch (492.07 KB, patch)
2016-08-30 16:45 PDT, Myles C. Maxfield
no flags
Patch (430.99 KB, patch)
2016-08-31 21:47 PDT, Myles C. Maxfield
no flags
Patch (430.93 KB, patch)
2016-08-31 21:56 PDT, Myles C. Maxfield
no flags
Patch (426.12 KB, patch)
2016-09-01 17:18 PDT, Myles C. Maxfield
simon.fraser: review+
Myles C. Maxfield
Comment 1 2016-08-15 23:10:50 PDT
Myles C. Maxfield
Comment 2 2016-08-22 20:05:29 PDT
Myles C. Maxfield
Comment 3 2016-08-23 02:44:59 PDT
Myles C. Maxfield
Comment 4 2016-08-23 18:17:53 PDT
Build Bot
Comment 5 2016-08-23 18:55:08 PDT
Comment on attachment 286813 [details] Patch Attachment 286813 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/1931286 Number of test failures exceeded the failure limit.
Build Bot
Comment 6 2016-08-23 18:55:11 PDT
Created attachment 286819 [details] Archive of layout-test-results from ews101 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 7 2016-08-23 20:26:02 PDT
Comment on attachment 286813 [details] Patch Attachment 286813 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/1931657 Number of test failures exceeded the failure limit.
Build Bot
Comment 8 2016-08-23 20:26:05 PDT
Created attachment 286827 [details] Archive of layout-test-results from ews116 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 9 2016-08-24 19:11:32 PDT
Comment on attachment 286813 [details] Patch Attachment 286813 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/1937220 Number of test failures exceeded the failure limit.
Build Bot
Comment 10 2016-08-24 19:11:35 PDT
Created attachment 286931 [details] Archive of layout-test-results from ews105 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Myles C. Maxfield
Comment 11 2016-08-26 16:29:20 PDT
Tests to investigate: svg/ +css2.1/t051202-c26-psudo-nest-00-c.html expected actual diff pretty diff images diff (4.59%) text image+text pass history +css2.1/t1508-c527-font-00-b.html expected actual diff pretty diff images diff (0.65%) text image+text pass history +fast/inline/absolute-positioned-inline-in-centred-block.html expected actual diff pretty diff images diff (0.18%) text image+text pass history +fast/text/complex-first-glyph-with-initial-advance.html reference images diff (0.08%) image pass history +fast/text/complex-initial-advance.html reference images diff (0.02%) image pass history +fast/text/space-width.html reference images diff (1%) image pass history +http/tests/contentextensions/make-https.html expected actual diff pretty diff text pass history +imported/blink/fast/text/international/vertical-positioning-with-combining-marks.html reference images diff (0.06%) image pass history +platform/mac/fast/text/international/Geeza-Pro-vertical-metrics-adjustment.html expected actual diff pretty diff images diff (1.12%) text image+text pass history
Myles C. Maxfield
Comment 12 2016-08-26 16:29:51 PDT
Myles C. Maxfield
Comment 13 2016-08-29 14:55:24 PDT
Created attachment 287333 [details] Needs to pass svg/ tests
Myles C. Maxfield
Comment 14 2016-08-29 16:14:15 PDT
Build Bot
Comment 15 2016-08-30 03:01:17 PDT
Comment on attachment 287344 [details] Patch Attachment 287344 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/1971753 New failing tests: fast/inline/absolute-positioned-inline-in-centred-block.html css2.1/t051202-c26-psudo-nest-00-c.html css2.1/t1508-c527-font-00-b.html
Build Bot
Comment 16 2016-08-30 03:01:21 PDT
Created attachment 287381 [details] Archive of layout-test-results from ews106 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 17 2016-08-30 08:58:50 PDT
Comment on attachment 287344 [details] Patch Attachment 287344 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/1973411 New failing tests: fast/inline/absolute-positioned-inline-in-centred-block.html css2.1/t051202-c26-psudo-nest-00-c.html css2.1/t1508-c527-font-00-b.html
Build Bot
Comment 18 2016-08-30 08:58:54 PDT
Created attachment 287396 [details] Archive of layout-test-results from ews103 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 19 2016-08-30 11:20:24 PDT
Comment on attachment 287344 [details] Patch Attachment 287344 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/1974059 New failing tests: fast/inline/absolute-positioned-inline-in-centred-block.html css2.1/t051202-c26-psudo-nest-00-c.html css2.1/t1508-c527-font-00-b.html
Build Bot
Comment 20 2016-08-30 11:20:27 PDT
Created attachment 287415 [details] Archive of layout-test-results from ews115 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-yosemite Platform: Mac OS X 10.10.5
Myles C. Maxfield
Comment 21 2016-08-30 14:00:44 PDT
Anders Carlsson
Comment 22 2016-08-30 14:15:51 PDT
Comment on attachment 287428 [details] Patch WK2 parts look fine.
Myles C. Maxfield
Comment 23 2016-08-30 16:45:51 PDT
Myles C. Maxfield
Comment 24 2016-08-31 17:24:11 PDT
PLT says there is no regression.
Simon Fraser (smfr)
Comment 25 2016-08-31 17:56:47 PDT
Comment on attachment 287455 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=287455&action=review Please break this patch into: RenderText& changes int -> unsigned changes The rest. > Source/WebCore/ChangeLog:10 > + for a glyph advance to negative in the horizontal direction, and have large advances to be negative? > Source/WebCore/ChangeLog:29 > + This patch also exposes an SPI function in WebKit 2 which allows us to trigger this > + new measurement strategy at will. Because complex text measurement occurs deep "trigger at will" sounds weird. Maybe "switch at runtime" > Source/WebCore/platform/graphics/mac/ComplexTextController.h:159 > bool m_mayUseNaturalWritingDirection; > bool m_forTextEmphasis; Why don't these have initializers? > Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm:134 > +#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101100) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 90000) > + // If the compiler isn't smart enough to optimize out the call to CTRunGetBaseAdvancesAndOrigins(), this will fail to link on > + // old OSes. This function isn't inlined, so the compiler may not be able to see through this call to know that the argument > + // is false. Therefore, we can just force it to false to make the linker succeed. > + ASSERT(!useLayoutSpecificAdvances); > + useLayoutSpecificAdvances = false; > +#endif I think it would be better to soft-link the symbol.
Myles C. Maxfield
Comment 26 2016-08-31 21:47:52 PDT
WebKit Commit Bot
Comment 27 2016-08-31 21:52:14 PDT
Attachment 287597 [details] did not pass style-queue: ERROR: Source/WebCore/ChangeLog:31: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Myles C. Maxfield
Comment 28 2016-08-31 21:56:33 PDT
Myles C. Maxfield
Comment 29 2016-08-31 21:57:35 PDT
(In reply to comment #25) > Comment on attachment 287455 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=287455&action=review > > Please break this patch into: > RenderText& changes > int -> unsigned changes > The rest. https://bugs.webkit.org/show_bug.cgi?id=161473
Myles C. Maxfield
Comment 30 2016-09-01 17:18:52 PDT
Simon Fraser (smfr)
Comment 31 2016-09-01 17:31:02 PDT
Comment on attachment 287705 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=287705&action=review > Source/WebCore/ChangeLog:16 > + In many text engines, glyph shaping actually can be split into two phases: adjusting How about in WebKit? > Source/WebCore/ChangeLog:28 > + No new tests just yet, because I have to create a font which exersizes the exersizes > Source/WebCore/platform/graphics/mac/ComplexTextController.h:99 > + const CGSize* baseAdvances() const { return m_baseAdvances; } I would like a comment here to explain what a "base advance" is. > Source/WebCore/platform/graphics/mac/ComplexTextController.h:151 > bool m_mayUseNaturalWritingDirection; > bool m_forTextEmphasis; Why don't these get initialized? > Source/WebCore/platform/graphics/mac/ComplexTextController.h:182 > int m_end; > > - CGFloat m_totalWidth; > + CGFloat m_totalWidth { 0 }; > > - float m_runWidthSoFar; > - unsigned m_numGlyphsSoFar; > - size_t m_currentRun; > - unsigned m_glyphInCurrentRun; > - unsigned m_characterInCurrentGlyph; > - float m_finalRoundingWidth; > - float m_expansion; > - float m_expansionPerOpportunity; > - float m_leadingExpansion; > + float m_runWidthSoFar { 0 }; > + unsigned m_numGlyphsSoFar { 0 }; > + unsigned m_currentRun { 0 }; > + unsigned m_glyphInCurrentRun { 0 }; > + unsigned m_characterInCurrentGlyph { 0 }; > + float m_expansion { 0 }; > + float m_expansionPerOpportunity { 0 }; > + float m_leadingExpansion { 0 }; > > HashSet<const Font*>* m_fallbackFonts; I'm sure we could improve packing here. > Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm:138 > + CTRunGetBaseAdvancesAndOrigins(ctRun, CFRangeMake(0, 0), m_baseAdvancesVector.data(), m_glyphOrigins.data()); Does CFRangeMake(0, 0) have special meaning?
Myles C. Maxfield
Comment 32 2016-09-02 13:51:26 PDT
Comment on attachment 287705 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=287705&action=review >> Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm:138 >> + CTRunGetBaseAdvancesAndOrigins(ctRun, CFRangeMake(0, 0), m_baseAdvancesVector.data(), m_glyphOrigins.data()); > > Does CFRangeMake(0, 0) have special meaning? it means "the whole thing"
Myles C. Maxfield
Comment 33 2016-09-02 14:45:46 PDT
Ryan Haddad
Comment 34 2016-09-02 16:20:45 PDT
Reverted r205373 for reason: This change causes LayoutTest crashes under GuardMalloc Committed r205382: <http://trac.webkit.org/changeset/205382>
Myles C. Maxfield
Comment 35 2016-09-02 22:54:54 PDT
Myles C. Maxfield
Comment 36 2016-09-03 00:47:58 PDT
Myles C. Maxfield
Comment 37 2016-12-06 11:43:28 PST
Note You need to log in before you can comment on or make changes to this bug.