Closed Bug 957187 Opened 10 years ago Closed 10 years ago

The variable inspection popup never appears in the right place on Linux and Windows

Categories

(DevTools :: Debugger, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 29

People

(Reporter: vporof, Assigned: vporof)

Details

Attachments

(1 file, 1 obsolete file)

This is driving me Insane...

At least on Windows and Linux, apart from the spacetime distortions (bug 956758), whenever an inspection popup opens, it immediately starts moving around in unexpected ways and towards unexpected places. The act of simply expanding/collapsing a property would cause the popup to shift weirdly.

This used to work properly.
I I can't get to the bottom of this, I'll be seriously considering displaying the variables view inline, in the editor, instead of opening it in a popup. This might end up looking like a console.dir() in the webconsole.

What do you guys think about this? Would it be awful?
I think that would be fine.
(In reply to Nick Fitzgerald [:fitzgen] from comment #2)
> I think that would be fine.

Apart from looking funny and weird, that would be super slow as it will cause everything to shift down, causing a lot of reflows and stuff (due to how CM works)

I suggest using the cursor node as the anchor and having only the X offset while opening the popup. 
Introducing Y offset causes bad things to happen. Especially things never align when you have the devtools zoomed up or down.
Attached patch dbg-tooltip.patch (obsolete) — Splinter Review
This might work. I'll play with it some more.
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Attached patch v2Splinter Review
This seems to be working reasonably well from what I've tested.
Attachment #8357030 - Attachment is obsolete: true
Attachment #8357095 - Flags: review?(past)
Comment on attachment 8357095 [details] [diff] [review]
v2

Review of attachment 8357095 [details] [diff] [review]:
-----------------------------------------------------------------

I still can't reproduce it locally, but the changes look fine to me.

::: browser/devtools/sourceeditor/editor.js
@@ +558,5 @@
> +    let mark = cm.markText(from, to, { replacedWith: span });
> +    return {
> +      anchor: span,
> +      clear: () => mark.clear()
> +    };

Just checking, but does mark.clear() discard replacedWith nodes automatically?
Attachment #8357095 - Flags: review?(past) → review+
(In reply to Panos Astithas [:past] from comment #6)
> 
> Just checking, but does mark.clear() discard replacedWith nodes
> automatically?

Yup.
https://hg.mozilla.org/mozilla-central/rev/ce93163fa554
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 29
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: