Closed Bug 120875 Opened 24 years ago Closed 23 years ago

Flash contents responds to mouse even if another tab opens

Categories

(Core Graveyard :: Plug-ins, defect, P1)

PowerPC
All

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0.1

People

(Reporter: kazhik, Assigned: peterl-bugs)

References

()

Details

(Whiteboard: [adt2 RTM][PL RTM])

Attachments

(2 files, 4 obsolete files)

Flash contents responds to mouse even if another tab opens. (1) Load <http://www.lordoftherings.net/> in a tab. (2) Switch to another tab and move mouse Actual result: Flash contents in <http://www.lordoftherings.net/> responds to mouse and plays the sound. Expected result: Flash contents 'sleeps' if the tab is hidden. This bug is reproduced with Mac builds only.
nsbeta1, -> 1.0
Keywords: nsbeta1
Target Milestone: --- → mozilla1.0
nsbeta1+ per Nav triage team, Nav3, ->1.0
Keywords: nsbeta1nsbeta1+
Whiteboard: [nav3]
Please update this bug with an [adt1] - [adt3] impact rating (or take it off the list if it doesn't even rate adt3.) Thanks!
converting nav3->adt3
Whiteboard: [nav3] → [adt3]
->plugins, plugins should be turned off when the content document is hidden.
Assignee: jaggernaut → beppe
Component: Tabbed Browser → Plug-ins
QA Contact: sairuh → shrir
reassigning to peterl
Assignee: beppe → peterl
Changing nsbeta1+ [adt3] bugs to nsbeta1- on behalf of the adt. If you have any questions about this, please email adt@netscape.com. You can search for "changing adt3 bugs" to quickly find and delete these bug mails.
Keywords: nsbeta1-
Changing nsbeta1+ [adt3] bugs to nsbeta1- on behalf of the adt. If you have any questions about this, please email adt@netscape.com. You can search for "changing adt3 bugs" to quickly find and delete these bug mails.
Keywords: nsbeta1+
adt2, I have a fix for this in my trunk and this fixes another bug with print preview. Bumping up per meeting.
Keywords: nsbeta1-nsbeta1+
Whiteboard: [adt3] → [adt2][fix in hand]
Status: NEW → ASSIGNED
Keywords: patch, review
Attached patch patch v.1 (obsolete) — Splinter Review
Here's a patch that fixes the tabbing problems with plugins (this bug), plugins showing in print preview (bug 133992), and problems with CSS visibility property on Mac (bug 137231). Patch Mac features: * Call |FixUpPluginWindow| in |DidReflow| * Cleaned up |DidReflow| * |FixUpPluginWindow| will now walk up the widgets looking for a hidden one * |SetWindow| will be called with a NULL or current port if visibility changes Please review.
Comment on attachment 81648 [details] [diff] [review] patch v.1 This is cool patch, Peter. Although I cannot test it I think it is looking good codewise. The only comment is: should not we check |window| for null here before dereferencing it: + if (isVisible != mWidgetVisible) { + mWidgetVisible = isVisible; + nsPluginWindow *window; + GetWindow(window); + window->window = mWidgetVisible ? GetPluginPort() : nsnull; + mInstance->SetWindow(window); Other than that -- r=av
Attachment #81648 - Flags: review+
Attached patch patch v.2 (obsolete) — Splinter Review
Updated patch: * Addressed Andrei's comment on checking 'window' * Now I check the view's visiblity instead of calling |IsHidden| because it is more accurate
Attachment #81648 - Attachment is obsolete: true
Comment on attachment 81739 [details] [diff] [review] patch v.2 r=av
Attachment #81739 - Flags: review+
Comment on attachment 81739 [details] [diff] [review] patch v.2 + nsCOMPtr<nsIPluginInstance> pi; + if (!mInstanceOwner || + NS_FAILED(mInstanceOwner->GetWindow(window)) || + NS_FAILED(mInstanceOwner->GetInstance(*getter_AddRefs(pi))) || + !pi) return rv; What's the value of rv in this case? You didn't capture any of the return values of the calls. In fact, all over the method |nsObjectFrame::DidReflow| we are returning an rv that is likely to be NS_OK. + PRBool isVisible = nsViewVisibility_kShow ? PR_TRUE : PR_FALSE; Guessing you meant to write: + PRBool isVisible = (vis == nsViewVisibility_kShow) ? PR_TRUE : PR_FALSE; Also, walking our our widget hierarchy each and every time we get redrawn seems expensive. Isn't there a way we could HEAR about getting hidden, perhaps through some kind of listener interface, or an event?
Attachment #81739 - Flags: needs-work+
Attached patch patch v.3 (obsolete) — Splinter Review
New patch, made some changes: * "rv" is set by the container frame's DidReflow, but I propigate the other return codes now as well. * There is no notification sent when a widget is hidden or shown, so walking up is probably better than the widget notifying all its children. I made use of the existing walk up the parent widgets to also capture visiblity state so we gather up all the info in just one walk. Patrick, what do you think?
Attachment #81739 - Attachment is obsolete: true
This fix will probably also stop the "bleed-through" problem I've heard about in Chimera tabs although I don't have a build to verify.
Severity: normal → major
OS: Mac System 9.x → All
Priority: -- → P1
Whiteboard: [adt2][fix in hand] → [adt2][seeking reviews]
Attached patch patch v.4 (obsolete) — Splinter Review
New patch applies the same fix to full-page plugins.
Attachment #81967 - Attachment is obsolete: true
Comment on attachment 81991 [details] [diff] [review] patch v.4 sr=beard
Attachment #81991 - Flags: superreview+
Keywords: review
Whiteboard: [adt2][seeking reviews] → [adt2]
Attachment #81991 - Flags: review+
Patch in trunk, marking FIXED and nominating adt1.0.0.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Keywords: adt1.0.0
Resolution: --- → FIXED
*** Bug 133992 has been marked as a duplicate of this bug. ***
*** Bug 137230 has been marked as a duplicate of this bug. ***
Let's get this one in for RTM. adt1.0.0- [adt2 RTM]
Keywords: adt1.0.0adt1.0.0-
Whiteboard: [adt2] → [adt2 RTM]
Blocks: 143047
Adding adt1.0.0+ for 1.0 branch checkin approval. Please get drivers approval before checking in.
Keywords: adt1.0.0-adt1.0.0+
Depends on: 129306
This is fixed on Mac OS 9 trunk build 2002051408
This isn't quite ready for the branch yet. Some plugins don't like the SetWindow(NULL) call. See bug 142582 for the fix. Removing graffiti until this can be sorted out.
Keywords: adt1.0.0+, patch
Whiteboard: [adt2 RTM] → [adt2 RTM][needs fix from bug 120875]
I do NOT see the described behavior in any of these: 1.0 RC1 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417 1.0 RC2 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc2) Gecko/20020510 1.0 RC2 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc2) Gecko/20020513 Debian/1.0rc2-1 Mozilla 1.0.0+ Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0+) Gecko/20020511 Debian
Whiteboard: [adt2 RTM][needs fix from bug 120875] → [adt2 RTM][needs fix from bug 120875][PL RTM]
Could someone attach a patch specific for mozilla 1.0.0 branch? This patch did not apply easily there.
Whiteboard: [adt2 RTM][needs fix from bug 120875][PL RTM] → [adt2 RTM][needs fix from bug 142582][PL RTM]
Sounds like this depends on bug 142582, and merging the patch may be tricky.
Depends on: 142582
yes, we need to do the merge first, so ignore this one for the branch at the moment
...working on a better fix now, this may have to be backed out though.
reopening
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
*** Bug 142582 has been marked as a duplicate of this bug. ***
*** Bug 141416 has been marked as a duplicate of this bug. ***
This patch fixes the regression in bug 142582 on the trunk: This is a much safer way of fixing the problem: 1. When we are "hidden", simply clear our clip 2. Send bogus 20000,20000 location for mouse in null events when "hidden" 3. No more risky extra SetWindow calls. They were not needed to begin with.
Attachment #81991 - Attachment is obsolete: true
*** Bug 144926 has been marked as a duplicate of this bug. ***
Comment on attachment 83898 [details] [diff] [review] patch v.5 (for trunk) Patch looks solid and appears to do the right thing. r=bnesse.
Attachment #83898 - Flags: review+
Comment on attachment 83898 [details] [diff] [review] patch v.5 (for trunk) Hmmm, I guess if the plugin doesn't call GetMouse() itself this will work, but this seems like a strange way to implement this. sr=beard
Attachment #83898 - Flags: superreview+
back to FIXED status, patch in trunk
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
removed reference in whiteboard about [needs fix from bug 142582], that has already been added to the patch Peter has for this bug
Whiteboard: [adt2 RTM][needs fix from bug 142582][PL RTM] → [adt2 RTM][PL RTM]
Same patch as before, just merged to the branch.
Comment on attachment 85457 [details] [diff] [review] patch v.6 (for branch) + if (!mInstanceOwner || + NS_FAILED(rv = mInstanceOwner->GetWindow(window)) || + NS_FAILED(rv = mInstanceOwner->GetInstance(*getter_AddRefs(pi))) || + !pi || + !window) This seems like a bit of overkill. I'd probably just insure that pi & window aren't null and skip the NS_FAILED). Either way, r=bnesse.
Attachment #85457 - Flags: review+
Comment on attachment 85457 [details] [diff] [review] patch v.6 (for branch) sr=beard
Attachment #85457 - Flags: superreview+
Keywords: adt1.0.1
Attachment #85457 - Flags: approval+
"please land this on the 1.0.1 branch. once there remove the "mozilla1.0.1+" keyword, and add the "fixed1.0.1"
Keywords: mozilla1.0.1+
Keywords: adt1.0.1adt1.0.1+
adt1.0.1+ (on ADT's behalf) approval for checkin to the 1.0.1. pls land this on the 1.0 branch, then add the keywrod "fixed1.0.1".
fixed1.0.1
Target Milestone: mozilla1.0 → mozilla1.0.1
verified 1.0.1 on os x and os 9.2.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: