Closed
Bug 1403067
Opened 7 years ago
Closed 6 years ago
Remove nsIDOMHTMLAnchorElement type checks
Categories
(SeaMonkey :: General, enhancement)
Tracking
(seamonkey2.58 fixed, seamonkey2.57esr fixed)
RESOLVED
FIXED
seamonkey2.58
People
(Reporter: qdot, Assigned: frg)
References
Details
Attachments
(1 file, 3 obsolete files)
1.25 KB,
patch
|
iannbugzilla
:
review+
iannbugzilla
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
See https://bugzilla.mozilla.org/show_bug.cgi?id=1389650#c15. ChromeUtils.getClassName can be used to replace checks.
Reporter | ||
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Comment 2•7 years ago
|
||
Actually, we didn't fix those bits in editor/ui/composer/content/editor.js.
Status: RESOLVED → UNCONFIRMED
Ever confirmed: false
Resolution: DUPLICATE → ---
Updated•7 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Also remove some more classes per bug 1403516 comment 33. Untested as it is in Seamonkey.
Attachment #8914194 -
Flags: review?(frgrahl)
Reporter | ||
Comment 4•7 years ago
|
||
Comment on attachment 8914194 [details] [diff] [review] 1403067.patch Review of attachment 8914194 [details] [diff] [review]: ----------------------------------------------------------------- That method isn't going to work for those checks. You don't have access to those constructors in chrome JS. That's why I recommended the ChromeUtils.getClassName method in the bug description. There's examples of how this works in https://reviewboard.mozilla.org/r/167774/diff/6#index_header.
Attachment #8914194 -
Flags: review-
Reporter | ||
Comment 5•7 years ago
|
||
For further reference, here's the thread where we discussed the check methods on dev.platform: https://groups.google.com/forum/#!topic/mozilla.dev.platform/AGI46bcX1Qo
Assignee | ||
Comment 6•7 years ago
|
||
There is also Bug 1389622 Comment 4. Just haven't found the time yet to fix this one. ChromeUtils.getClassName(pluginElement) === "HTMLAnchorElement" looks cleaner than the solution proposed in Bug 1389622.
Assignee | ||
Comment 7•7 years ago
|
||
Comment on attachment 8914194 [details] [diff] [review] 1403067.patch Clearing review for now. Aceman if you want I can do the fixup.
Flags: needinfo?(acelists)
Attachment #8914194 -
Flags: review?(frgrahl)
Yes, I can do that. But where does ChromeUtils come from? I don't see it imported anywhere in the users. Is it some global object?
Flags: needinfo?(acelists)
Assignee | ||
Comment 9•7 years ago
|
||
Looks to be global: mozilla/dom/base/ChromeUtils.h
Comment 10•7 years ago
|
||
But when you have code: if (node instanceof Components.interfaces.nsIDOMHTMLInputElement && node.type == "file") and change it to: if (ChromeUtils.getClassName(node) === "HTMLInputElement") then I'm not sure you can then use the .type attribute on node as the instanceof was doing QueryInterface on the node and now node will not have those properties. I think this can be changed to node.getAttribute("type") == "file", but I'm not sure what to do with cases like 'element.mozIsTextField(false)'.
Comment 11•7 years ago
|
||
OK, so if you can test this in Seamonkey and finish what needs to be done on the node, that would be great. Thanks.
Attachment #8914194 -
Attachment is obsolete: true
Attachment #8918671 -
Flags: feedback?(frgrahl)
Assignee | ||
Comment 12•7 years ago
|
||
Comment on attachment 8918671 [details] [diff] [review] 1403067.patch v2 aceman, big thanks. I have some small patches for other nsIDOM removal bugs kyle filed and will rebase and finish this one.
Attachment #8918671 -
Flags: feedback?(frgrahl) → feedback+
Comment 13•7 years ago
|
||
Comment on attachment 8918671 [details] [diff] [review] 1403067.patch v2 Review of attachment 8918671 [details] [diff] [review]: ----------------------------------------------------------------- ::: editor/ui/composer/content/editor.js @@ +3168,5 @@ > } > } > } else { > for (node = document.tooltipNode; node; node = node.parentNode) { > + if (ChromeUtils.getClassName(node) === "HTMLImageElement" || What's wrong with .nodeName?
Assignee | ||
Comment 14•7 years ago
|
||
just rebased for testing
Attachment #8918671 -
Attachment is obsolete: true
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → frgrahl
Status: NEW → ASSIGNED
status-seamonkey2.57esr:
--- → affected
status-seamonkey2.58:
--- → affected
Version: unspecified → SeaMonkey 2.57 Branch
Assignee | ||
Comment 15•6 years ago
|
||
I am moving the nsIDOMHTMLInputElement to a new bug later. [Approval Request Comment] Regression caused by (bug #): Bug 1389650 User impact if declined: broken find Testing completed (on m-c, etc.): c-b Risk to taking this patch (and alternatives if risky): trivial String changes made by this patch: --
Attachment #8923127 -
Attachment is obsolete: true
Attachment #8966026 -
Flags: review?(iann_bugzilla)
Attachment #8966026 -
Flags: approval-comm-beta?
Comment 16•6 years ago
|
||
Comment on attachment 8966026 [details] [diff] [review] 1403067-HTMLAnchorElement.patch LGTM r/a=me
Attachment #8966026 -
Flags: review?(iann_bugzilla)
Attachment #8966026 -
Flags: review+
Attachment #8966026 -
Flags: approval-comm-beta?
Attachment #8966026 -
Flags: approval-comm-beta+
Comment 17•6 years ago
|
||
Pushed by frgrahl@gmx.net: https://hg.mozilla.org/comm-central/rev/3a5516e5e969 Remove usage of nsIDOMHTMLAnchorElement in SeaMonkey. r=IanN
Status: ASSIGNED → RESOLVED
Closed: 7 years ago → 6 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 18•6 years ago
|
||
https://hg.mozilla.org/releases/comm-beta/rev/6394caf01a8f7b7aa2b755149a9e9a92e8207b78
Target Milestone: --- → Seamonkey2.58
You need to log in
before you can comment on or make changes to this bug.
Description
•