RESOLVED INVALID 135919
Add LayoutUnit argument coders to WebCoreArgumentCoders
https://bugs.webkit.org/show_bug.cgi?id=135919
Summary Add LayoutUnit argument coders to WebCoreArgumentCoders
Wenson Hsieh
Reported 2014-08-13 17:43:20 PDT
Related to the encoding/decoding of snap offsets. LayoutUnits currently lack an implementation in WebCoreArgumentCoders.
Attachments
Patch (3.05 KB, patch)
2014-08-13 20:05 PDT, Wenson Hsieh
no flags
Patch (3.05 KB, patch)
2014-08-13 21:23 PDT, Wenson Hsieh
ap: review-
Wenson Hsieh
Comment 1 2014-08-13 20:05:39 PDT
Tim Horton
Comment 2 2014-08-13 21:07:08 PDT
Comment on attachment 236574 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=236574&action=review > Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:338 > + encoder << layoutUnit.toDouble(); Why toDouble instead of encoding raw LayoutUnit numerator/denominator? Is that safe? If so, why? That information should be in the changelog.
Wenson Hsieh
Comment 3 2014-08-13 21:23:42 PDT
Tim Horton
Comment 4 2014-08-13 21:54:33 PDT
I think we decided that you didn't need to do this?
Alexey Proskuryakov
Comment 5 2014-08-13 22:59:11 PDT
Comment on attachment 236576 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=236576&action=review r- for using int. > Source/WebKit2/ChangeLog:3 > + Add LayoutUnit argument coders to WebCoreArgumentCoders It seems a little bit strange to expose internals of layout machinery even to WebKit, and more so to UI process. Can we use whatever type is exposed in API until we get down to WebCore? > Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:343 > + int decodedRawValue; IPC always uses fixed size types, like uint64_t, not int.
Tim Horton
Comment 6 2014-08-13 23:03:49 PDT
Indeed, and we (wenson/zalan mostly) already established that he doesn't need to do this anyway.
Wenson Hsieh
Comment 7 2014-08-13 23:07:10 PDT
Comment on attachment 236576 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=236576&action=review Thanks for taking a look at this! However, after talking with Tim and Zalan, we've decided against IPC-ing LayoutUnit (if we ever do decide to do it though, we'll keep that in mind) >> Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:343 >> + int decodedRawValue; > > IPC always uses fixed size types, like uint64_t, not int. Got it -- thanks for the tip.
Note You need to log in before you can comment on or make changes to this bug.