Closed Bug 396345 Opened 17 years ago Closed 17 years ago

Unable to maximize window

Categories

(Core :: Widget: Cocoa, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mossop, Assigned: jaas)

References

Details

(Keywords: regression)

Attachments

(1 file, 3 obsolete files)

If I maximize the firefox window it ends up a bit short, about a status-bar height shorter than it should be. Additionally trying to resize is weird. Resizing from the resizer it appears that the bottom of the window follows the pointer just about a status-bar height above the pointer.

Also as I resize quickly the pill and title bar text doesn't redraw properly.

This is a regression since the build from the 15th.

Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a8pre) Gecko/2007091604 Minefield/3.0a8pre ID:2007091604
Flags: blocking-firefox3?
Yeah, I bet my patch did cause this. However, I don't think my patch is wrong. I think there is other stuff depending on the bad behavior that was there before my patch. Looking into it.
Attached patch fix v1.0 (obsolete) — Splinter Review
As for the visual corruption, our efforts at not doing nested resizes were failing because we were calling Gecko's ::Resize during a native Cocoa resize. We only need to report the native resize, not do another one at the same time (especially not when we muck with the coordinates).
Assignee: nobody → joshmoz
Status: NEW → ASSIGNED
Attachment #281096 - Flags: review?(cbarrett)
Blocks: 218214
Component: General → Widget: Cocoa
Flags: blocking-firefox3?
Product: Firefox → Core
QA Contact: general → cocoa
Flags: blocking1.9?
Flags: blocking1.9? → blocking1.9+
Attached patch fix v1.1 (obsolete) — Splinter Review
read the wrong type for mGeckoWindow, no need to cast and we should null check
Attachment #281096 - Attachment is obsolete: true
Attachment #281097 - Flags: review?(cbarrett)
Attachment #281096 - Flags: review?(cbarrett)
Comment on attachment 281097 [details] [diff] [review]
fix v1.1

> nsCocoaWindow::ReportSizeEvent()
> {
>+  NSRect windowFrame = [mWindow contentRectForFrameRect:[mWindow frame]];
>+  mBounds.width  = (nscoord)windowFrame.size.width;
>+  mBounds.height = (nscoord)windowFrame.size.height;

Nit: you have some trailing whitespace after height. Also I'd prefer you keep the static_cast that previously existed over the c-style cast, but that's just me.
Attachment #281097 - Flags: review?(cbarrett) → review+
Attached patch fix v1.2Splinter Review
address ben's comments
Attachment #281097 - Attachment is obsolete: true
Attachment #281101 - Flags: superreview?(roc)
Attached patch fix v1.3 (obsolete) — Splinter Review
misinterpreted one of ben's comments
Attachment #281101 - Attachment is obsolete: true
Attachment #281102 - Flags: superreview?(roc)
Attachment #281101 - Flags: superreview?(roc)
Attachment #281102 - Attachment is obsolete: true
Attachment #281102 - Flags: superreview?(roc)
Comment on attachment 281101 [details] [diff] [review]
fix v1.2

I guess Ben did mean to cast to nscoord...
Attachment #281101 - Attachment is obsolete: false
Attachment #281101 - Flags: superreview?(roc)
Comment on attachment 281101 [details] [diff] [review]
fix v1.2

+  mBounds.width  = static_cast<nscoord>(windowFrame.size.width);
+  mBounds.height = static_cast<nscoord>(windowFrame.size.height);

Actually constructor casts are best here: nscoord(...)
Attachment #281101 - Flags: superreview?(roc)
Attachment #281101 - Flags: superreview+
Attachment #281101 - Flags: approval1.9+
landed on trunk
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: