Last Comment Bug 659071 - Ctrl + scrollwheel doesn't zoom when hovering a <video> element
: Ctrl + scrollwheel doesn't zoom when hovering a <video> element
Product: Core
Classification: Components
Component: Event Handling (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla17
Assigned To: Masayuki Nakano [:masayuki]
: Andrew Overholt [:overholt]
Depends on: 719320
  Show dependency treegraph
Reported: 2011-05-23 11:58 PDT by Daniel Holbert [:dholbert] (vacation, returning 2/27)
Modified: 2012-08-14 06:02 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (4.70 KB, patch)
2012-08-13 05:14 PDT, Masayuki Nakano [:masayuki]
bugs: review+
Details | Diff | Splinter Review

Description User image Daniel Holbert [:dholbert] (vacation, returning 2/27) 2011-05-23 11:58:10 PDT
 1. Load video w/ embedded <video>, e.g.
 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 (without experimental-html5-video-opt-in)
Comment 1 User image Daniel Holbert [:dholbert] (vacation, returning 2/27) 2011-05-23 11:59:19 PDT
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:
Comment 2 User image Chris DeCairos (:cade) 2012-02-12 15:44:10 PST
The problem is here:

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

!content->IsXUL() returns false when content is a <audio> or <video> element
Comment 3 User image Chris DeCairos (:cade) 2012-02-12 19:01:38 PST
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
Comment 4 User image Masayuki Nakano [:masayuki] 2012-07-17 20:44:55 PDT
Shouldn't we check whether the document is XUL?
Comment 5 User image Olli Pettay [:smaug] 2012-07-18 00:38:07 PDT
Yeah. I think that shouldn't be !content->IsXUL() but
Comment 6 User image Masayuki Nakano [:masayuki] 2012-07-18 01:03:20 PDT
Thanks, I'll fix this after bug 719320.
Comment 7 User image Masayuki Nakano [:masayuki] 2012-08-13 05:14:50 PDT
Created attachment 651330 [details] [diff] [review]

If the test is performed in the iframe of the harness, some tests after it will fail :-(
Comment 8 User image Masayuki Nakano [:masayuki] 2012-08-13 07:21:08 PDT
Comment 9 User image Ed Morley [:emorley] 2012-08-14 06:02:38 PDT

Note You need to log in before you can comment on or make changes to this bug.