WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
147719
Font feature settings comparisons are order-dependent and case-dependent
https://bugs.webkit.org/show_bug.cgi?id=147719
Summary
Font feature settings comparisons are order-dependent and case-dependent
Myles C. Maxfield
Reported
2015-08-05 19:22:23 PDT
Font feature settings comparisons are order-dependent and case-dependent
Attachments
Patch
(13.61 KB, patch)
2015-08-05 19:24 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews104 for mac-mavericks-wk2
(682.25 KB, application/zip)
2015-08-05 19:57 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews103 for mac-mavericks
(627.78 KB, application/zip)
2015-08-05 20:01 PDT
,
Build Bot
no flags
Details
Patch
(12.89 KB, patch)
2015-08-05 23:18 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-mavericks
(563.54 KB, application/zip)
2015-08-05 23:59 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews107 for mac-mavericks-wk2
(572.37 KB, application/zip)
2015-08-06 00:26 PDT
,
Build Bot
no flags
Details
Patch
(7.04 KB, patch)
2015-08-06 13:29 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(12.80 KB, patch)
2015-08-06 13:30 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(12.62 KB, patch)
2015-08-06 13:32 PDT
,
Myles C. Maxfield
benjamin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2015-08-05 19:24:19 PDT
Created
attachment 258339
[details]
Patch
Myles C. Maxfield
Comment 2
2015-08-05 19:29:18 PDT
Comment on
attachment 258339
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=258339&action=review
> Source/WebCore/platform/graphics/FontFeatureSettings.h:59 > + if (m_value < other.m_value) > + return true; > + return false;
This can just be return m_value < other.m_value
Build Bot
Comment 3
2015-08-05 19:57:20 PDT
Comment on
attachment 258339
[details]
Patch
Attachment 258339
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/21541
New failing tests: css3/font-feature-settings-parsing.html
Build Bot
Comment 4
2015-08-05 19:57:23 PDT
Created
attachment 258341
[details]
Archive of layout-test-results from ews104 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Build Bot
Comment 5
2015-08-05 20:01:16 PDT
Comment on
attachment 258339
[details]
Patch
Attachment 258339
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/21563
New failing tests: css3/font-feature-settings-parsing.html
Build Bot
Comment 6
2015-08-05 20:01:19 PDT
Created
attachment 258343
[details]
Archive of layout-test-results from ews103 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-mavericks Platform: Mac OS X 10.9.5
Benjamin Poulain
Comment 7
2015-08-05 21:39:11 PDT
Comment on
attachment 258339
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=258339&action=review
> Source/WebCore/ChangeLog:13 > + No tests yet, because font-feature-settings is not implemented.
No way to test this from CSSOM?
> Source/WebCore/css/CSSParser.cpp:10381 > - String tag = value->string; > + String tag = String(value->string).convertToASCIILowercase();
It's a bit sad to allocate memory for the first string, just to convert it. Ideally this should be a feature of StringView and the CSSParserString could produce lowercase ASCII String.
> Source/WebCore/platform/graphics/FontFeatureSettings.h:57 > + if (m_tag.impl() > other.m_tag.impl()) > + return false; > + if (m_value < other.m_value)
If (m_tag.impl() == other.m_tag.impl() && m_value < other.m_value) return true; return false;
> Source/WebCore/platform/graphics/FontFeatureSettings.h:74 > return adoptRef(*new FontFeatureSettings);
This should be out-of-line. It is fine to inline the constructor of Vector if your create() is out-of-line. Here you just inline everything, we have no data showing the inlining is beneficial.
> Source/WebCore/platform/graphics/FontFeatureSettings.h:79 > + m_list.insert(std::lower_bound(m_list.begin(), m_list.end(), feature) - m_list.begin(), WTF::move(feature));
Clever use of lower_bound(). I am not a big fan of this code though. It assumes that the iterator supports operator-(). Ideally insert could should an iterator to avoid that problem (and invalidate it afterwards?).
Myles C. Maxfield
Comment 8
2015-08-05 23:09:08 PDT
Comment on
attachment 258339
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=258339&action=review
>> Source/WebCore/platform/graphics/FontFeatureSettings.h:79 >> + m_list.insert(std::lower_bound(m_list.begin(), m_list.end(), feature) - m_list.begin(), WTF::move(feature)); > > Clever use of lower_bound(). > > I am not a big fan of this code though. It assumes that the iterator supports operator-(). > Ideally insert could should an iterator to avoid that problem (and invalidate it afterwards?).
I think Anders would object to more usage of Vector::iterators. It seems to me that it's a design goal to use unsigned everywhere in Vectors instead of iterators. Given that this vector will almost always hold 0 - 1 items, an O(n) search is probably best here.
Myles C. Maxfield
Comment 9
2015-08-05 23:18:43 PDT
Created
attachment 258352
[details]
Patch
Build Bot
Comment 10
2015-08-05 23:59:14 PDT
Comment on
attachment 258352
[details]
Patch
Attachment 258352
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/22140
New failing tests: css3/font-feature-settings-parsing.html
Build Bot
Comment 11
2015-08-05 23:59:17 PDT
Created
attachment 258354
[details]
Archive of layout-test-results from ews103 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-mavericks Platform: Mac OS X 10.9.5
Build Bot
Comment 12
2015-08-06 00:26:21 PDT
Comment on
attachment 258352
[details]
Patch
Attachment 258352
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/22201
New failing tests: css3/font-feature-settings-parsing.html
Build Bot
Comment 13
2015-08-06 00:26:23 PDT
Created
attachment 258356
[details]
Archive of layout-test-results from ews107 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Myles C. Maxfield
Comment 14
2015-08-06 13:29:35 PDT
Created
attachment 258389
[details]
Patch
Myles C. Maxfield
Comment 15
2015-08-06 13:30:55 PDT
Created
attachment 258390
[details]
Patch
Myles C. Maxfield
Comment 16
2015-08-06 13:32:33 PDT
Created
attachment 258391
[details]
Patch
Myles C. Maxfield
Comment 17
2015-08-06 13:46:09 PDT
Committed
r188056
: <
http://trac.webkit.org/changeset/188056
>
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