WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
110490
[TextAutosizing] Refactoring to eliminate boolean parameter
https://bugs.webkit.org/show_bug.cgi?id=110490
Summary
[TextAutosizing] Refactoring to eliminate boolean parameter
Anton Vayvod
Reported
2013-02-21 10:43:11 PST
[TextAutosizing] Refactoring to eliminate boolean parameter
Attachments
Patch
(6.87 KB, patch)
2013-02-21 10:51 PST
,
Anton Vayvod
no flags
Details
Formatted Diff
Diff
Patch
(7.56 KB, patch)
2013-02-21 13:13 PST
,
Anton Vayvod
no flags
Details
Formatted Diff
Diff
Patch
(7.51 KB, patch)
2013-02-22 05:47 PST
,
Anton Vayvod
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Anton Vayvod
Comment 1
2013-02-21 10:51:20 PST
Created
attachment 189556
[details]
Patch
John Mellor
Comment 2
2013-02-21 11:09:53 PST
Comment on
attachment 189556
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=189556&action=review
> Source/WebCore/rendering/TextAutosizer.cpp:178 > + float multiplier = clusterShouldBeAutosized(clusterInfo, textWidth) ? clusterMultiplier(clusterInfo, windowInfo, textWidth) : 1.0f;
Nit: Might be clearer to first compute a "bool shouldBeAutosized" on a separate line.
John Mellor
Comment 3
2013-02-21 11:12:10 PST
This a nice refactoring - definitely makes things clearer (though I had to resort to "git diff --word-diff" to understand the patch!). Julien (as I think it was your suggestion to remove the boolean parameter), what do you think?
Anton Vayvod
Comment 4
2013-02-21 13:13:19 PST
Created
attachment 189587
[details]
Patch
Julien Chaffraix
Comment 5
2013-02-21 19:54:15 PST
Comment on
attachment 189587
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=189587&action=review
> Source/WebCore/rendering/TextAutosizer.cpp:157 > + multiplier = std::max(1.0f, multiplier); > > + return multiplier;
Nit: These 2 lines could be squashed in one: return std::max(1.0f, multiplier);
> Source/WebCore/rendering/TextAutosizer.h:32 > +#include <WebCore/platform/text/WritingMode.h>
We don't use absolute path when #including in WebCore. This should be enough: #include "WritingMode.h"
Anton Vayvod
Comment 6
2013-02-22 05:47:13 PST
Created
attachment 189760
[details]
Patch
Julien Chaffraix
Comment 7
2013-02-22 09:10:13 PST
Comment on
attachment 189760
[details]
Patch You don't need to ask for review again, only commit-queue so that you are not stuck waiting on a reviewer.
WebKit Review Bot
Comment 8
2013-02-22 10:22:05 PST
Comment on
attachment 189760
[details]
Patch Clearing flags on attachment: 189760 Committed
r143749
: <
http://trac.webkit.org/changeset/143749
>
WebKit Review Bot
Comment 9
2013-02-22 10:22:09 PST
All reviewed patches have been landed. Closing bug.
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