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
Patch (63.61 KB, patch)
2015-05-08 13:38 PDT, Sungmann Cho
no flags
Patch (65.92 KB, patch)
2015-05-08 13:58 PDT, Sungmann Cho
no flags
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
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
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
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.