WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
180340
Improve FontSelectionAlgorithm, including moving from IntegerHasher to Hasher
https://bugs.webkit.org/show_bug.cgi?id=180340
Summary
Improve FontSelectionAlgorithm, including moving from IntegerHasher to Hasher
Darin Adler
Reported
2017-12-03 15:57:36 PST
Improve FontSelectionAlgorithm, including moving from IntegerHasher to Hasher
Attachments
Patch
(37.10 KB, patch)
2017-12-06 20:01 PST
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(37.11 KB, patch)
2017-12-08 08:58 PST
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
(2.57 MB, application/zip)
2017-12-08 10:26 PST
,
EWS Watchlist
no flags
Details
Patch
(37.25 KB, patch)
2017-12-09 14:36 PST
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(37.27 KB, patch)
2017-12-11 01:23 PST
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(37.29 KB, patch)
2017-12-11 01:25 PST
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(37.31 KB, patch)
2017-12-11 09:12 PST
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(37.41 KB, patch)
2017-12-11 09:13 PST
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(37.41 KB, patch)
2017-12-11 19:21 PST
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2017-12-06 20:01:24 PST
Comment hidden (obsolete)
Created
attachment 328674
[details]
Patch
EWS Watchlist
Comment 2
2017-12-06 20:03:29 PST
Comment hidden (obsolete)
Attachment 328674
[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 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 3
2017-12-08 08:58:36 PST
Comment hidden (obsolete)
Created
attachment 328821
[details]
Patch
EWS Watchlist
Comment 4
2017-12-08 10:26:14 PST
Comment hidden (obsolete)
Comment on
attachment 328821
[details]
Patch
Attachment 328821
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/5546666
New failing tests: fast/text/vertical-quotation-marks.html
EWS Watchlist
Comment 5
2017-12-08 10:26:17 PST
Comment hidden (obsolete)
Created
attachment 328830
[details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Darin Adler
Comment 6
2017-12-09 14:33:41 PST
The mac-wk2 test failure looks like service worker and storage process problems unrelated to this patch.
Darin Adler
Comment 7
2017-12-09 14:36:30 PST
Created
attachment 328917
[details]
Patch
Darin Adler
Comment 8
2017-12-09 15:43:32 PST
OK, this time tests passed on all bots. Ready for review.
Daniel Bates
Comment 9
2017-12-09 18:50:52 PST
Comment on
attachment 328917
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=328917&action=review
> Source/WebCore/platform/graphics/FontSelectionAlgorithm.h:46 > + FontSelectionValue() { }
This is minor. I prefer using = default. Although there is not much benefit here, I prefer using = default for consistency and because the defaulted default ccnstructor is considered a trivial constructor and allows the type to be aggregate initialized.
> Source/WebCore/platform/graphics/FontSelectionAlgorithm.h:98 > + static const FontSelectionValue result(std::numeric_limits<BackingType>::max(), RawTag::RawTag);
No love for uniform initializer syntax?
Darin Adler
Comment 10
2017-12-09 23:56:59 PST
Comment on
attachment 328917
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=328917&action=review
>> Source/WebCore/platform/graphics/FontSelectionAlgorithm.h:46 >> + FontSelectionValue() { } > > This is minor. I prefer using = default. Although there is not much benefit here, I prefer using = default for consistency and because the defaulted default ccnstructor is considered a trivial constructor and allows the type to be aggregate initialized.
I used brace here to work around a bug in some compilers; otherwise I get a warning below in the normalItalicValue function. It warns that I am defining a constant object with no initialization in a class using the default constructor. I could try to find a workaround in the normalItalicValue function instead, perhaps passing a zero will make it work better.
>> Source/WebCore/platform/graphics/FontSelectionAlgorithm.h:98 >> + static const FontSelectionValue result(std::numeric_limits<BackingType>::max(), RawTag::RawTag); > > No love for uniform initializer syntax?
I’ll try switching to that. In this case there might be a problem because RawTag takes an int and the value of expression is a short.
Daniel Bates
Comment 11
2017-12-10 00:34:14 PST
Comment on
attachment 328917
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=328917&action=review
I like this patch, including the improved naming, comments and use of “using “ to make this code more readable and hackable.
>>> Source/WebCore/platform/graphics/FontSelectionAlgorithm.h:98 >>> + static const FontSelectionValue result(std::numeric_limits<BackingType>::max(), RawTag::RawTag); >> >> No love for uniform initializer syntax? > > I’ll try switching to that. In this case there might be a problem because RawTag takes an int and the value of expression is a short.
If we made RawTag a regular enum as opposed to an enum class then we could drop the enum class name qualifier :/
> Source/WebCore/platform/graphics/FontSelectionAlgorithm.h:334 > + // FIXME: This name is no so great. Move this into the add function below
no => not
Darin Adler
Comment 12
2017-12-11 01:23:29 PST
Created
attachment 328953
[details]
Patch
Darin Adler
Comment 13
2017-12-11 01:25:21 PST
Created
attachment 328954
[details]
Patch
Darin Adler
Comment 14
2017-12-11 09:12:39 PST
Created
attachment 328982
[details]
Patch
Darin Adler
Comment 15
2017-12-11 09:13:14 PST
Created
attachment 328983
[details]
Patch
Darin Adler
Comment 16
2017-12-11 19:21:21 PST
Created
attachment 329077
[details]
Patch
Darin Adler
Comment 17
2017-12-11 19:50:14 PST
Committed
r225769
: <
https://trac.webkit.org/changeset/225769
>
Radar WebKit Bug Importer
Comment 18
2017-12-11 19:51:46 PST
<
rdar://problem/35985791
>
Ms2ger (he/him; ⌚ UTC+1/+2)
Comment 19
2017-12-12 03:08:42 PST
Broke older gcc builds:
https://bugs.webkit.org/show_bug.cgi?id=180692
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