Closed
Bug 1393088
Opened 7 years ago
Closed 7 years ago
Port bug 1390209 to C-C [Remove unused nsIDOMHTML*Element interfaces]
Categories
(Thunderbird :: General, defect)
Thunderbird
General
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 57.0
People
(Reporter: Paenglab, Assigned: jorgk-bmo)
Details
Attachments
(2 files, 2 obsolete files)
6.13 KB,
patch
|
jorgk-bmo
:
review+
|
Details | Diff | Splinter Review |
2.85 KB,
patch
|
Details | Diff | Splinter Review |
I get this error:
z:/Mozilla/comm-central/mailnews/compose/src/nsMsgSend.cpp(30): fatal error C1083: Cannot open include file: 'nsIDOMHTMLBodyElement.h': No such file or directory
Bug 1390209 removed this. backout of this bug makes TB buildable.
Assignee | ||
Comment 1•7 years ago
|
||
This compiles, but I'm not sure that it's right. Very few C++ examples of HTMLBodyElement in the tree. Sadly :bz is on holidays, I'll see how I get advice on this. Maybe Ehsan.
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Comment on attachment 8900359 [details] [diff] [review]
1393088-nsIDOMHTMLBodyElement.patch
Review of attachment 8900359 [details] [diff] [review]:
-----------------------------------------------------------------
::: mailnews/compose/src/nsMsgSend.cpp
@@ +1289,5 @@
> // Now, we know the types of objects this node can be, so we will do
> // our query interface here and see what we come up with
> + nsCOMPtr<Element> bodyElement = (do_QueryInterface(node));
> + RefPtr<mozilla::dom::HTMLBodyElement> body =
> + static_cast<mozilla::dom::HTMLBodyElement*>(mozilla::dom::HTMLBodyElement::FromContentOrNull(bodyElement));
Why the cast? The RefPtr<mozilla::dom::HTMLImageElement> below doesn't have it.
Assignee | ||
Comment 3•7 years ago
|
||
Without the cast I get:
0:12.66 c:/mozilla-source/comm-central/mailnews/compose/src/nsMsgSend.cpp(1293): error C2440: 'initializing': cannot convert from 'nsGenericHTMLElement *' to 'RefPtr<mozilla::dom::HTMLBodyElement>'
0:12.66 c:/mozilla-source/comm-central/mailnews/compose/src/nsMsgSend.cpp(1293): note: No constructor could take the source type, or constructor overload resolution was ambiguous
Assignee | ||
Comment 4•7 years ago
|
||
I actually works, I sent and e-mail with background and it was downloaded and attached.
Assignee | ||
Comment 5•7 years ago
|
||
After advice from Olli Pettay (:smaug) on IRC I came up with this.
Attachment #8900359 -
Attachment is obsolete: true
Comment 6•7 years ago
|
||
Comment on attachment 8900385 [details] [diff] [review]
1393088-nsIDOMHTMLBodyElement.patch (v2).
>+ nsCOMPtr<nsINode> bodyNode = do_QueryInterface(node);
I wouldn't call this bodyNode, since it may not point to a body element. Perhaps just n or some such temporary sounding variable name?
> // Now, we know the types of objects this node can be, so we will do
> // our query interface here and see what we come up with
>- nsCOMPtr<nsIDOMHTMLBodyElement> body = (do_QueryInterface(domSaveArray[j].node));
>+ nsCOMPtr<nsINode> bodyNode = (do_QueryInterface(domSaveArray[j].node));
same here. (and I wonder why () around QI)
> // Now, we know the types of objects this node can be, so we will do
> // our query interface here and see what we come up with
>- nsCOMPtr<nsIDOMHTMLBodyElement> body = (do_QueryInterface(domSaveArray[i].node));
>+ nsCOMPtr<nsINode> bodyNode = (do_QueryInterface(domSaveArray[i].node));
and here
Attachment #8900385 -
Flags: review+
Assignee | ||
Comment 7•7 years ago
|
||
Thank you, Olli!
Attachment #8900385 -
Attachment is obsolete: true
Attachment #8900402 -
Flags: review+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/1777ffb9363f
Port bug 1390209 to mailnews: Remove use of nsIDOMHTMLBodyElement. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•7 years ago
|
Target Milestone: --- → Thunderbird 57.0
Reporter | ||
Comment 9•7 years ago
|
||
Hmm, all red. And my local fails too.
Assignee | ||
Comment 10•7 years ago
|
||
Hmm, compiled locally without having pulled M-C. The interface I used should have been in place already but I can see there are some string type issues. Just comment out the four lines and don't send anything. I'll fix it (now in a Council meeting).
Assignee | ||
Comment 11•7 years ago
|
||
Comment 12•7 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/e7173819d591
Port bug 1390209 to mailnews, follow-up: Correct parameters of [Get|Set]Background(). rs=bustage-fix
Comment 13•7 years ago
|
||
The string bits in these patches are very very wrong. See upcoming comments in bug 1403516.
Comment 14•7 years ago
|
||
Like "might well be a security bug" wrong.
You need to log in
before you can comment on or make changes to this bug.
Description
•