Closed Bug 739575 Opened 13 years ago Closed 13 years ago

Alternate content is shown for Flash objects when "Tap to Play" is enabled for plugins

Categories

(Core Graveyard :: Plug-ins, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla15

People

(Reporter: martijn.martijn, Assigned: keeler)

References

()

Details

(Keywords: mobile, testcase)

Attachments

(2 files, 2 obsolete files)

Attached file testcase
I guess this is also a Core->Plugins issue (like bug 739048), rather than Fennec issue, so filing it there. See testcase, make sure you have "Tap to Play" for plugins enabled in your settings in Fennec to reproduce it. Expected result: - A "Tap here to activate plugin" placeholder is shown Actual result: - A link is shown which comes from the alternate content inside the <object> tag. Tested on the Samsung Galaxy Nexus, Android 4.0.2.
Blocks: 744060
Attached patch proposed fix (obsolete) — Splinter Review
In nsObjectLoadingContent::GetPluginSupportState, if aContent is determined to have alternate content, ePluginOtherState is returned. This prevents ePluginClickToPlay from being returned (which results in the "click/tap to play" box not being shown). This patch returns ePluginClickToPlay if that's what the actual plugin support state is, and follows the old behavior otherwise.
Attachment #614629 - Flags: review?(joshmoz)
Assignee: nobody → dkeeler
Comment on attachment 614629 [details] [diff] [review] proposed fix Review of attachment 614629 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/base/src/nsObjectLoadingContent.cpp @@ +1991,5 @@ > } > > + PluginSupportState pluginDisabledState = GetPluginDisabledState(aContentType); > + if (pluginDisabledState == ePluginClickToPlay) return pluginDisabledState; > + else return (hasAlternateContent ? ePluginOtherState : pluginDisabledState); Please use the if/else structure used elsewhere in this code, and always with scope braces. if () { ... } else { ... }
Attachment #614629 - Flags: review?(joshmoz) → review+
Attached patch fix v2 + test case (obsolete) — Splinter Review
Asking for review again to make sure I interpreted your feedback correctly. Also, I included a mochi test case.
Attachment #614629 - Attachment is obsolete: true
Attachment #617999 - Flags: review?(joshmoz)
Attachment #617999 - Flags: review?(joshmoz) → review+
Attached patch fix + testSplinter Review
Re-uploading patch to properly set title (to prepare for checkin-needed). Carrying over r+ from joshmoz.
Attachment #617999 - Attachment is obsolete: true
Attachment #618844 - Flags: review+
Keywords: checkin-needed
Flags: in-testsuite+
Keywords: checkin-needed
Target Milestone: --- → mozilla15
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Works now on Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20120429 Firefox/15.0a1 ID:20120429040300
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: