WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 188099
[WIN] Fix tests for text with initial advances
https://bugs.webkit.org/show_bug.cgi?id=188099
Summary
[WIN] Fix tests for text with initial advances
Myles C. Maxfield
Reported
2018-07-27 11:27:11 PDT
[WIN] Fix text with initial advance tests
Attachments
Test patch
(1.78 KB, patch)
2018-07-27 11:27 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews206 for win-future
(12.99 MB, application/zip)
2018-07-27 15:37 PDT
,
EWS Watchlist
no flags
Details
Patch
(2.63 KB, patch)
2018-07-27 18:19 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(4.01 KB, patch)
2018-07-27 22:47 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(4.01 KB, patch)
2018-07-28 11:05 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(4.64 KB, patch)
2018-07-28 18:42 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews200 for win-future
(12.92 MB, application/zip)
2018-07-29 05:39 PDT
,
EWS Watchlist
no flags
Details
Patch
(4.60 KB, patch)
2018-07-31 11:53 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2018-07-27 11:27:27 PDT
Created
attachment 345931
[details]
Test patch
EWS Watchlist
Comment 2
2018-07-27 11:29:54 PDT
Attachment 345931
[details]
did not pass style-queue: ERROR: Source/WebCore/ChangeLog:8: 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 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brent Fulgham
Comment 3
2018-07-27 12:16:56 PDT
Comment on
attachment 345931
[details]
Test patch View in context:
https://bugs.webkit.org/attachment.cgi?id=345931&action=review
> Source/WebCore/platform/graphics/FontCascade.cpp:1437 > + float initialYPosition = point.y();
Does the Windows Glyph concept not track or deal with initial advance? I wonder if it could just always be set to a height of zero so there is no difference in the code here?
Myles C. Maxfield
Comment 4
2018-07-27 13:36:52 PDT
Comment on
attachment 345931
[details]
Test patch View in context:
https://bugs.webkit.org/attachment.cgi?id=345931&action=review
>> Source/WebCore/platform/graphics/FontCascade.cpp:1437 >> + float initialYPosition = point.y(); > > Does the Windows Glyph concept not track or deal with initial advance? I wonder if it could just always be set to a height of zero so there is no difference in the code here?
Windows does deal with initial advances.
EWS Watchlist
Comment 5
2018-07-27 15:37:35 PDT
Comment on
attachment 345931
[details]
Test patch
Attachment 345931
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/8677106
New failing tests: http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html
EWS Watchlist
Comment 6
2018-07-27 15:37:46 PDT
Created
attachment 345961
[details]
Archive of layout-test-results from ews206 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews206 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Myles C. Maxfield
Comment 7
2018-07-27 18:19:31 PDT
Created
attachment 345983
[details]
Patch
Radar WebKit Bug Importer
Comment 8
2018-07-27 18:23:18 PDT
<
rdar://problem/42682699
>
Myles C. Maxfield
Comment 9
2018-07-27 22:47:37 PDT
Created
attachment 345988
[details]
Patch
Myles C. Maxfield
Comment 10
2018-07-28 11:05:56 PDT
Created
attachment 345995
[details]
Patch
Myles C. Maxfield
Comment 11
2018-07-28 18:42:27 PDT
Created
attachment 346007
[details]
Patch
Darin Adler
Comment 12
2018-07-28 20:51:09 PDT
Comment on
attachment 346007
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=346007&action=review
> Source/WebCore/platform/graphics/ComplexTextController.cpp:49 > + WTF_MAKE_FAST_ALLOCATED;
Seems like this is unneeded, since we won‘t ever allocate one.
> Source/WebCore/platform/graphics/FontCascade.cpp:1436 > + FloatPoint startPoint(point.x() + glyphBuffer.initialAdvance().width(), point.y() + glyphBuffer.initialAdvance().height());
This can be written like this: FloatPoint startPoint { point + glyphBuffer.initialAdvance() }; Or any variant using { }, (), or =, and either FloatPoint or auto. But no reason to do the x and y separately.
EWS Watchlist
Comment 13
2018-07-29 05:39:26 PDT
Comment on
attachment 346007
[details]
Patch
Attachment 346007
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/8690617
New failing tests: http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html
EWS Watchlist
Comment 14
2018-07-29 05:39:37 PDT
Created
attachment 346027
[details]
Archive of layout-test-results from ews200 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Brent Fulgham
Comment 15
2018-07-30 09:44:19 PDT
***
Bug 188168
has been marked as a duplicate of this bug. ***
Myles C. Maxfield
Comment 16
2018-07-31 11:53:19 PDT
Created
attachment 346184
[details]
Patch
Myles C. Maxfield
Comment 17
2018-07-31 19:03:36 PDT
Comment on
attachment 346007
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=346007&action=review
>> Source/WebCore/platform/graphics/FontCascade.cpp:1436 >> + FloatPoint startPoint(point.x() + glyphBuffer.initialAdvance().width(), point.y() + glyphBuffer.initialAdvance().height()); > > This can be written like this: > > FloatPoint startPoint { point + glyphBuffer.initialAdvance() }; > > Or any variant using { }, (), or =, and either FloatPoint or auto. But no reason to do the x and y separately.
Looks like Windows can't handle that :(
Myles C. Maxfield
Comment 18
2018-07-31 22:11:56 PDT
Committed
r234448
: <
https://trac.webkit.org/changeset/234448
>
Darin Adler
Comment 19
2018-08-01 09:57:06 PDT
Comment on
attachment 346007
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=346007&action=review
>>> Source/WebCore/platform/graphics/FontCascade.cpp:1436 >>> + FloatPoint startPoint(point.x() + glyphBuffer.initialAdvance().width(), point.y() + glyphBuffer.initialAdvance().height()); >> >> This can be written like this: >> >> FloatPoint startPoint { point + glyphBuffer.initialAdvance() }; >> >> Or any variant using { }, (), or =, and either FloatPoint or auto. But no reason to do the x and y separately. > > Looks like Windows can't handle that :(
I’d like to know more. Can you show me which version you tried and how Windows failed?
Myles C. Maxfield
Comment 20
2018-08-02 16:18:32 PDT
(In reply to Darin Adler from
comment #19
)
> Comment on
attachment 346007
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=346007&action=review
> > >>> Source/WebCore/platform/graphics/FontCascade.cpp:1436 > >>> + FloatPoint startPoint(point.x() + glyphBuffer.initialAdvance().width(), point.y() + glyphBuffer.initialAdvance().height()); > >> > >> This can be written like this: > >> > >> FloatPoint startPoint { point + glyphBuffer.initialAdvance() }; > >> > >> Or any variant using { }, (), or =, and either FloatPoint or auto. But no reason to do the x and y separately. > > > > Looks like Windows can't handle that :( > > I’d like to know more. Can you show me which version you tried and how > Windows failed?
FloatPoint startPoint { point + glyphBuffer.initialAdvance() };
https://webkit-queues.webkit.org/patch/346184/win-ews
c:\cygwin\home\buildbot\webkit\source\webcore\platform\graphics\fontcascade.cpp(1436): error C2678: binary '+': no operator found which takes a left-hand operand of type 'WebCore::FloatPoint' (or there is no acceptable conversion) (compiling source file C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\DerivedSources\WebCore\unified-sources\UnifiedSource330.cpp) [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj]
Darin Adler
Comment 21
2018-08-03 07:13:46 PDT
Yes, I see what the issue is. I thought that initialAdvance() returned a FloatSize. But even though this is Windows, we have USE(CG) true, so GlyphBufferAdvance is not a FloatSize, it's a struct derived from CGSize instead. The comment says: // CG uses CGSize instead of FloatSize so that the result of advances() // can be passed directly to CGContextShowGlyphsWithAdvances in FontMac.mm That comment points to some things that are not quite right. For one thing, there is no call to CGContextShowGlyphsWithAdvances any more so the comment is not correct. I am not at all sure that using CGSize instead of FloatSize here is a good idea. And I’m even more unsure that using a struct derived from CGSize with added functions is a good style choice. So I think this is something worth cleaning up eventually.
Darin Adler
Comment 22
2018-08-03 07:14:02 PDT
And of course FontMac.mm is not used on Windows.
Darin Adler
Comment 23
2018-08-03 07:14:55 PDT
I see the code taking advantage of this now. It’s Font::applyTransforms, and it’s inside #if PLATFORM(COCOA), not #if USE(CG).
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug