RESOLVED FIXED 64301
Switch transform operations to FloatSize
https://bugs.webkit.org/show_bug.cgi?id=64301
Summary Switch transform operations to FloatSize
Levi Weintraub
Reported 2011-07-11 11:37:33 PDT
Currently they all act on IntSize.
Attachments
Patch (13.54 KB, patch)
2011-07-11 11:48 PDT, Levi Weintraub
no flags
Patch (12.10 KB, patch)
2011-07-11 12:25 PDT, Levi Weintraub
no flags
Patch (11.01 KB, patch)
2011-07-26 14:08 PDT, Levi Weintraub
no flags
Levi Weintraub
Comment 1 2011-07-11 11:48:22 PDT
Eric Seidel (no email)
Comment 2 2011-07-11 12:05:51 PDT
Comment on attachment 100338 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=100338&action=review Otherwise looks fine. > Source/WebCore/platform/Length.h:158 > + default: > + return static_cast<float>(undefinedLength); Normally we don't use default: cases for switch(enum), but maybe it makes sense here? > Source/WebCore/platform/Length.h:162 > + float calcFloatValue(float maxValue) const Did you copy paste this same function twice?
Levi Weintraub
Comment 3 2011-07-11 12:11:28 PDT
Comment on attachment 100338 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=100338&action=review >> Source/WebCore/platform/Length.h:158 >> + return static_cast<float>(undefinedLength); > > Normally we don't use default: cases for switch(enum), but maybe it makes sense here? This function remains unchanged, I just fixed the indenting for webkit-style. >> Source/WebCore/platform/Length.h:162 >> + float calcFloatValue(float maxValue) const > > Did you copy paste this same function twice? I'm adding a version that takes a float maxValue.
Eric Seidel (no email)
Comment 4 2011-07-11 12:12:15 PDT
Comment on attachment 100338 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=100338&action=review >>> Source/WebCore/platform/Length.h:162 >>> + float calcFloatValue(float maxValue) const >> >> Did you copy paste this same function twice? > > I'm adding a version that takes a float maxValue. Shouldn't we just templatize this sucker?
Levi Weintraub
Comment 5 2011-07-11 12:20:59 PDT
Comment on attachment 100338 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=100338&action=review >>>> Source/WebCore/platform/Length.h:162 >>>> + float calcFloatValue(float maxValue) const >>> >>> Did you copy paste this same function twice? >> >> I'm adding a version that takes a float maxValue. > > Shouldn't we just templatize this sucker? Ultimately I believe lengths should stop being ints at all, but I don't know that templates will help us here since we generally create lengths at parse-time. Anyways I think I'll revisit this when we're a bit closer to switching over. This whole class could use some cleanup at that point.
Levi Weintraub
Comment 6 2011-07-11 12:25:19 PDT
Levi Weintraub
Comment 7 2011-07-12 10:29:47 PDT
(In reply to comment #6) > Created an attachment (id=100348) [details] > Patch Ping for re-review :)
Eric Seidel (no email)
Comment 8 2011-07-12 11:49:43 PDT
Comment on attachment 100348 [details] Patch This changes some platform things to know about Layout*. Darin may feel this is also a layering violation. You should check.
Darin Adler
Comment 9 2011-07-12 11:53:33 PDT
Comment on attachment 100348 [details] Patch This looks like a layering violation to me. The transforms themselves are part of the graphics framework, not the rendering system, so they should not be using layout types. Instead they could be overloaded to work on both int and float, or changed to always use float.
Simon Fraser (smfr)
Comment 10 2011-07-12 11:55:20 PDT
Comment on attachment 100348 [details] Patch Agree with Darin.
Levi Weintraub
Comment 11 2011-07-26 14:08:36 PDT
Levi Weintraub
Comment 12 2011-07-27 11:46:07 PDT
Can I get a review? This just works :)
Levi Weintraub
Comment 13 2011-07-27 12:28:32 PDT
Comment on attachment 102050 [details] Patch Thanks for the review, Simon.
Levi Weintraub
Comment 14 2011-07-27 16:18:37 PDT
Comment on attachment 102050 [details] Patch Clearing flags on attachment: 102050 Committed r91880: <http://trac.webkit.org/changeset/91880>
Levi Weintraub
Comment 15 2011-07-27 16:18:43 PDT
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.