Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-09 Thread Steve Block
Also, the word position is used to represent a tree-position in DOM in WebKit so please don't use that to represent a point in a screen or a layout coordinate system. OK, perhaps we should use Vector2d, as is used by the Chromium port ___ webkit-dev

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-09 Thread Simon Fraser
On Jan 9, 2013, at 3:47 PM, Steve Block stevebl...@chromium.org wrote: Also, the word position is used to represent a tree-position in DOM in WebKit so please don't use that to represent a point in a screen or a layout coordinate system. OK, perhaps we should use Vector2d, as is used by the

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-09 Thread Steve Block
Removing the existing subtraction operator (xxxPoint minus xxxPoint returns xxxSize) might be a good place to start. I've uploaded a patch to https://bugs.webkit.org/show_bug.cgi?id=106408 which replaces these subtraction operators with ones that return xxxPoint, and which adds

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-09 Thread Ryosuke Niwa
On Wed, Jan 9, 2013 at 3:47 PM, Steve Block stevebl...@chromium.org wrote: Also, the word position is used to represent a tree-position in DOM in WebKit so please don't use that to represent a point in a screen or a layout coordinate system. OK, perhaps we should use Vector2d, as is used

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-09 Thread Steve Block
I'm really not sure that this set of changes is going in the right direction. What's driving them; some abstract sense of purity, or reducing the chances of introducing real bugs that we've seen in the past? Some of both. I was investigating a bug where WebCore is generating unexpected

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-09 Thread Simon Fraser
On Jan 9, 2013, at 4:52 PM, Steve Block stevebl...@chromium.org wrote: I'm really not sure that this set of changes is going in the right direction. What's driving them; some abstract sense of purity, or reducing the chances of introducing real bugs that we've seen in the past? Some of both.

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-09 Thread Steve Block
It seems like a lot of churn for relatively little gain. I'd rather our time be focused on areas that actually benefit users of WebKit. OK. I don't feel strongly enough about this to push the issue. ___ webkit-dev mailing list

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-09 Thread Dirk Schulze
On Jan 9, 2013, at 5:40 PM, Simon Fraser simon.fra...@apple.com wrote: On Jan 9, 2013, at 4:52 PM, Steve Block stevebl...@chromium.org wrote: I'm really not sure that this set of changes is going in the right direction. What's driving them; some abstract sense of purity, or reducing the

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-04 Thread Ryosuke Niwa
On Thu, Jan 3, 2013 at 10:32 PM, Steve Block stevebl...@chromium.orgwrote: I find point - point = size quite useful in general, and it seems to make logical sense. I agree that it makes logical sense, but I think that 'point - point = point' also makes sense, and is perhaps more frequently

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-04 Thread Olmstead, Don
...@lists.webkit.org [mailto:webkit-dev-boun...@lists.webkit.org] On Behalf Of Ryosuke Niwa Sent: Friday, January 04, 2013 12:19 AM To: Steve Block Cc: WebKit-Dev Development Subject: Re: [webkit-dev] Int/FloatPoint and Int/FloatSize On Thu, Jan 3, 2013 at 10:32 PM, Steve Block stevebl

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-04 Thread Dana Jansens
On Fri, Jan 4, 2013 at 12:15 AM, Simon Fraser simon.fra...@apple.comwrote: On Jan 3, 2013, at 7:43 PM, Steve Block wrote: Thanks all for the detailed replies. I wasn't aware of the distinction made between points and vectors for the purposes transforms. However, if I understand things

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-03 Thread Shawn Singh
Personally I like the idea of removing the subtraction operator (point minus point returns size) and make it explicit. *** However ***, if we change the data type of objects from Size to Point, we have to be careful to check whether they are ever mapped by transforms. In particular, Points use

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-03 Thread Peter Kasting
On Thu, Jan 3, 2013 at 11:36 AM, Shawn Singh shawnsi...@chromium.orgwrote: Cons of making a separate vector class: - offsets are sometimes treated as relative point locations, and other times treated as vectors that can be added to points. Deciding when to use which one could become just

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-03 Thread Stephen Chenney
On Thu, Jan 3, 2013 at 3:14 PM, Peter Kasting pkast...@google.com wrote: On Thu, Jan 3, 2013 at 11:36 AM, Shawn Singh shawnsi...@chromium.orgwrote: Cons of making a separate vector class: - offsets are sometimes treated as relative point locations, and other times treated as vectors that

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-03 Thread Steve Block
Thanks all for the detailed replies. I wasn't aware of the distinction made between points and vectors for the purposes transforms. However, if I understand things correctly, introducing a vector type could be considered separately from the issue I initially raised. It seems that everyone is

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-03 Thread Simon Fraser
On Jan 3, 2013, at 7:43 PM, Steve Block wrote: Thanks all for the detailed replies. I wasn't aware of the distinction made between points and vectors for the purposes transforms. However, if I understand things correctly, introducing a vector type could be considered separately from the

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-03 Thread Mike Lawther
On 4 January 2013 16:15, Simon Fraser simon.fra...@apple.com wrote: Introducing the concept of a vector could then be done in a second phase. What would you call this type, avoiding confusion with Vector? Rename that to DynamicallyResizableRandomlyAccessibleT, because, you know, Euclid got

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-03 Thread Steve Block
I find point - point = size quite useful in general, and it seems to make logical sense. I agree that it makes logical sense, but I think that 'point - point = point' also makes sense, and is perhaps more frequently the right choice. What would you call this type, avoiding confusion with

[webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-02 Thread Steve Block
Hi webkit, I was hoping that somebody could clarify the policy regarding the correct use of Int/FloatPoint vs Int/FloatSize. It seems that xxxPoint is consistently used to represent a position, which makes sense. However, when representing the position of one point relative to another, both

Re: [webkit-dev] Int/FloatPoint and Int/FloatSize

2013-01-02 Thread Peter Kasting
On Wed, Jan 2, 2013 at 11:21 PM, Steve Block stevebl...@chromium.orgwrote: - Would people welcome changes to encourage that policy? FWIW, in Chromium (downstream, non-WebKit) we ended up adding a vector (as in math, not the STL) class recently to address the sort of offset/delta between two