Closed
Bug 417124
Opened 17 years ago
Closed 17 years ago
[10.4] Aqua focus ring is cut off after form autocomplete goes away
Categories
(Core :: Widget: Cocoa, defect, P2)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: jaas)
References
()
Details
(Keywords: regression, top100)
Attachments
(2 files, 3 obsolete files)
6.37 KB,
image/png
|
Details | |
11.63 KB,
patch
|
Details | Diff | Splinter Review |
Steps to reproduce:
1. Load http://www.google.com/
2. Type "fooooooo" (one letter at a time)
(When you type 'f', a form autocomplete menu should appear. Once you type enough 'o's for there to be no more matches, it should disappear.)
Result: When it disappears, some of the aqua focus ring (the part that was below the autocomplete menu?) is missing. Seems like a painting invalidation bug.
Nominating because this bug is pretty visible, and wasn't a problem before bug 415466 was fixed a few days ago.
Flags: blocking1.9?
See also bug 416929, which also seems to be about poor painting invalidation/repainting with a text widget.
I cannot reproduce this. The focus ring remains intact when the autocomplete dialog disappears on account of no more matches.
Jesse - is this always reproducible for you?
Reporter | ||
Comment 3•17 years ago
|
||
Almost always. I noticed that it doesn't happen if the autocomplete menu goes away due to pressing Esc, fwiw.
Comment 5•17 years ago
|
||
I am not able to reproduce this using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b4pre) Gecko/2008021404 Minefield/3.0b4pre.
Comment 7•17 years ago
|
||
I can reproduce it on 10.4, at least 95% of the time.
Reporter | ||
Comment 8•17 years ago
|
||
I'm on 10.4.
That seems to be the key - adding [10.4] to the summary.
Flags: blocking1.9? → blocking1.9+
Summary: Aqua focus ring is cut off after form autocomplete goes away → [10.4] Aqua focus ring is cut off after form autocomplete goes away
Assignee | ||
Comment 10•17 years ago
|
||
Not awesome, but looks like that is what we're up against here. See comment in the patch.
Attachment #303389 -
Flags: review?(smichaud)
Comment 11•17 years ago
|
||
Comment on attachment 303389 [details] [diff] [review]
fix v1.0
This is overkill (possibly causing two windows to be completely
repainted). But I doubt very much that it will ever cause any
noticeable delay (popup windows don't get repeatedly and quickly shown
and hidden). And it certainly has the virtue of simplicity.
I haven't tested this ... but that didn't seem necessary.
Attachment #303389 -
Flags: review?(smichaud) → review+
Comment 12•17 years ago
|
||
(By the way, I also see this problem on Tiger but not on Leopard.)
Attachment #303389 -
Flags: superreview?(roc)
Attachment #303389 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 13•17 years ago
|
||
landed on trunk
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 14•17 years ago
|
||
Ack, cure vastly worse than the disease.
I don't know to what extent dialup (or the equivalent, download a couple of ISOs while letting a Bittorrent app saturate your connection) is required, but for me, loading a bug page with this patch in flashes the entire window between five and ten times - as a first guess, a <select> would be one of the things that hides a popup.
Comment 15•17 years ago
|
||
So... several issues here. The code structure is:
517 if (bState && !mBounds.IsEmpty()) {
...
606 else {
// roll up stuff
711 }
Obvious issues:
* Treating bState && mBounds.IsEmpty() as equivalent to !bState is weird. Shouldn't we just bail out early if bState && mBounds.IsEmpty() instead?
* If bState matches out current state, this method should be a no-op. It most certainly is not. This might be the case we're hitting here, but I doubt it.
* If !bState and mBounds.IsEmpty(), it doesn't make any sense to force the repaint. I bet that's the case we're hitting here.
We have various places that assume that Show() with the existing boolean is a reasonably fast operation, and that hiding something we never really showed is pretty fast. This code is violating both assumptions.
Reporter | ||
Comment 16•17 years ago
|
||
The entire browser chrome now flashes the first time I use awesomecomplete in a window.
Josh, you'd better back this out.
Assignee | ||
Comment 18•17 years ago
|
||
Strange that I never saw that in my testing, backed out. I'll probably have a new patch soon.
Comment 19•17 years ago
|
||
Boris comment 15 reminded me of bug 392813 which is trivial to fix, and this might be the right time to do it, see below.
The method is |nsCocoaWindow::Show(PRBool aShow)| which is called on us to show/hide a window.
Now, this method is often (always, I think) called multiple times in sequence with aShow set to the same value. This, one could argue, is a bug...
Anyway, the problem with our code is that all the initialization code is re-executed every time, even though we're already showing the window or it is already hidden!
This is potentially harmful as it is likely to get us (or Cocoa) into an inconsistent state, and may have been what was causing Phil Ringnalda's window to flash multiple times in comment 14? Just a hunch.
Assignee | ||
Comment 20•17 years ago
|
||
This basically includes hwaara's fix for bug 392813. Works fine for me, I tested with some complex sheet test cases among other things. I was able to reproduce the page flashing reported in the bug and this gets rid of it for me.
Attachment #303389 -
Attachment is obsolete: true
Attachment #303928 -
Flags: review?(hwaara)
Comment 21•17 years ago
|
||
Comment on attachment 303928 [details] [diff] [review]
fix v2.0
Wanna remove mWindow as well while you're at it? (Suggestion from the same bug and smichaud seemed to agree.) Basically we can use [mWindow isVisible] instead of this cached value in all places. It's just a possible source for error.
I think bState is a stupid non-descriptive argument name, wanna rename it to aShow or so?
Attachment #303928 -
Flags: review?(hwaara) → review+
Comment 22•17 years ago
|
||
Sorry, of course I meant "Wanna remove mVisible", and not mWindow :-)
Assignee | ||
Comment 23•17 years ago
|
||
Comment on attachment 303928 [details] [diff] [review]
fix v2.0
Right now I want to be as conservative as possible, so I don't want to make any more changes than are already in this patch.
Attachment #303928 -
Flags: superreview?(roc)
Attachment #303928 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 24•17 years ago
|
||
landed on trunk
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 25•17 years ago
|
||
backed out
chrome://mochikit/content/browser/toolkit/components/places/tests/browser/browser_bug413985-httprefresh.js
FAIL - Visit count is what we expect - Got 2, expected 1 - chrome://mochikit/content/browser/toolkit/components/places/tests/browser/browser_bug413985-httprefresh.js
Bah, that is the test that started failing for me when I checked in the patch for bug 392322... Think it's a fragile test.
Assignee | ||
Comment 27•17 years ago
|
||
Håkan - iirc, one reason we can't get rid of mVisible is that sibling sheets that are hidden because only one can show at a time should be considered visible. The OS call would say that they are not visible. I do agree we could simplify that logic some time though.
Comment 28•17 years ago
|
||
(In reply to comment #27)
> Håkan - iirc, one reason we can't get rid of mVisible is that sibling sheets
> that are hidden because only one can show at a time should be considered
> visible. The OS call would say that they are not visible. I do agree we could
> simplify that logic some time though.
Then we could use it in only that place for sheets (and use [mWindow isVisible] in all other places), and rename it to mIsSheetVisible to make the usage more explicit?
Assignee | ||
Comment 29•17 years ago
|
||
That is basically what I meant by simplify the logic sometime.
Comment 30•17 years ago
|
||
Sounds good to me. Let me know if you need a quick r+ for such changes.
Assignee | ||
Comment 31•17 years ago
|
||
This includes logic cleanup, things should be much more clear now. The mochitest still fails, I can repro locally, working on that now.
Attachment #303928 -
Attachment is obsolete: true
Attachment #304236 -
Flags: review?(hwaara)
Assignee | ||
Comment 32•17 years ago
|
||
Word on the street is that the failing test has nasty timing issues and it will be disabled today.
Comment 33•17 years ago
|
||
Comment on attachment 304236 [details] [diff] [review]
fix v3.0
Wanna change bState to aShow while you're at it?
Attachment #304236 -
Flags: review?(hwaara) → review+
Attachment #304236 -
Flags: superreview?(roc)
Comment on attachment 304236 [details] [diff] [review]
fix v3.0
[mWindow setAcceptsMouseMovedEvents:NO];
-
+
Don't add trailing whitespace (happens twice)
Attachment #304236 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 35•17 years ago
|
||
This is what I checked in. Just whitespace changes.
Attachment #304236 -
Attachment is obsolete: true
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
I think this caused bug 503391.
Depends on: 503391
No longer depends on: 503391
Depends on: 503391
You need to log in
before you can comment on or make changes to this bug.
Description
•