The default bug view has changed. See this FAQ.

click-and-drag in Tilt becomes wonky after you do full-page-zoom (Ctrl +)

RESOLVED FIXED in Firefox 12

Status

()

Firefox
Developer Tools: Inspector
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dholbert, Assigned: vporof)

Tracking

Trunk
Firefox 12
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [tilt], URL)

Attachments

(2 attachments, 3 obsolete attachments)

(Reporter)

Description

5 years ago
STR:
 1. visit http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/ (or any site, really)

 2. Right-click on the upper blob of text, hit "Q" for inspect, and then Alt-M for 3D

 3. Hold Ctrl (or Cmd on mac) and mash your "+" key a few times to do full-page-zoom
    Do this until you can't see the gray background anymore.

 4. Click the top-center of the page and drag it towards the bottom of the screen.

EXPECTED RESULTS:  Page tips forward, "bowing" to me.
ACTUAL RESULTS:    Page rotates to the right

I'm guessing that the coordinates of the click position aren't getting scaled by the fullpage zoom factor, or something, so a click at the top-center is interpreted as a click at the top-right.
(Reporter)

Comment 1

5 years ago
Mozilla/5.0 (X11; Linux x86_64; rv:11.0a1) Gecko/20111219 Firefox/11.0a1
(Reporter)

Comment 2

5 years ago
Created attachment 583327 [details]
screencast

screencast of normal behavior followed by broken-behavior-after-fullpage-zoom
(Assignee)

Updated

5 years ago
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Whiteboard: [tilt]
(Assignee)

Comment 3

5 years ago
Funny.
Zooming shouldn't be supported yet, bug 710762 adds that functionality (without the need of using Ctrl/Cmd). Right now, Ctrl+zooming actually scales the entire canvas, instead of translating in the 3D environment. This should be avoided.
(Assignee)

Comment 4

5 years ago
Created attachment 583456 [details] [diff] [review]
v1
Attachment #583456 - Flags: review?(rcampbell)
(Assignee)

Updated

5 years ago
Depends on: 712286
Comment on attachment 583456 [details] [diff] [review]
v1

test please!
(Assignee)

Comment 6

5 years ago
Created attachment 583763 [details] [diff] [review]
v2
Attachment #583456 - Attachment is obsolete: true
Attachment #583456 - Flags: review?(rcampbell)
Attachment #583763 - Flags: review?(rcampbell)
(Assignee)

Comment 7

5 years ago
Comment on attachment 583763 [details] [diff] [review]
v2

On some Linux machines:

TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/tilt/test/browser_tilt_zoom.js | The renderer width wasn't set correctly.
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/tilt/test/browser_tilt_zoom.js | The renderer height wasn't set correctly.

Investigating...
Attachment #583763 - Flags: review?(rcampbell)
(Assignee)

Comment 8

5 years ago
Created attachment 584035 [details] [diff] [review]
v3

Fixed test failures. Try is green.
https://tbpl.mozilla.org/?tree=Try&rev=52a708a07be0
Attachment #583763 - Attachment is obsolete: true
Attachment #584035 - Flags: review?(rcampbell)
(Assignee)

Comment 9

5 years ago
There seems to be one Win intermittent orange in a webconsole test. There's bug 676696 filed for that, but hasn't occurred since 2011-08-29, so I'm not sure if it's related to this patch or not.
(Assignee)

Comment 10

5 years ago
Created attachment 584071 [details] [diff] [review]
v4

The orange may (may!) be caused by resizing the browser window. Doing another test run with a new patch that reverts the size to original after the tests are finished seems to avoid causing the intermittent orange, but we'll never know. For safety, I added the "improved" patch.

For the record, I remember also triggering this orange a while ago by not doing a removeChild for a canvas added to the selectedBrowser.parentNode. This remained stuck in the xul window, and thus altered the innerWidth and innerHeight of the content document when the webconsole tests were run. Maybe this is the underlying reason for bug 676696?
Attachment #584035 - Attachment is obsolete: true
Attachment #584035 - Flags: review?(rcampbell)
Attachment #584071 - Flags: review?(rcampbell)
Comment on attachment 584071 [details] [diff] [review]
v4

+TiltUtils.getDocumentZoom = function TU_getDocumentZoom() {
+  let browserWindow = Cc["@mozilla.org/appshell/window-mediator;1"]
+    .getService(Ci.nsIWindowMediator)
+    .getMostRecentWindow("navigator:browser");
+
+  return browserWindow.gBrowser.selectedBrowser.markupDocumentViewer.fullZoom;
+};

this feels like it should be a utility method in the InspectorUI object since we seem to keep re-implementing it. Maybe even a shared utils method.

A lot of TiltUtils.jsm looks like it could be refactored to live in shared/. We should keep that in mind.

wow, totally missed those bad indents in browser_tilt_controller.js. Thanks for fixing.
Attachment #584071 - Flags: review?(rcampbell) → review+
Whiteboard: [tilt] → [tilt][land-in-fx-team]
(Assignee)

Comment 12

5 years ago
(In reply to Rob Campbell [:rc] (robcee) from comment #11)
> Comment on attachment 584071 [details] [diff] [review]
> v4
> 
> wow, totally missed those bad indents in browser_tilt_controller.js. Thanks
> for fixing.

What bad indents? No bad indents, I just wrapped a lot of code in function testEventCancel(cancellingEvent), to reuse that stuff a bit later in the test :)

Comment 13

5 years ago
https://hg.mozilla.org/integration/fx-team/rev/8be4e3d2105e
Whiteboard: [tilt][land-in-fx-team] → [tilt][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/8be4e3d2105e
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [tilt][fixed-in-fx-team] → [tilt]
Target Milestone: --- → Firefox 12
You need to log in before you can comment on or make changes to this bug.