Closed
Bug 317486
Opened 19 years ago
Closed 19 years ago
Some plug-ins may eat WM_SETFOCUS / WM_KILLFOCUS
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: emk, Assigned: emk)
References
Details
Attachments
(2 files, 3 obsolete files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
emk
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
Steps to reproduce:
1. Load the testcase.
2. Click on the Flash textbox.
3. Alt+Tab to switch other application.
4. Alt+tab again to return Mozilla.
Actual result:
Blur event won't be fired after step 3.
You can't type text after step 4.
Expected result:
Blur event should be fired.
You will have to press tab to type in textbox, but it's out of scope for this bug.
Assignee | ||
Comment 1•19 years ago
|
||
Assignee | ||
Comment 2•19 years ago
|
||
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Attachment #203996 -
Flags: superreview?(roc)
Attachment #203996 -
Flags: review?(roc)
Comment on attachment 203996 [details] [diff] [review]
Patch rv1.0
Let's check what Ere has to say about this...
Attachment #203996 -
Flags: superreview?(roc)
Attachment #203996 -
Flags: superreview+
Attachment #203996 -
Flags: review?(roc)
Attachment #203996 -
Flags: review?(emaijala)
Comment 4•19 years ago
|
||
Comment on attachment 203996 [details] [diff] [review]
Patch rv1.0
I think this is worth a shot, but I believe getting mPrevWinProc is in wrong place. You should move it to SubclassAndAssociateWindow. There you can do it unconditionally before the call to SubclassWindow and it'd be a simple assignment of currentWndProc.
Attachment #203996 -
Flags: review?(emaijala) → review-
Assignee | ||
Comment 5•19 years ago
|
||
> I think this is worth a shot, but I believe getting mPrevWinProc is in wrong
> place. You should move it to SubclassAndAssociateWindow. There you can do it
> unconditionally before the call to SubclassWindow and it'd be a simple
> assignment of currentWndProc.
No, it's too late to get mPrevWinProc in SubclassAndAssociateWindow.
Some plug-ins may already subclass our window in NPP_SetWindow which is called from CallSetWindow (And actually Flash Player did).
Thus we are required to get mPrevWinProc BEFORE CallSetWindow.
Assignee | ||
Comment 6•19 years ago
|
||
Attachment #203996 -
Attachment is obsolete: true
Attachment #204918 -
Flags: review?(emaijala)
Comment 7•19 years ago
|
||
Comment on attachment 204918 [details] [diff] [review]
Adding comment to clarify:-)
Ok, but there's still one problem. You're assigning mPrevWinProc regardless of aPluginInstance (!= NULL) and only once. This will break at least if the first call is CallSetWindow(NULL), and it will cause a possibility for deadlock when unsubclassing (mPrevWinProc will point to the current WinProc). So what I think you should do is null it out whe unsubclassing. Then call it conditionally when the window messages are received. Ok?
Then you should get rid of the assertion. Just get the current WndProc, compare to PluginWndProc and assign to mPrevWndProc if different. This would make the code more bulletproof.
Attachment #204918 -
Flags: review?(emaijala) → review-
Assignee | ||
Comment 8•19 years ago
|
||
Resolving review comment.
Attachment #204918 -
Attachment is obsolete: true
Attachment #204938 -
Flags: review?(emaijala)
Comment 9•19 years ago
|
||
Comment on attachment 204938 [details] [diff] [review]
Patch rv 1.2
+ // Make sure activate/deactivate
+ // even if focus messages are eaten by plug-in
Make it something like this:
// Make sure setfocus and killfocus get through
// even if they are eaten by the plugin
+ WNDPROC prevWndProc = (WNDPROC)win->GetPrevWindowProc();
No need for the cast (WNDPROC) here, right?
r=emaijala with these fixed.
Attachment #204938 -
Flags: review?(emaijala) → review+
Assignee | ||
Comment 10•19 years ago
|
||
Also limited prevWndProc scope.
Attachment #204938 -
Attachment is obsolete: true
Attachment #204978 -
Flags: superreview?(roc)
Attachment #204978 -
Flags: review+
Attachment #204978 -
Flags: superreview?(roc) → superreview+
Comment 11•19 years ago
|
||
checked-in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Target Milestone: --- → mozilla1.9alpha
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•