Closed
Bug 507947
Opened 15 years ago
Closed 15 years ago
NSRectFill fails when drawRect isn't on the stack
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.9.2a1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
status1.9.1 | --- | .4-fixed |
People
(Reporter: mstange, Assigned: mstange)
References
Details
(Keywords: verified1.9.1, verified1.9.2)
Attachments
(2 files)
7.48 KB,
patch
|
jaas
:
review+
dveditz
:
approval1.9.1.4+
|
Details | Diff | Splinter Review |
1.08 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
We use NSRectFill in several places in native theme rendering, for example when drawing toolbars. However, I noticed that this doesn't work when drawing with Canvas.drawWindow: Toolbars never seem to make it into the Ctrl+Tab previews, for example. Instead, sometimes I've noticed grey lines or boxes at the bottom of the window, which has also been reported here: https://www.mozdev.org/bugs/show_bug.cgi?id=21200 So what seems to happen is that when we're not drawing inside drawRect, i.e. when [NSView focusView] is nil, NSRectFill instead draws into the next best window, preferable in a flipped way (on the bottom instead of at the top of the window, for example). I don't know why this happens, but I found out that CGFillRect does not do these things. So I'm replacing all calls to NSRectFill with CGFillRect, factored out into a DrawNativeGreyColorInRect in nsNativeThemeColors.h. The other change I'm making is to treat the window always as active when there's no focusView because I think it makes more sense for tab previews.
Attachment #392191 -
Flags: review?(joshmoz)
Attachment #392191 -
Flags: review?(joshmoz) → review+
Assignee | ||
Comment 2•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/9d37b381e2ae
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Assignee | ||
Comment 3•15 years ago
|
||
Before this patch, -moz-appearance: toolbar didn't draw anything when used inside canvas.drawWindow, so this should be enough.
Attachment #392432 -
Flags: review?(roc)
Attachment #392432 -
Flags: review?(roc) → review+
Assignee | ||
Comment 4•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/be99b00e43f6
Flags: in-testsuite+
Assignee | ||
Comment 5•15 years ago
|
||
Comment on attachment 392191 [details] [diff] [review] v1: replace NSRectFill with CGContextFillRect fixes the spurious appearance of grey boxes on a page with certain combinations of extensions (e.g. FireFTP + Ctrl-Tab), very low risk, has test
Attachment #392191 -
Flags: approval1.9.1.3?
Assignee | ||
Updated•15 years ago
|
Attachment #392191 -
Flags: approval1.9.1.3? → approval1.9.1.4?
Comment 6•15 years ago
|
||
Comment on attachment 392191 [details] [diff] [review] v1: replace NSRectFill with CGContextFillRect Approved for 1.9.1.4, a=dveditz for release-drivers
Attachment #392191 -
Flags: approval1.9.1.4? → approval1.9.1.4+
Assignee | ||
Comment 7•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/97a8e3170b87
status1.9.1:
--- → .4-fixed
status1.9.2:
--- → beta1-fixed
Comment 8•15 years ago
|
||
Verified fixed on 1.9.2 and 1.9.1 based on check-ins and passing reftests.
Status: RESOLVED → VERIFIED
Keywords: verified1.9.1,
verified1.9.2
You need to log in
before you can comment on or make changes to this bug.
Description
•