Closed Bug 689939 Opened 13 years ago Closed 13 years ago

Infobar disappears when node fills top and bottom of screen during page zoom in highlighter

Categories

(DevTools :: General, defect, P2)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 12

People

(Reporter: rcampbell, Assigned: paul)

References

Details

Attachments

(2 files, 1 obsolete file)

STR:

1. Open Highlighter
2. Select a large node on the screen.
3. Hit ctrl/cmd-+ several times so the node reaches both top and bottom of the window

Expected results:

Infobar should move to the top of the available window space inside the node.

Actual:

Infobar disappears offscreen.
Assignee: nobody → paul
I can't reproduce. Can you give me an example?
That might be fixed once bug 690068 get fixed.
Blocks: 663830
I can reproduce this with a bugzilla body element, but only zooming out, not zooming in.
Ditto, replace Cmd-+ in C#0 with Cmd-- and you can see this bug in action.

Dave suggested the reason might be that we're doing our bounds checking in the pre-scaled coordinate space.
Bug 690068 hasn't fixed this problem.
We're doing developer tool prioritization, filter on 'brontozaur'
to ignore the spam.
Priority: -- → P2
Attached patch patch v1Splinter Review
Attachment #579683 - Flags: review?(rcampbell)
Blocks: 694954
Status: NEW → ASSIGNED
Comment on attachment 579683 [details] [diff] [review]
patch v1

       case "resize":
+        this.getZoomFactor(true);

are there any other cases where you'll want to send true to getZoomFactor?

Without that, we could do away with the cached value (this._zoom) and just call the lookup directly. It should be pretty fast and we'd be able to use a real getter.

I don't feel strongly about it though and this looks like it'll do the job nicely, so...
Attachment #579683 - Flags: review?(rcampbell) → review+
Whiteboard: [needs-test]
Attached patch patch v1.1 (obsolete) — Splinter Review
better?
Attachment #582830 - Flags: review?(rcampbell)
Comment on attachment 582830 [details] [diff] [review]
patch v1.1

you can probably reuse the test in browser_inspector_highlighter.js which already does some zoom calculation. Making it call your computeZoomFactor method will get it tested.

r+ with changes to the test to make that happen.
Attachment #582830 - Flags: review?(rcampbell) → review+
Attached patch patch v1.2Splinter Review
with test
Attachment #582830 - Attachment is obsolete: true
Thx for the r+. Updated the test as you asked.
Whiteboard: [needs-test] → [land-in-fx-team]
-    let rect = this._highlightRect;
-    if (rect && this._highlighting) {
+    if (this._highlightRect) {
       let winHeight = this.win.innerHeight * this.zoom;
       let winWidth = this.win.innerWidth * this.zoom;
+
+      let rect = {top: this._highlightRect.top,
+                  left: this._highlightRect.left,
+                  width: this._highlightRect.width,
+                  height: this._highlightRect.height};

this didn't apply cleanly. Wondering if you had some other patch installed previously, as the let winHeight = … and winWidth lines were not there.

Added them.
ignore the above. wrong bug. :/
and now I see why the above happened. :)
https://hg.mozilla.org/integration/fx-team/rev/cf81dc222041
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Backed out because of orange

https://hg.mozilla.org/integration/fx-team/rev/37b413b9c87b
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 12
This was not the cause of the orange.
Whiteboard: [land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/594b1a6f6a97
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/594b1a6f6a97
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: