WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
60916
Plug-in hit testing is broken after zooming
https://bugs.webkit.org/show_bug.cgi?id=60916
Summary
Plug-in hit testing is broken after zooming
Chris Marrin
Reported
2011-05-16 13:32:21 PDT
After zooming, events on plug-ins have the wrong coordinates, which means that plug-ins don't hit-test correctly. You can see this on the video on nytimes.com
Attachments
Patch
(5.15 KB, patch)
2011-05-16 13:50 PDT
,
Chris Marrin
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Marrin
Comment 1
2011-05-16 13:50:42 PDT
Created
attachment 93688
[details]
Patch
Simon Fraser (smfr)
Comment 2
2011-05-16 14:04:53 PDT
Comment on
attachment 93688
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=93688&action=review
Would be nice to have a testcase, which should be possible with the test plugin and CSS transforms if the code were more general. What about WebKit1?
> Source/WebKit2/WebProcess/Plugins/PluginView.cpp:579 > + float scaleFactor = frame()->pageScaleFactor(); > + WebMouseEvent webMouseEvent(static_cast<const WebMouseEvent*>(currentEvent), scaleFactor);
It would be nice to make this work in more general way which worked with CSS transforms.
> Source/WebKit2/WebProcess/Plugins/PluginView.cpp:648 > + // Adjust bounds to account for pageScaleFactor > + float scaleFactor = frame()->pageScaleFactor(); > + frameRectInWindowCoordinates.setX(frameRectInWindowCoordinates.x() / scaleFactor); > + frameRectInWindowCoordinates.setY(frameRectInWindowCoordinates.y() / scaleFactor);
Ditto.
Darin Adler
Comment 3
2011-05-16 14:05:16 PDT
Comment on
attachment 93688
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=93688&action=review
r=me
> Source/WebKit2/Shared/WebMouseEvent.cpp:81 > +WebMouseEvent::WebMouseEvent(const WebMouseEvent* event, float pageScaleFactor)
I suggest using a reference rather than a pointer for the event type.
> Source/WebKit2/Shared/WebMouseEvent.cpp:85 > + , m_globalPosition(m_position)
I believe you can write: , m_globalPosition(m_position + (event->globalPosition() - event->position())) And then avoid the code below that calls the move function.
> Source/WebKit2/WebProcess/Plugins/PluginView.cpp:579 > + WebMouseEvent webMouseEvent(static_cast<const WebMouseEvent*>(currentEvent), scaleFactor);
I think this local needs a better name. The current event is also a web mouse event. How about eventWithScaledCoordinates?
Chris Marrin
Comment 4
2011-05-16 15:32:42 PDT
Committed
r86615
: <
http://trac.webkit.org/changeset/86615
>
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