WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
144791
Rename Length::isPercent() and Length::isPercentNotCalculated()
https://bugs.webkit.org/show_bug.cgi?id=144791
Summary
Rename Length::isPercent() and Length::isPercentNotCalculated()
Sungmann Cho
Reported
2015-05-08 01:32:25 PDT
Fix the wrong condition check at the first line of SVGLengthContext::valueForLength().
Attachments
Patch
(1.55 KB, patch)
2015-05-08 01:57 PDT
,
Sungmann Cho
no flags
Details
Formatted Diff
Diff
Patch
(63.61 KB, patch)
2015-05-08 13:38 PDT
,
Sungmann Cho
no flags
Details
Formatted Diff
Diff
Patch
(65.92 KB, patch)
2015-05-08 13:58 PDT
,
Sungmann Cho
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Sungmann Cho
Comment 1
2015-05-08 01:57:24 PDT
We can replace "length.isPercent() && !length.isCalculated()" with "length.isPercentNotCalculated()" for simplicity and clarity.
Sungmann Cho
Comment 2
2015-05-08 01:57:44 PDT
Created
attachment 252703
[details]
Patch
Said Abou-Hallawa
Comment 3
2015-05-08 09:59:17 PDT
Comment on
attachment 252703
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=252703&action=review
> Source/WebCore/svg/SVGLengthContext.cpp:92 > + if (length.isPercentNotCalculated())
It will be beneficial if we can rename: Length::isPercentNotCalculated() => Length::isPercent() Length::isPercent() => Length::isPercentOrCalculated() // Or something similar Then we can remove the following FIXME from Length.h bool isPercentNotCalculated() const; // FIXME: Rename to isPercent. And the above condition will be simpler and clearer.
Sungmann Cho
Comment 4
2015-05-08 13:38:38 PDT
Created
attachment 252744
[details]
Patch
Sungmann Cho
Comment 5
2015-05-08 13:39:58 PDT
Addressed Said Abou-Hallawa's comments.
Sungmann Cho
Comment 6
2015-05-08 13:58:25 PDT
Created
attachment 252746
[details]
Patch
Darin Adler
Comment 7
2015-05-10 14:12:28 PDT
Comment on
attachment 252746
[details]
Patch It’s dangerous to do this all in one pass. If we missed any call site, the behavior will become wrong and the compiler won’t catch it for us. The safe way to do this is to do the rename of isPercent to isPercentOrCalculated in a first patch, then do the rest in a second patch after we know all platforms compile.
WebKit Commit Bot
Comment 8
2015-05-10 14:44:52 PDT
Comment on
attachment 252746
[details]
Patch Clearing flags on attachment: 252746 Committed
r184055
: <
http://trac.webkit.org/changeset/184055
>
WebKit Commit Bot
Comment 9
2015-05-10 14:44:56 PDT
All reviewed patches have been landed. Closing bug.
Sungmann Cho
Comment 10
2015-05-10 17:54:05 PDT
@Darin Adler: Oops, but the patch has already been committed. Next time, I will be sure to follow your advice. Thank you for your thoughtful review.
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