RESOLVED FIXED80196
Replace uses of x(), y() and width(), height() pairs with locationOffset and size()
https://bugs.webkit.org/show_bug.cgi?id=80196
Summary Replace uses of x(), y() and width(), height() pairs with locationOffset and ...
Emil A Eklund
Reported 2012-03-02 15:11:04 PST
We still have a handful of places in the code where we use x, y and width, height pairs instead of Points and Sizes.
Attachments
Patch (11.44 KB, patch)
2012-03-02 15:47 PST, Emil A Eklund
no flags
Patch for landing (12.79 KB, patch)
2012-03-05 12:03 PST, Emil A Eklund
no flags
Emil A Eklund
Comment 1 2012-03-02 15:47:37 PST
Julien Chaffraix
Comment 2 2012-03-05 10:42:18 PST
Comment on attachment 129970 [details] Patch Nit: In HTMLCanvasElement, this line could welcome the same change: FloatRect r = mapRect(rect, FloatRect(0, 0, size().width(), size().height()), destRect); Also there are other places where we could use the same pattern (like IntRect(0, 0, someComputedHeight, someComputedWidth) in the rendering code) so it seems as if the title is misleading IMHO.
Emil A Eklund
Comment 3 2012-03-05 10:44:39 PST
Thanks! I'll make the suggested changes to HTMLCanvasElement and have renamed the bug to make it clear what I am changing.
Julien Chaffraix
Comment 4 2012-03-05 10:52:20 PST
(In reply to comment #3) > Thanks! I'll make the suggested changes to HTMLCanvasElement and have renamed the bug to make it clear what I am changing. It makes it a little bit clearer but what I had in mind was not to use 'remaining' as there are some remaining use after your change (look at RenderScrollbar.cpp for example).
Emil A Eklund
Comment 5 2012-03-05 10:58:11 PST
Good point. Grep failed to find some of the computed value ones. I'll take care of the ones in RenderScrollbar and have updated the summary as suggested.
Emil A Eklund
Comment 6 2012-03-05 12:03:44 PST
Created attachment 130174 [details] Patch for landing
Eric Seidel (no email)
Comment 7 2012-03-05 13:45:11 PST
Comment on attachment 130174 [details] Patch for landing These changes are so fantastic. Thank you.
WebKit Review Bot
Comment 8 2012-03-05 14:59:11 PST
Comment on attachment 130174 [details] Patch for landing Clearing flags on attachment: 130174 Committed r109805: <http://trac.webkit.org/changeset/109805>
WebKit Review Bot
Comment 9 2012-03-05 14:59:16 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.