Closed Bug 1521688 Opened 6 years ago Closed 6 years ago

Missing window controls (minimize, maximize and close buttons) on a window opened via window.open() with "toolbar", without "menubar", when the menu bar is configured as always shown

Categories

(Firefox :: Theme, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Firefox 67
Tracking Status
firefox-esr60 --- unaffected
firefox64 --- unaffected
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- fixed

People

(Reporter: yuki, Assigned: yuki)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

Attached image missing-window-controls.png (deleted) —

Steps to reproduce:

  1. Start Firefox on a Windows PC.
  2. Right-click on the toolbar and check "Menu Bar" to show it always.
  3. Hit Ctrl-Shift-K to open the Web Console.
  4. Input window.open('about:blank','_blank','toolbar') and hit Enter key.
  5. The popup is blocked by Firefox's popup blocker, thus click the "allow to open
    the requested window.

Actual result:

A browser window is opened without window controls.
(See the attached screenshot: missing-window-controls.png)

Expected result:

A browser window is opened with window controls.

Envrionment:

  • Confirmed versions of Firefox
    • Firefox 65.0b12 (build ID: 20190117232427)
    • Nightly 66.0a1 (build ID: 20190121175139)
  • Confirmed platform
    • Windows 7
    • Windows 10

Additional information:

  • If you uncheck the "Menu Bar" to show it on demand, the opened window has window controls. This problem appears only with always-shown menu bar.
  • On Firefox 64 or older versions, window controls become unclickable if you use the Classic theme of Windows 7, because the #tabbrowser-tab with z-index:2 [1] covers #titlebar-buttonbox with z-index:1 [2].

[1]https://dxr.mozilla.org/mozilla-esr60/source/browser/themes/windows/browser.css#206
[2]https://dxr.mozilla.org/mozilla-esr60/source/browser/themes/windows/browser.css#305

I've filed the bug 1521692 for a similar probelm on currently released Firefox.

Attached patch Patch (WIP) (obsolete) (deleted) — Splinter Review

Initial version patch, without automated test.

I have a question: is there the suitable location to place automated test? I've found possible related tests under:

Assignee: nobody → yuki

(In reply to YUKI "Piro" Hiroshi from comment #2)

Created attachment 9038164 [details] [diff] [review]
Patch (WIP)

Initial version patch, without automated test.

I have a question: is there the suitable location to place automated test?

https://searchfox.org/mozilla-central/source/browser/base/content/test/popups/browser_popupUI.js

Priority: -- → P2

(In reply to Dão Gottwald [::dao] from comment #3)

(In reply to YUKI "Piro" Hiroshi from comment #2)

I have a question: is there the suitable location to place automated test?

https://searchfox.org/mozilla-central/source/browser/base/content/test/popups/browser_popupUI.js

Thanks!

Now I'm trying to write tests. Here is a list of conditions thought as need to be tested:

  • browser.tabs.drawInTitlebar (on/off)
  • window.open() flags
    • (no feature)
    • toolbar
    • menubar
    • toolbar,menubar
  • View => Toolbars => Menu Bar (on/off)

I think https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/test/browser_new_content_window_chromeflags.js looks an example for testing with combinations of conditions.

Attachment #9038450 - Flags: review?(dao+bmo)
Attachment #9038450 - Flags: review?(dao+bmo)
Attachment #9038450 - Attachment description: Bug 1521688 - Show titlebar buttons when drawInTitlebar=true, window.open with features="toolbar", View => Toolbars => Menu Bar=checked → Bug 1521688 - Fix eslint failures
Attachment #9038450 - Attachment description: Bug 1521688 - Fix eslint failures → Bug 1521688 - Detect visibility of titlebar buttons based on their rendered width
Attachment #9038450 - Attachment description: Bug 1521688 - Detect visibility of titlebar buttons based on their rendered width → Bug 1521688 - Show titlebar buttons when drawInTitlebar=true, window.open with features="toolbar", View => Toolbars => Menu Bar=checked
Attachment #9038450 - Attachment description: Bug 1521688 - Show titlebar buttons when drawInTitlebar=true, window.open with features="toolbar", View => Toolbars => Menu Bar=checked → Bug 1521688 - Fix eslint failures
Attachment #9038450 - Attachment description: Bug 1521688 - Fix eslint failures → Bug 1521688 - Detect visibility of titlebar buttons based on their rendered width
Attachment #9038450 - Attachment description: Bug 1521688 - Detect visibility of titlebar buttons based on their rendered width → Bug 1521688 - Detect visibility of titlebar buttons based on both rendered size and visibility of ancestor element
Attachment #9038450 - Attachment description: Bug 1521688 - Detect visibility of titlebar buttons based on both rendered size and visibility of ancestor element → Bug 1521688 - Show titlebar buttons when drawInTitlebar=true, window.open with features="toolbar", View => Toolbars => Menu Bar=checked
Blocks: 1356920
Keywords: regression
Attachment #9038164 - Attachment is obsolete: true
Whiteboard: checkin-needed
Pushed by ccoroiu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7d8248d94084 Show titlebar buttons when drawInTitlebar=true, window.open with features="toolbar", View => Toolbars => Menu Bar=checked r=dao
Whiteboard: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: