WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 35569
[Qt] Avoid calling QFont::detach too often from FontQt
https://bugs.webkit.org/show_bug.cgi?id=35569
Summary
[Qt] Avoid calling QFont::detach too often from FontQt
Holger Freyther
Reported
2010-03-02 02:32:28 PST
Currently the QFont Font::font() method tries to apply the wordspacing and letterspacing set on the font. This value is not stored in the FontPlatformData and must be set on the QFont each time, also we try to have the actual font data not in WebCore::Font. This creates at least one issue: We have to apply the word and letter spacing each time which will always certainly end up in a call to QFont::detach. One solution would be to put a QFont into the WebCore::Font but this is a against the separation we try to achieve with the FontPlatformData. Another one is to not call these functions if we have the default letter and wordspacing. This is giving us a small improvement on the text classes.
Attachments
First version.
(2.70 KB, patch)
2010-03-02 02:37 PST
,
Holger Freyther
hausmann
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Holger Freyther
Comment 1
2010-03-02 02:37:32 PST
Created
attachment 49791
[details]
First version. Add two if's. I'm sleepy right now so be extra careful when reviewing.
WebKit Review Bot
Comment 2
2010-03-02 02:41:59 PST
Attachment 49791
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/platform/graphics/qt/FontQt.cpp:222: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] WebCore/platform/graphics/qt/FontQt.cpp:224: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 2 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Hausmann
Comment 3
2010-03-03 12:45:45 PST
Comment on
attachment 49791
[details]
First version. Nice catch :)
Holger Freyther
Comment 4
2010-03-04 04:30:10 PST
Landed in
r55518
.
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