Closed
Bug 93649
Opened 24 years ago
Closed 24 years ago
document.plugins === document.embeds in NN4 while document.plugins === navigator.plugins in Mozilla
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
mozilla1.0
People
(Reporter: martin.honnen, Assigned: fabian)
References
()
Details
Attachments
(1 file)
|
4.01 KB,
patch
|
bzbarsky
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
I stumbled today over the following: in NN4.06+
document.plugins === document.embeds
evals to true while in Mozilla we have
document.plugins === navigator.plugins
I think Mozilla should be backwards compatible with NN4 so I am opening this
bug.
Note that the fix of bug http://bugzilla.mozilla.org/show_bug.cgi?id=9392 seems
to have caused this but I can't understand why the fix implemented a different
behaviour in Mozilla than there is in NN4. document.plugins is not part of any
standard so if Mozilla supports it it should be backwards compatible with NN4.
Comment 1•24 years ago
|
||
Confirming that this is still happening....
...sounds like a DOM bug
Assignee: av → jst
Component: Plug-ins → DOM Level 0
Keywords: 4xp
OS: Windows 95 → All
QA Contact: shrir → desale
Hardware: PC → All
Comment 2•24 years ago
|
||
SEVERITY = LOW [(1)No Crash, (2)Good functional failure, (3)No Cosmetic failure]
VISIBILITY = HIGH [(1) real website usage could be high because of backward
compatibility. (2)Gets one point of compatibility with other browsers since it
works very well on NS4.x. (3)Gets one more point on compliance with adopted
techonology which is JS]
PRIORITY = VISIBILITY * SEVERITY
Hence Priority = p3
adding word "qawanted" because I'm setting this priority on available data & if
someone feels otherwise then please investigate this more & feel free to change
this priority.
Keywords: qawanted
Priority: -- → P3
| Assignee | ||
Comment 3•24 years ago
|
||
Stealing this bug. Patch coming up.
| Assignee | ||
Comment 4•24 years ago
|
||
There is a problem... .plugins is part of nsIDOMNSDocument.idl, which means it's
implemented only by nsDocument. .embeds is part of nsIDOMNSHTMLDocument.idl,
which means it's implemented only by nsHTMLDocument. We have two solutions:
1) Move .plugins to be only available to html documents (my preferred solution)
2) Make each subclass of nsDocument implement the method. However I don't know
why documents other than HTML should need access to it, and they can always use
navigator.plugins
Thoughts?
Status: NEW → ASSIGNED
Comment 5•24 years ago
|
||
Given that document.plugins should be equal to document.embeds it doesn't make
sense for document.plugins to be available on any other documents than HTML. I
believe that when document.plugins was implemented (incorrectly) the belief was
that since it was equal to navigator.plugins it made sense to put it on all
documents. I agree with Fabian, let's move it from nsIDOMNSDocument to
nsIDOMNSHTMLDocument.
Thanks Fabian for looking into this!
| Assignee | ||
Comment 6•24 years ago
|
||
Comment 7•24 years ago
|
||
Comment on attachment 69475 [details] [diff] [review]
Proposed fix.
>+// Mapped to document.embeds for NS4 compatibility
>+NS_IMETHODIMP
>+nsHTMLDocument::GetPlugins(nsIDOMHTMLCollection** aPlugins)
>+{
>+ *aPlugins = nsnull;
You don't need this here since you're simply forwarding this call to
GetEmbeds(), GetEmebeds() is responsible for nulling out this parameter.
>+
>+ return GetEmbeds(aPlugins);
> }
>
Other than that, this looks awesome. Thank you Fabian for the quick fix, sr=jst
Attachment #69475 -
Flags: superreview+
Comment 8•24 years ago
|
||
Comment on attachment 69475 [details] [diff] [review]
Proposed fix.
whee! comments in interfaces! r=bzbarsky
Attachment #69475 -
Flags: review+
Comment 9•24 years ago
|
||
i'm marking this nsbeta1 as an extra precaution so that it goes on the radar,
but thanks Fabian for fixing it :-)
Keywords: nsbeta1
a=roc+moz for 0.9.9
| Assignee | ||
Comment 11•24 years ago
|
||
Checked in the trunk, marking FIXED, thanks for the reviews :-)
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 12•24 years ago
|
||
Oh, I'd just like to say a booh to the reviewers for not catching that I had
forgotten nsXULDocument.cpp in my diff. That almost broke the build :-P
Updated•24 years ago
|
Keywords: mozilla0.9.9+
Comment 13•24 years ago
|
||
Oops! :-)
You need to log in
before you can comment on or make changes to this bug.
Description
•