Closed
Bug 990631
Opened 11 years ago
Closed 11 years ago
web console popup is misaligned on Windows after bug 961431
Categories
(Core :: XUL, defect)
Tracking
()
VERIFIED
FIXED
mozilla31
Tracking | Status | |
---|---|---|
firefox28 | --- | unaffected |
firefox29 | --- | affected |
firefox30 | --- | fixed |
firefox31 | --- | verified |
People
(Reporter: Optimizer, Assigned: tnikkel)
References
Details
Attachments
(2 files)
(deleted),
video/webm
|
Details | |
(deleted),
patch
|
enndeakin
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Some of the "hacks" in the popup code were to prevent mis aligning of the popup on Windows.
On windows, when you type "window." then press "a" and then BACK_SPACE, the popup is no longer attached to the input area, rather, it floats on top. There are various other ways to bring about a similar effect.
Comment 1•11 years ago
|
||
Girish, can you please post a screenshot / screencast? Maybe Timothy can help us with a fix.
Reporter | ||
Comment 2•11 years ago
|
||
Following the exact STR from desription.
Comment 3•11 years ago
|
||
Thanks Girish!
Timothy, can you please check if this bug would be easy to fix in the platform code? It's one of those old painful xul popup bugs for us - it does affect the autocomplete popup we use in devtools for several years. Thank you very much!
Flags: needinfo?(tnikkel)
Assignee | ||
Comment 4•11 years ago
|
||
Do I need to back out the hacks you have in place in order to see this bug? Or is it visible in vanilla Firefox? Also, is it at all specific to a platform (ie Windows only)?
Flags: needinfo?(mihai.sucan)
Reporter | ||
Comment 5•11 years ago
|
||
Right now, in the latest Nightly, and only on Windows, this can be seen on a vanilla Nightly.
Flags: needinfo?(mihai.sucan)
Comment 6•11 years ago
|
||
Which hacks are you referring to? I couldn't find anything specific and you don't seem to be moving the popup yourself.
What's happening here is that the popup is getting resized, and nsMenuPopupFrame::SetPopupPosition is adjusting the position due to the new size properly.
We call nsIWidget::Resize with the new position and size. Then, we get a widget layer callback indicating that the popup was moved, followed by a resize callback.
But because this panel has level="top", nsXULPopupManager::PopupMoved calls MoveTo thinking that you're trying to manually move the popup, disconnecting it from the anchor.
Ideally, we should just make the move/resize callbacks just understand that the position and size that we asked for within SetPopupPosition is what we want, and we only want to do anything when something external to this changes the position and size. There's other bugs about this as well.
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Neil Deakin from comment #6)
> But because this panel has level="top", nsXULPopupManager::PopupMoved calls
> MoveTo thinking that you're trying to manually move the popup, disconnecting
> it from the anchor.
Why is the check in nsXULPopupManager::PopupMoved that the position is the same (the one that starts "aPnt.x != currentPnt.x ...") not working? ie it should decide we are in the same position and not do anything.
Flags: needinfo?(tnikkel)
Comment 8•11 years ago
|
||
(In reply to Neil Deakin from comment #6)
> Which hacks are you referring to? I couldn't find anything specific and you
> don't seem to be moving the popup yourself.
In bug 961431 we removed a bunch of ugly hacks from our autocomplete-popup.js file. We were working around XUL popup bugs - problems with positioning and sizing. These hacks were removed in an attempt to fix that new bug. It wasnt sufficient. Thanks to Timothy's work now popups no longer slide down, but we still have problems with positioning on Windows as pointed out in comment #2.
Comment 9•11 years ago
|
||
(In reply to Timothy Nikkel (:tn) from comment #7)
> Why is the check in nsXULPopupManager::PopupMoved that the position is the
> same (the one that starts "aPnt.x != currentPnt.x ...") not working? ie it
> should decide we are in the same position and not do anything.
It should, but currentPnt is (-1, -1) as the popup is anchored and not screen positioned.
I think the check should really just be comparing the actual requested screen position with the aPnt passed to PopupMoved.
Reporter | ||
Comment 10•11 years ago
|
||
(silently moves this to CORE::XUL)
Component: Developer Tools: Console → XUL
Product: Firefox → Core
Hardware: x86_64 → All
Assignee | ||
Comment 11•11 years ago
|
||
(In reply to Neil Deakin from comment #9)
> I think the check should really just be comparing the actual requested
> screen position with the aPnt passed to PopupMoved.
I agree! This patch does that and it fixes the bug for me. In fact we already made the same change for the popup size in http://hg.mozilla.org/mozilla-central/rev/3253b8b2b75e
Assignee: nobody → tnikkel
Attachment #8401806 -
Flags: review?(enndeakin)
Comment 12•11 years ago
|
||
Comment on attachment 8401806 [details] [diff] [review]
patch
Looks good, and works with various panels I tests on Windows and Mac.
Attachment #8401806 -
Flags: review?(enndeakin) → review+
Assignee | ||
Comment 14•11 years ago
|
||
Comment 15•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Comment 16•11 years ago
|
||
Girish, can you please confirm this bug is fixed? Thanks!
Flags: needinfo?(scrapmachines)
Reporter | ||
Comment 17•11 years ago
|
||
Yup it is.
Status: RESOLVED → VERIFIED
Flags: needinfo?(scrapmachines)
Reporter | ||
Updated•11 years ago
|
Reporter | ||
Comment 18•11 years ago
|
||
Timothy, is this okay to be uplifted ? Ideally, we would want this to be uplifted till 29 as the first fix for bug 961431 is in 29 (which exposed this bug again).
Reporter | ||
Updated•11 years ago
|
status-firefox28:
--- → unaffected
status-firefox29:
--- → affected
Assignee | ||
Comment 19•11 years ago
|
||
I'm a little weary of uplifting this fix to beta. In the past regressions from popup fixes like this have appeared quite late and I'd be more comfortable with a full beta cycle. Is there another way to proceed for beta?
Comment 20•11 years ago
|
||
(In reply to Timothy Nikkel (:tn) from comment #19)
> I'm a little weary of uplifting this fix to beta. In the past regressions
> from popup fixes like this have appeared quite late and I'd be more
> comfortable with a full beta cycle.
>
> Is there another way to proceed for beta?
Unfortunately, I dont know of a different way to proceed. We can probably leave it as-is...
Can you please ask for aurora approval? I find that more important.
Thanks a lot for your fixes - they were very much needed.
Assignee | ||
Comment 21•11 years ago
|
||
Comment on attachment 8401806 [details] [diff] [review]
patch
[Approval Request Comment]
Bug caused by (feature/regressing bug #): the underlying platform bug has existed for a very long time, some more recent changes in devtools has made it more prominent there
User impact if declined: misplaced popup panels in some cases
Testing completed (on m-c, etc.): been on m-c for a few days now, Neil tested localy with some popup positioned tests
Risk to taking this patch (and alternatives if risky): popups can have some unexpected issues, but I think getting more testing exposure for this by getting it on aurora will only help that (a full beta cycle would be ideal though)
String or IDL/UUID changes made by this patch: none
Attachment #8401806 -
Flags: approval-mozilla-aurora?
Comment 22•11 years ago
|
||
Comment on attachment 8401806 [details] [diff] [review]
patch
Aurora sure, for more eyes, but yes let's make sure this gets an entire beta cycle.
Attachment #8401806 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 23•11 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•