Bug 175382 - Parse font-display
Summary: Parse font-display
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks: 167332 175384
  Show dependency treegraph
 
Reported: 2017-08-09 08:18 PDT by Myles C. Maxfield
Modified: 2017-08-21 16:04 PDT (History)
5 users (show)

See Also:


Attachments
WIP (11.51 KB, patch)
2017-08-09 09:02 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
WIP (11.89 KB, patch)
2017-08-09 18:19 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (16.44 KB, patch)
2017-08-10 00:11 PDT, Myles C. Maxfield
simon.fraser: review+
Details | Formatted Diff | Diff
Patch for committing (22.28 KB, patch)
2017-08-14 14:42 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2017-08-09 08:18:01 PDT
Parse font-display
Comment 1 Myles C. Maxfield 2017-08-09 09:02:12 PDT
Created attachment 317708 [details]
WIP
Comment 2 Radar WebKit Bug Importer 2017-08-09 15:34:33 PDT
<rdar://problem/33813229>
Comment 3 Myles C. Maxfield 2017-08-09 18:19:43 PDT
Created attachment 317771 [details]
WIP
Comment 4 Myles C. Maxfield 2017-08-10 00:11:04 PDT
Created attachment 317787 [details]
Patch
Comment 5 Simon Fraser (smfr) 2017-08-14 13:47:41 PDT
Comment on attachment 317787 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=317787&action=review

> Source/WebCore/css/CSSFontFace.cpp:409
> +    iterateClients(m_clients, [&](Client& client) {
> +        client.fontPropertyChanged(*this);
> +    });

Should you detect whether it's being set to the existing values, and therefore hasn't changed?

> Source/WebCore/css/CSSValueKeywords.in:1354
> +swap
> +fallback
> +optional

We usually list them all, and comment out the replicated ones.
Comment 6 Myles C. Maxfield 2017-08-14 14:42:49 PDT
Created attachment 318063 [details]
Patch for committing
Comment 7 WebKit Commit Bot 2017-08-14 17:04:01 PDT
Comment on attachment 318063 [details]
Patch for committing

Clearing flags on attachment: 318063

Committed r220725: <http://trac.webkit.org/changeset/220725>
Comment 8 Darin Adler 2017-08-18 15:22:07 PDT
Comment on attachment 318063 [details]
Patch for committing

View in context: https://bugs.webkit.org/attachment.cgi?id=318063&action=review

> Source/WebCore/css/CSSFontFace.cpp:273
> +    if (ranges.size() == m_ranges.size()) {
> +        bool same = true;
> +        for (size_t i = 0; i < ranges.size(); ++i) {
> +            if (ranges[i] != m_ranges[i]) {
> +                same = false;
> +                break;
> +            }
> +        }
> +        if (same)
> +            return true;
>      }

This should just be:

    if (ranges == m_ranges)
        return true;

Vector already has an operator== that does this.
Comment 9 Myles C. Maxfield 2017-08-21 16:04:34 PDT
Committed r220986: <http://trac.webkit.org/changeset/220986>