Bug 166667

Summary: [Cocoa] Font variations are inspected even when nobody is using variations
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: dino, jonlee, ryanhaddad, simon.fraser, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch sam: review+

Myles C. Maxfield
Reported 2017-01-03 15:24:38 PST
[Cocoa] Font variations are inspected even when nobody is using variations
Attachments
Patch (3.07 KB, patch)
2017-01-03 15:25 PST, Myles C. Maxfield
no flags
Patch (3.91 KB, patch)
2017-01-03 15:26 PST, Myles C. Maxfield
no flags
Patch (3.94 KB, patch)
2017-01-03 15:29 PST, Myles C. Maxfield
sam: review+
Myles C. Maxfield
Comment 1 2017-01-03 15:25:33 PST
Myles C. Maxfield
Comment 2 2017-01-03 15:26:21 PST
Myles C. Maxfield
Comment 3 2017-01-03 15:29:28 PST
Myles C. Maxfield
Comment 4 2017-01-03 15:30:05 PST
Said Abou-Hallawa
Comment 5 2017-01-03 18:14:49 PST
Comment on attachment 297964 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=297964&action=review > Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:466 > + if (iterator != defaultValues.end()) { Can't we use: if (iterator == defaultValues.end()) continue; So we do not have to indent the rest of the loop. > Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:467 > + float valueToApply = std::max(std::min(newVariation.value(), iterator->value.maximumValue), iterator->value.minimumValue); Can't we use clampTo(newVariation.value(), iterator->value.minimumValue, iterator->value.maximumValue) instead?
Myles C. Maxfield
Comment 6 2017-01-03 19:16:14 PST
Comment on attachment 297964 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=297964&action=review >> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:466 >> + if (iterator != defaultValues.end()) { > > Can't we use: > > if (iterator == defaultValues.end()) > continue; > > So we do not have to indent the rest of the loop. 👍 >> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:467 >> + float valueToApply = std::max(std::min(newVariation.value(), iterator->value.maximumValue), iterator->value.minimumValue); > > Can't we use clampTo(newVariation.value(), iterator->value.minimumValue, iterator->value.maximumValue) instead? 👍
Myles C. Maxfield
Comment 7 2017-01-03 19:17:28 PST
The patch at https://bugs.webkit.org/show_bug.cgi?id=166672 fixes this. *** This bug has been marked as a duplicate of bug 166672 ***
Note You need to log in before you can comment on or make changes to this bug.