Last Comment Bug 665540 - Select (drop-down) box customized with CSS appears in upper left corner of the window if in fullscreen
: Select (drop-down) box customized with CSS appears in upper left corner of th...
Status: RESOLVED FIXED
: regression
Product: Core
Classification: Components
Component: Widget: Gtk (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla8
Assigned To: Karl Tomlinson (ni?:karlt)
:
Mentors:
Depends on: 671277
Blocks: 610391 671532
  Show dependency treegraph
 
Reported: 2011-06-20 07:26 PDT by Mariusz Dykierek
Modified: 2011-08-30 20:20 PDT (History)
6 users (show)
karlt: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Offending CSS (33 bytes, text/plain)
2011-06-20 07:27 PDT, Mariusz Dykierek
no flags Details
HTML example (189 bytes, text/plain)
2011-06-20 07:28 PDT, Mariusz Dykierek
no flags Details
Reporter's testcase html (264 bytes, text/html)
2011-06-20 08:53 PDT, Alice0775 White
no flags Details
position new popup windows even when there is no Move() or Resize(x,y,w,h) (3.54 KB, patch)
2011-06-20 18:59 PDT, Karl Tomlinson (ni?:karlt)
roc: review+
Details | Diff | Review

Description Mariusz Dykierek 2011-06-20 07:26:05 PDT
User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0
Build Identifier: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0

Select (drop-down) box customized with CSS appears in upper left corner of the window if in fullscreen.
This appears also when KDE window manager hides window borders (option in the Window menu | Advanced | No border).
Very annoying.

Reproducible: Always

Steps to Reproduce:
1. Click the 'down arrow' in the drop-down


Actual Results:  
The list appears in upper left corner.

Expected Results:  
The list should appear under select drop-down

Kubuntu 11.04 with KDE 4.6.4.
Linux mmm 2.6.38-8-generic-pae #42-Ubuntu SMP Mon Apr 11 05:17:09 UTC 2011 i686 i686 i386 GNU/Linux
Comment 1 Mariusz Dykierek 2011-06-20 07:27:58 PDT
Created attachment 540457 [details]
Offending CSS
Comment 2 Mariusz Dykierek 2011-06-20 07:28:47 PDT
Created attachment 540458 [details]
HTML example
Comment 3 Alice0775 White 2011-06-20 08:51:17 PDT
Confirmed on Ubuntu10.04+Gnome2.30.2
http://hg.mozilla.org/mozilla-central/rev/058a584ea7d3
Mozilla/5.0 (X11; Linux i686; rv:7.0a1) Gecko/20110620 Firefox/7.0a1 ID:20110620030833
http://hg.mozilla.org/releases/mozilla-aurora/rev/6c2e0aa5381c
Mozilla/5.0 (X11; Linux i686; rv:6.0a2) Gecko/20110620 Firefox/6.0a2 ID:20110620042017
http://hg.mozilla.org/releases/mozilla-release/rev/7b56ff900c2a
Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0 ID:20110615151330

Regression window:
Works:
http://hg.mozilla.org/mozilla-central/rev/868be4c08700
Mozilla/5.0 (X11; Linux i686; rv:2.2a1pre) Gecko/20110324 Firefox/4.2a1pre ID:20110324113126
Fails:
http://hg.mozilla.org/mozilla-central/rev/0798b52bb40d
Mozilla/5.0 (X11; Linux i686; rv:2.2a1pre) Gecko/20110324 Firefox/4.2a1pre ID:20110324144535
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=868be4c08700&tochange=0798b52bb40d

Suspected Bug:
65279f6a853	Ehsan Akhgari — Bug 610391 - Create the widget for drop-down comboboxes lazily, and tear it down when the drop-down is closed; r=roc
Comment 4 Alice0775 White 2011-06-20 08:53:25 PDT
Created attachment 540482 [details]
Reporter's testcase html
Comment 5 :Ehsan Akhgari (busy, don't ask for review please) 2011-06-20 16:17:29 PDT
I can reproduce on Linux, but not on Mac.  CCing karlt, since it seems to be some kind of a widget issue...
Comment 6 Karl Tomlinson (ni?:karlt) 2011-06-20 17:13:13 PDT
Initial observations:

If the main window is fullscreen (or, less ambiguously, full-monitor), there is always a black flicker over the whole window (not the whole screen) when the popup is shown, regardless of the position of the main window on the screen, suggesting that either the popup is initially shown fullscreen, or the main window is painting when it does not expect to be.  This issue is present even in Firefox 4.  It does not happen in the maximized, no border/titlebar situation (where this bug demonstrates).

This bug happens only when top-left of the main window is at the top-left of the screen (i.e. 0,0), regardless of whether it occupies the whole monitor rectangle or not.
Comment 7 :Ehsan Akhgari (busy, don't ask for review please) 2011-06-20 17:20:49 PDT
The extremely weird thing is that the code to create the popup widget has not changed at all, we just do it at a different time now...
Comment 8 Karl Tomlinson (ni?:karlt) 2011-06-20 18:41:41 PDT
I suspect what has happened is that the later creation of the popup widget means that a Resize has been skipped.

When the main window is not at (0,0), this comes from nsView::DoResetWidgetBounds < NotifyEffectiveVisibilityChanged < SetVisibility.  When the main window is not at (0,0) it does not happen because the bounds are already correct.

In the GTK port, toplevel windows are not positioned based on the rectangle passed to create; they are only positioned if there is an explicit move or resize(x,y,w,h).  This is appropriate for managed windows because it lets the window manager position main windows.  It is not appropriate, however, for override-redirect windows because the window manager will not position these.

(In reply to comment #6)
> If the main window is fullscreen (or, less ambiguously, full-monitor), there
> is always a black flicker ...

That seems to only happen when the window manager is compositing, so perhaps that is an issue with the window manager.
Comment 9 Karl Tomlinson (ni?:karlt) 2011-06-20 18:59:30 PDT
Created attachment 540658 [details] [diff] [review]
position new popup windows even when there is no Move() or Resize(x,y,w,h)

Still need to come up with a test.
Comment 10 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2011-06-23 22:48:35 PDT
Comment on attachment 540658 [details] [diff] [review]
position new popup windows even when there is no Move() or Resize(x,y,w,h)

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

Note You need to log in before you can comment on or make changes to this bug.