Closed Bug 1447940 Opened 7 years ago Closed 7 years ago

Port bug 1444143 and bug 1447098 to TB: Replace use of nsIFrameLoader and rename FromContent to FromNode

Categories

(MailNews Core :: Composition, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 61.0

People

(Reporter: Paenglab, Assigned: jorgk-bmo)

References

Details

Attachments

(1 file, 2 obsolete files)

Both bugs need to be ported.
Attached patch Bustage.patch (obsolete) — Splinter Review
This is my approach with my zero C++ skills. It still fails with: 0:20.58 nsMsgContentPolicy.cpp 0:20.58 z:/Mozilla/comm-central/mailnews/base/src/nsMsgContentPolicy.cpp(757): error C2039: 'GetFrameLoaderXPCOM': is not a member of 'nsIFrameLoaderOwner' 0:20.58 z:/Mozilla/TB/dist/include\nsIFrameLoaderOwner.h(28): note: see declaration of 'nsIFrameLoaderOwner' 0:20.58 z:/Mozilla/comm-central/mailnews/base/src/nsMsgContentPolicy.cpp(762): error C2027: use of undefined type 'nsFrameLoader' 0:20.58 z:\mozilla\tb\dist\include\nsIMessageManager.h(29): note: see declaration of 'nsFrameLoader' 0:20.58 z:/Mozilla/comm-central/mailnews/base/src/nsMsgContentPolicy.cpp(762): error C2039: 'GetDocShell': is not a member of 'nsCOMPtr<nsFrameLoader>' 0:20.58 z:/Mozilla/comm-central/mailnews/base/src/nsMsgContentPolicy.cpp(756): note: see declaration of 'nsCOMPtr<nsFrameLoader>'
Flags: needinfo?(bzbarsky)
Summary: Port bug 1444143 and bug 1447098 to TB → Port bug 1444143 and bug 1447098 to TB: Replace use of nsIFrameLoader and rename FromContent to FromNode
Attached patch Bustage.patch (v2) (obsolete) — Splinter Review
This goes closer, now only: 'IgnoreErrors': identifier not found
Attachment #8961312 - Attachment is obsolete: true
Attachment #8961390 - Flags: feedback?(bzbarsky)
Attached patch Bustage.patchSplinter Review
That does the job.
Assignee: nobody → jorgk
Attachment #8961390 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8961390 - Flags: feedback?(bzbarsky)
Flags: needinfo?(bzbarsky)
Attachment #8961407 - Flags: review?(bzbarsky)
Comment on attachment 8961407 [details] [diff] [review] Bustage.patch >+ mozilla::dom::HTMLImageElement::FromNodeOrNull(element); This is to do with bug 1447098, but ok. Sorry, I should have realized comm-central used FromContent.... >+ RefPtr<nsFrameLoader> frameLoader = flOwner ? flOwner shouldn't be null here, since the QI succeeded. The old code certainly didn't null-check. Just drop the null-check, please: RefPtr<nsFrameLoader> frameLoader = flOwner->GetFrameLoader(); Also, you need to use mozilla::dom::nsFrameLoader as the type, no? Or add some "using" declarations to make it simpler. r=me. Thank you for dealing with this!
Attachment #8961407 - Flags: review?(bzbarsky) → review+
(In reply to Boris Zbarsky [:bz] (no decent commit message means r-) from comment #6) > Also, you need to use mozilla::dom::nsFrameLoader as the type, no? Apparently not since it compiles like this: RefPtr<nsFrameLoader> frameLoader = flOwner->GetFrameLoader(); RefPtr<mozilla::dom::nsFrameLoader> frameLoader = flOwner->GetFrameLoader(); doesn't compile. nsFrameLoader.h just has |class nsFrameLoader final :|. So I'll land this just with the null-check removed.
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/5c4b9489b3ba Port bug 1444143 and bug 1447098 to TB: Replace use of nsIFrameLoader and rename FromContent to FromNode. r=bz
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 61.0
Oh, I forgot that nsFrameLoader is not namespaced. OK. I keep thinking it's already mozilla::dom::FrameLoader. ;)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: