WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
62145
Convert nodeAtPoint to IntPoint
https://bugs.webkit.org/show_bug.cgi?id=62145
Summary
Convert nodeAtPoint to IntPoint
Emil A Eklund
Reported
2011-06-06 13:42:50 PDT
Ongoing tx, ty removal.
Attachments
Patch
(61.30 KB, patch)
2011-06-06 16:56 PDT
,
Emil A Eklund
no flags
Details
Formatted Diff
Diff
Patch
(61.71 KB, patch)
2011-06-06 17:30 PDT
,
Emil A Eklund
no flags
Details
Formatted Diff
Diff
Patch for landing
(61.21 KB, patch)
2011-06-07 19:51 PDT
,
Emil A Eklund
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Emil A Eklund
Comment 1
2011-06-06 16:56:09 PDT
Created
attachment 96153
[details]
Patch
WebKit Review Bot
Comment 2
2011-06-06 17:16:30 PDT
Comment on
attachment 96153
[details]
Patch
Attachment 96153
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/8744012
Emil A Eklund
Comment 3
2011-06-06 17:30:04 PDT
Created
attachment 96163
[details]
Patch
Eric Seidel (no email)
Comment 4
2011-06-06 17:33:17 PDT
Comment on
attachment 96153
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=96153&action=review
The more I see of these, the less I like "accumulatedOffset". I conveys about as much meaning as "addedInt". I think we need a better name. I am entertained that this patch had some (in my view) at least slightly better names for these values prior to this change. r-, but only because of the red bots.
> Source/WebCore/rendering/svg/RenderSVGModelObject.h:70 > - bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int dxParentToContainer, int dyParentToContainer, HitTestAction); > + bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset, HitTestAction);
Again, more attempts by me to describe what I thought was going on as I wrote RenderSVGModelObject. :)
> Source/WebCore/rendering/svg/RenderSVGRoot.cpp:-442 > - IntPoint pointInParent = pointInContainer - containerToParentOffset;
This was my understanding at the time, was that this offset was from the container (of whatever form that is) to our parent. I actually kinda think containerToParentOffset is more descriptive than accumulatedOffset. :) I wish we had dug up this code earlier. We can always of course rename accumulatedOffset everywhere now that we're slowly understanding what this is all doing.
Emil A Eklund
Comment 5
2011-06-06 17:40:51 PDT
The name containerToParentOffset is much more descriptive than accumulatedOffset. How about I change it to containerToParentOffset in this patch and then go back and replace the existing uses of accumulatedOffset?
Eric Seidel (no email)
Comment 6
2011-06-06 17:42:05 PDT
I think you should run any naming by Simon since he's had opinions in the past. But I'm OK with "containerToParentOffset" used in this or other places.
Eric Seidel (no email)
Comment 7
2011-06-06 17:42:26 PDT
Please let the EWSes have their say.
Emil A Eklund
Comment 8
2011-06-07 13:53:34 PDT
Simon, what's your take on this? Do you prefer accumulatedOffset, containerToParentOffset or something else entirely?
Simon Fraser (smfr)
Comment 9
2011-06-07 13:55:02 PDT
(In reply to
comment #8
)
> Simon, what's your take on this? Do you prefer accumulatedOffset, containerToParentOffset or something else entirely?
accumulatedOffset is more accurate than containerToParentOffset, but I'm not sure that 'accumulated' adds much.
Emil A Eklund
Comment 10
2011-06-07 13:58:18 PDT
> accumulatedOffset is more accurate than containerToParentOffset, but I'm not sure that 'accumulated' adds much.
True, naming is hard. Just calling it offset seems confusing though.
Eric Seidel (no email)
Comment 11
2011-06-07 14:48:47 PDT
(In reply to
comment #9
)
> (In reply to
comment #8
) > > Simon, what's your take on this? Do you prefer accumulatedOffset, containerToParentOffset or something else entirely? > > accumulatedOffset is more accurate than containerToParentOffset, but I'm not sure that 'accumulated' adds much.
containerToParentOffset is just describing what I thought the offset meant, when I wrote RenderSVGModelObject 2 years ago. If we actually know what these offsets do... then we can name them better. :) I still don't understand what they mean.
Emil A Eklund
Comment 12
2011-06-07 16:18:20 PDT
I plan to land this with accumulatedOffset. I'll change it here and elsewhere if and when we come up with a better name.
Emil A Eklund
Comment 13
2011-06-07 19:51:38 PDT
Created
attachment 96364
[details]
Patch for landing
WebKit Review Bot
Comment 14
2011-06-07 20:12:21 PDT
Comment on
attachment 96364
[details]
Patch for landing Clearing flags on attachment: 96364 Committed
r88319
: <
http://trac.webkit.org/changeset/88319
>
WebKit Review Bot
Comment 15
2011-06-07 20:12:27 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.
Top of Page
Format For Printing
XML
Clone This Bug