WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
101799
SimpleFontData::getCFStringAttributes sets some attributes to their default values, but shouldn’t
https://bugs.webkit.org/show_bug.cgi?id=101799
Summary
SimpleFontData::getCFStringAttributes sets some attributes to their default v...
mitz
Reported
2012-11-09 14:35:35 PST
<
rdar://problem/12290266
> In some configurations, setting kCTLigatureAttributeName to its default value of 1 yields different behavior from not setting it at all. We can get the correct behavior and greatly simplify the code by not setting attributes to their default values.
Attachments
Only include attributes with non-default values
(7.92 KB, patch)
2012-11-09 14:37 PST
,
mitz
ap
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2012-11-09 14:37:47 PST
Created
attachment 173370
[details]
Only include attributes with non-default values
Alexey Proskuryakov
Comment 2
2012-11-09 15:06:57 PST
Comment on
attachment 173370
[details]
Only include attributes with non-default values View in context:
https://bugs.webkit.org/attachment.cgi?id=173370&action=review
> Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp:42 > + attributesDictionary.adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 4, &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
This is a fairly magical "4".
> Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp:55 > + static int zero = 0;
Why not a "const"?
mitz
Comment 3
2012-11-09 18:54:33 PST
Thanks for the review! (In reply to
comment #2
)
> (From update of
attachment 173370
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=173370&action=review
> > > Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp:42 > > + attributesDictionary.adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 4, &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); > > This is a fairly magical "4".
How do you propose to resolve this? Named constant? Descriptive comment? Other?
> > Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp:55 > > + static int zero = 0; > > Why not a "const"?
No reason.
Alexey Proskuryakov
Comment 4
2012-11-09 19:19:02 PST
> How do you propose to resolve this? Named constant? Descriptive comment? Other?
No specific proposal.
mitz
Comment 5
2012-11-09 19:35:46 PST
Fixed in <
http://trac.webkit.org/r134146
>.
WebKit Review Bot
Comment 6
2012-11-10 14:41:23 PST
Re-opened since this is blocked by
bug 101851
mitz
Comment 7
2012-11-10 14:42:36 PST
(In reply to
comment #6
)
> Re-opened since this is blocked by
bug 101851
This makes no sense.
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