Closed
Bug 290420
Opened 20 years ago
Closed 20 years ago
Firefox context menu code shouldn't rely on localname tests
Categories
(Firefox :: General, defect, P2)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox1.5
People
(Reporter: bzbarsky, Assigned: asaf)
References
Details
(Keywords: fixed-aviary1.0.5, fixed1.7.9)
Attachments
(1 file)
|
6.13 KB,
patch
|
Details | Diff | Splinter Review |
The Firefox context menu code uses the localName of DOM nodes to identify the
type of node. It should just use the appropriate |instanceof| tests instead.
For example, replace:
296 } else if ( this.target.localName.toUpperCase() == "TEXTAREA" ) {
297 this.onTextInput = true;
298 } else if ( this.target.localName.toUpperCase() == "HTML" ) {
with:
} else if ( this.target instanceof HTMLTextAreaElement ) {
this.onTextInput = true;
} else if ( this.target instanceof HTMLHtmlElement ) {
etc. As things stand, the code behaves incorrectly for XML documents, and the
existing code may even be subject to spoofing or security issues (see bug 290324
for an example, though with an extension).
Note also bug 245660, which removes some cases of this.
Updated•20 years ago
|
Assignee: firefox → bugs
| Assignee | ||
Updated•20 years ago
|
Assignee: bugs → bugs.mano
Priority: -- → P2
Target Milestone: --- → Firefox1.1
| Assignee | ||
Comment 1•20 years ago
|
||
I am sure if I need to lowercase the type property.
Attachment #186534 -
Flags: superreview?(bzbarsky)
| Reporter | ||
Comment 2•20 years ago
|
||
I won't be able to get to this till July, and this needs review from firefox folks anyway (and doesn't need sr, being a firefox change).
| Assignee | ||
Comment 3•20 years ago
|
||
Comment on attachment 186534 [details] [diff] [review] patch ok
Attachment #186534 -
Flags: superreview?(bzbarsky) → review?(mconnor)
Comment 4•20 years ago
|
||
Comment on attachment 186534 [details] [diff] [review] patch >@@ -4202,10 +4201,9 @@ >+ if ( ( elem instanceof HTMLQuoteElemen && 'cite' in elem && elem.cite) || You've got a typo here, this should probably be HTMLQuoteElement.
| Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Flags: blocking1.8b4?
Comment 5•20 years ago
|
||
patch incorporated into the fix for bug 298892 -- thanks! fixed on trunk and branches.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Keywords: fixed-aviary1.0.5,
fixed1.7.9
Resolution: --- → FIXED
| Assignee | ||
Updated•20 years ago
|
Flags: blocking1.8b4?
| Assignee | ||
Updated•20 years ago
|
Attachment #186534 -
Flags: review?(mconnor)
You need to log in
before you can comment on or make changes to this bug.
Description
•