Closed GoogleCodeExporter closed 9 years ago
Can you describe how hit-testing currently works in WebKit/Chromium (ie,
references to the relevant JavaScript APIs or example code)?
Original comment by magreenb...@gmail.com
on 30 Aug 2011 at 4:26
Or is this something that would be done strictly on the C++ API side?
Original comment by magreenb...@gmail.com
on 30 Aug 2011 at 4:34
Yes, I was envisioning it happening strictly on the C++ side. In my particular
case, I would perform a hit test right before displaying my context menu;
if the result of the hit test contained a word or
image, I could then select it.
Original comment by emer...@evernote.com
on 30 Aug 2011 at 4:42
@comment#3: It seems like this is something that should be possible currently
using JavaScript. For example, you could use document.elementFromPoint(x,y) to
retrieve the DOM element on right-click and then use JavaScript to select it.
Have you explored this avenue?
Original comment by magreenb...@gmail.com
on 30 Aug 2011 at 4:49
I hadn't considered JavaScript, so yes, that does sound like it might work
(thanks!). In our application, we've tried to limit our use of JavaScript out
of (perhaps unfounded) fears about V8's memory footprint and garbage
collection. I'd ultimately like to be able to do this from C++, but I
definitely understand that this is probably a niche request. :-)
Original comment by emerick
on 30 Aug 2011 at 5:17
Marking this issue as WontFix because JavaScript is a viable alternative.
Original comment by magreenb...@gmail.com
on 8 Mar 2013 at 9:15
My application requires a hit test for every mouse movement. Using JS every
hitTest requires 4ms avg.
Thus, i request re-opening this ticket since using JS is not a performant way.
Original comment by acm...@googlemail.com
on 1 Oct 2014 at 1:06
Original issue reported on code.google.com by
emerick
on 30 Aug 2011 at 4:13