Closed Bug 948419 Opened 11 years ago Closed 11 years ago

about:newtab cannot be zoomed by using Ctrl and mouse wheel

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla29

People

(Reporter: adalucinet, Assigned: adw)

Details

(Whiteboard: [good first verify] [testday-20140328])

Attachments

(1 file)

Reproducible on: latest Aurora (Build ID: 20131209004003)
Mozilla/5.0 (Windows NT 6.1; rv:27.0) Gecko/20100101 Firefox/27.0
Reproducible on: latest Nightly (Build ID: 20131209053402)
Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0

STR:
1. Launch Firefox.
2. Navigate to at least 3 different websites.
3. Restart.
4. Open a new tab page.
5. Zoom in/out with Ctrl and mouse wheel.

Expected results: Thumbnails are zoomed.

Actual results: Thumbnails are not zoomed.

Notes:
1. Reproducible on Ubuntu and Mac OS X.
2. Not a regression, reproducible on Nightly 2013-07-24: when the Thumbnail Service landed (bug 870100).
3. Not reproducible with Ctrl and +/- buttons.
Removing the !content->OwnerDoc()->IsXUL() term in the conditional here in nsEventStateManager::DoScrollZoom allows zooming with the mouse wheel: http://mxr.mozilla.org/mozilla-central/source/content/events/src/nsEventStateManager.cpp#2509

I don't remember how IsXUL() is defined, but the about:newtab page is a XUL document (chrome://browser/content/newtab/newTab.xul) with a xul:window document element with XHTML children.

Ctrl-+/- on the other hand is handled by the front-end in browser-fullZoom.js.  It doesn't check that the document is XUL, hence the difference.

Surely the mouse wheel and the +/- keys should behave the same.  Are there some XUL documents that really can't be safely full-zoomed?  Seems like the markup viewer (or whoever actually sets the full zoom) should be the one to reject incompatible documents, not the mouse wheel code.
Summary: Thumbnails cannot be zoomed by using CTRL and mouse wheel → about:newtab cannot be zoomed by using Ctrl and mouse wheel
It would be rather odd to see Firefox UI being zoomed accidentally.

nsIDocument::IsXUL means just that the document is XULDocument.
Though, something else seems to block zoom in such case.
(In reply to Olli Pettay [:smaug] from comment #2)
> It would be rather odd to see Firefox UI being zoomed accidentally.

Definitely, but it should be OK to zoom XUL documents shown in content, like about:newtab, depending on the specific document, I guess.  But I don't mean to suggest that I think allowing XUL documents to be zoomed should block this bug.
I think we could change that !IsXUL() check to
!document->container->IsChromeDocShell()
Like this?
Attachment #8346095 - Flags: review?(bugs)
Comment on attachment 8346095 [details] [diff] [review]
IsInChromeDocshell

Yup.
Attachment #8346095 - Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/c3610b50947e
Assignee: nobody → adw
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/c3610b50947e
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Whiteboard: [good first verify]
Verified fixed using Windows 7 64 bit and Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
Whiteboard: [good first verify] → [good first verify] [testday-20140328]
[testday-20140411]
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0

This issue is fixed on Windows 7 SP1 x64, using the latest Beta (20140410150427).
Status: RESOLVED → VERIFIED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: