Closed
Bug 1381011
Opened 7 years ago
Closed 7 years ago
Port bug 1380413 to mailnews [Remove some unused nsIDOMHTMLImageElement bits]
Categories
(Thunderbird :: General, enhancement)
Thunderbird
General
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 56.0
People
(Reporter: jorgk-bmo, Assigned: jorgk-bmo)
References
Details
Attachments
(1 file, 1 obsolete file)
9.49 KB,
patch
|
Details | Diff | Splinter Review |
1:13.92 c:/mozilla-source/comm-central/mailnews/compose/src/nsMsgCompose.cpp(275): error C2039: 'GetSrc': is not a member of 'nsIDOMHTMLImageElement'
Comment 1•7 years ago
|
||
Can Thunderbird include mozilla/dom/HTMLImageElement.h and use it here?
Assignee | ||
Comment 2•7 years ago
|
||
I'm onto it: nsCOMPtr<Element> imageElement = do_QueryInterface(object); RefPtr<mozilla::dom::HTMLImageElement> image = mozilla::dom::HTMLImageElement::FromContent(imageElement); if (image) { image->GetSrc(objURL); } Sadly, we're fighting three bustages concurrently, this one and bug 1381006 and bug 1380906.
Comment 3•7 years ago
|
||
> RefPtr<mozilla::dom::HTMLImageElement> image = mozilla::dom::HTMLImageElement::FromContent(imageElement);
You want FromContentOrNull, if "object" can actually not be an element.
Or you could return false up front if !imageElement, of course, then use FromContent.
Assignee | ||
Comment 4•7 years ago
|
||
Boris, can you please look this over. I can compile with this patch.
Flags: needinfo?(bzbarsky)
Comment 5•7 years ago
|
||
1. See comment 3. That applies in a few places. 2. In ResetUrisForEmbed you want IgnoredErrorResult if you really plan to ignore it.
Flags: needinfo?(bzbarsky)
Assignee | ||
Comment 6•7 years ago
|
||
Re. 2: OK, how would I not ignore it, can you give me two lines of code, please.
Comment 7•7 years ago
|
||
That depends on what you want to happen when the attribute set fails, no? The current code ignores such failures, of course, so continuing to do so is not unreasonable.
Assignee | ||
Comment 8•7 years ago
|
||
Some tweaks to address issues, white-space and variable names.
Attachment #8886616 -
Attachment is obsolete: true
Assignee | ||
Comment 9•7 years ago
|
||
https://hg.mozilla.org/comm-central/rev/130d043e685055c682059c92dc582acb2a65afd2
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 56.0
Assignee | ||
Updated•7 years ago
|
Summary: Port bug 1380413 to mailnews → Port bug 1380413 to mailnews [Remove some unused nsIDOMHTMLImageElement bits]
You need to log in
before you can comment on or make changes to this bug.
Description
•