Closed Bug 222488 Opened 21 years ago Closed 19 years ago

dialogs with default style flag do not have a title bar and are positioned oddly

Categories

(Core Graveyard :: Widget: Mac, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8.1beta2

People

(Reporter: mozilla, Assigned: jaas)

Details

(Keywords: fixed1.8.1)

Attachments

(3 files)

When "Find nodes" is selected in DOM inspector it should open as a Mac OS X sheet (if its supposed to be modal) underneath the DOM inspector window's title bar. Alternatively it should open as a non-modal dialogue box with its own title bar. Currently it opens as a sheet but at the top left of the DOM inspector window, on top of the DOM inspector's title bar. Sheets should be centered relative to their parent window and drop down from under the title bar.
Attached image Screenshot
Screenshot of "find nodes" being neither sheet nor dialogue.
reporter: the find dialog, like most find dialogs is not supposed to be modal. it's opened this is inspector: var win = openDialog("chrome://inspector/content/viewers/dom/findDialog.xul", "_blank", "chrome,dependent", this.mFindType, this.mFindDir, this.mFindParams); this is navigator: window.findDialog = window.openDialog("chrome://global/content/finddialog.xul", "_blank", "chrome, resizable=no,dependent=yes", findInstData); this is navigator (c++): rv = OpenDialog(NS_LITERAL_STRING("chrome://global/content/finddialog.xul"), NS_LITERAL_STRING("_blank"), NS_LITERAL_STRING("chrome, resizable=no, dependent=yes"), They all set chrome and dependent, none of them set modal.
Assignee: dom-inspector → sfraser
Component: DOM Inspector → GFX: Mac
Summary: "Find nodes" sheet incorrectly positioned relative to DOM inspector window → why is chrome,dependent opened as a sheet instead of a dialog?
Since I don't know anything about sheets, are they movable? Both Navigator and DOM Inspector find dialogs expect to be movable and remember their position.
The sheet implementation in Mozilla is an abhorrence, and should be turned off.
it needs tweaking, but isn't an abhorrance. i much prefer its behavior than popping up dialogs on the wrong monitor (which is what would happen if we turned it off).
Assignee: sfraser_bugs → joshmoz
Component: GFX: Mac → Widget: Mac
QA Contact: timeless → mac
Attached patch fix v1.0Splinter Review
This has nothing to do with sheets. What you're seeing is just a window without a titlebar, and that alone does not a sheet make. We're not requesting that the dialog be modal, and in widget code we're getting a request for a window type of eWindowType_dialog when creating the DOM Inspector find window. The problem here is that the style flags on the dialog request are "default", and at one point somebody decided that "default" is the same as "none", which is pretty bogus. The reason we don't have this problem if you specify resizable=no is that in that case instead of only having the style mask bit for default set, we get the default bit plus some other bits like title and close flags. That causes the switch case for (borderstyle == default) to fail and we go into the default processing which throws a title bar on the window. The fix here is to give the window a reasonable window class when the default flag is the only flag set.
Attachment #228731 - Flags: review?(mark)
Comment on attachment 228731 [details] [diff] [review] fix v1.0 > break; >+ >+ case eBorderStyle_default: There's a space on that blank line, get rid of it.
Attachment #228731 - Flags: review?(mark) → review+
Summary: why is chrome,dependent opened as a sheet instead of a dialog? → why do dialogs with the default style flag not have a title bar and why are they positioned oddly
This is a pretty bad bug with a pretty safe fix.
Flags: blocking1.8.1?
Attachment #228731 - Flags: approval1.8.1?
Summary: why do dialogs with the default style flag not have a title bar and why are they positioned oddly → dialogs with default style flag do not have a title bar and are positioned oddly
landed on trunk
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
I checked in a followup to this changing: - windowClass = kMovableModalWindowClass; + windowClass = kDocumentWindowClass; We don't want to force modality on the dialog.
fix for the 1.8 branch plus a comment change
Attachment #228814 - Flags: review?(mark)
Comment on attachment 228814 [details] [diff] [review] 1.8.1 branch fix v1.0 That's better.
Attachment #228814 - Flags: review?(mark) → review+
Attachment #228731 - Flags: approval1.8.1?
Attachment #228814 - Flags: approval1.8.1?
Flags: blocking1.8.1? → blocking1.8.1+
Target Milestone: --- → mozilla1.8.1beta2
Attachment #228814 - Flags: approval1.8.1? → approval1.8.1+
landed on 1.8.1 branch
Keywords: fixed1.8.1
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: