Closed Bug 347639 Opened 18 years ago Closed 17 years ago

Dynamically created flash with application/octet-stream show up as plugin placeholder

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: martijn.martijn, Assigned: Biesinger)

References

()

Details

(Keywords: regression, testcase)

Attachments

(3 files, 1 obsolete file)

See url, you see plugin placeholders where you should see some flash text. I'll attach a testcase to this bug that shows the bug.
Attached file testcase (deleted) —
Two embeds in the testcase, one directly in the page, one dynamically created. The dynamically created one gives the plugin placeholder, that should not happen. This works fine on current branch builds.
Flags: blocking1.9?
Biesi: This sounds likely related to your rewrite.
Assignee: nobody → cbiesinger
Flags: blocking1.9? → blocking1.9+
hmm. this is an interesting one. We start loading the object when you the src attribute is set, and find out that we can't handle application/octet-stream. We ignore changes to the type attribute after we started loading the object. Unfortunately I can't reproduce this on the original site, but bug 347736's patch may significantly reduce the impact of this.
Is there any point in starting the load before we're in the document? I know we do for images, but that is partially web-compat to allow pages to preload images.
why wait until we're inserted into the doc?
Can we deal with all types of chages, such as to the type attribute, if we've already started loading? There's also the issue that we could get a different baseURI when inserted into a parent.
we handle the base URI change correctly, we do check for a changed URI when the plugin is inserted into the doc. we could extend that to types I suppose...
Attached patch patch (obsolete) (deleted) — Splinter Review
jonas convinced me to only start loads once we get inserted into a document. note that if we start the load before that, and it is a plugin, then we will not really be able to use that data because we don't have a frame yet, so we'd have to start the load again. waiting until we get inserted avoids that problem.
Attachment #272908 - Flags: superreview?(bzbarsky)
Attachment #272908 - Flags: review?(bzbarsky)
OS: Windows XP → All
Hardware: PC → All
Comment on attachment 272908 [details] [diff] [review] patch Hmmm. Yeah, I guess this makes sense... If you wanted to, you could also add a check for whether DoneAddingChildren() got called here. Might not matter, though.
Attachment #272908 - Flags: superreview?(bzbarsky)
Attachment #272908 - Flags: superreview+
Attachment #272908 - Flags: review?(bzbarsky)
Attachment #272908 - Flags: review+
hm... is it really possible that aNotify is true, mDoneAddingChildren false, and SetAttr is being called?
Yes, of course. Consider an <object> with a <script> child which sets attributes on that <object>. Pretty stupid thing to do, but certainly possible. ;)
Attached patch patch v2 (deleted) — Splinter Review
OK, check mIsDoneAddingChildren
Attachment #272908 - Attachment is obsolete: true
Checking in content/html/content//src/nsHTMLObjectElement.cpp; /cvsroot/mozilla/content/html/content/src/nsHTMLObjectElement.cpp,v <-- nsHTMLObjectElement.cpp new revision: 1.104; previous revision: 1.103 done Checking in content/html/content//src/nsHTMLSharedObjectElement.cpp; /cvsroot/mozilla/content/html/content/src/nsHTMLSharedObjectElement.cpp,v <-- nsHTMLSharedObjectElement.cpp new revision: 1.87; previous revision: 1.86 done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
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: