Ctrl + scrollwheel doesn't zoom when hovering a <video> element

RESOLVED FIXED in mozilla17

Status

()

Core
Event Handling
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: dholbert, Assigned: masayuki)

Tracking

Trunk
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
STR:
 1. Load video w/ embedded <video>, e.g. http://tinyvid.tv/show/q31g9htvwjdh
 2. Position cursor over page background.
 3. Ctrl-Scrollwheel
     --> Page zooms in/out
 4. Position cursor over <video> element
 4. Ctrl-Scrollwheel
     --> Page DOES NOT ZOOM
 5. Ctrl-+
     --> Page zooms in/out

ACTUAL RESULTS: Scrollwheel zoom is broken when cursor is above a <video>.


NOTE: Flash videos don't have this problem -- e.g. Ctrl-scrollwheel zooms just fine when I hover the video at http://www.youtube.com/watch?v=7FOydLkHQmw (without experimental-html5-video-opt-in)
(Reporter)

Updated

6 years ago
Summary: Ctrl + scrollwheel doesn't zoom when hovering a video → Ctrl + scrollwheel doesn't zoom when hovering a <video> element
(Reporter)

Comment 1

6 years ago
Version info:
Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110522 Firefox/6.0a1

This bug also reproduces when you're viewing a video directly, too -- e.g. I can repro it here:   http://media.tinyvid.tv/q31g9htvwjdh.ogg
The problem is here:

http://mxr.mozilla.org/mozilla-central/source/content/events/src/nsEventStateManager.cpp#2514

if (content &&
    !content->IsNodeOfType(nsINode::eHTML_FORM_CONTROL) &&
    !content->IsXUL())
  {

!content->IsXUL() returns false when content is a <audio> or <video> element
So it looks like the problem is the controls of the audio and video element. When they are visible and you try to zoom in using the scroll wheel over one of the elements, the controls become the "content" parameter I mentioned in comment 2. 

Not sure wht the best solution is. we could add a special condition to the if statement up there for media elements, or we could somehow get the event to ignore the controls and get the video frame as content
Shouldn't we check whether the document is XUL?

Comment 5

5 years ago
Yeah. I think that shouldn't be !content->IsXUL() but
!content->OwnerDoc()->IsXUL()
Thanks, I'll fix this after bug 719320.
Component: Video/Audio → Event Handling
Depends on: 719320
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Created attachment 651330 [details] [diff] [review]
Patch

If the test is performed in the iframe of the harness, some tests after it will fail :-(
Attachment #651330 - Flags: review?(bugs)

Updated

5 years ago
Attachment #651330 - Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/823ee7ad3411
Target Milestone: --- → mozilla17
OS: Linux → All
Hardware: x86_64 → All

Comment 9

5 years ago
https://hg.mozilla.org/mozilla-central/rev/823ee7ad3411
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.