Bug 1407229 - Backed out changeset 2ca8d8d56941: Backout of temporary fix. a=jorgk

This commit is contained in:
Jorg K 2017-10-11 11:55:55 +02:00
Родитель 2924306d18
Коммит 810daab538
2 изменённых файлов: 9 добавлений и 11 удалений

Просмотреть файл

@ -82,7 +82,6 @@
#include "nsIProtocolHandler.h"
#include "nsContentUtils.h"
#include "nsIFileURL.h"
#include "nsIPrincipal.h" // XXX TEMPORARY
using namespace mozilla;
using namespace mozilla::dom;
@ -272,7 +271,7 @@ bool nsMsgCompose::IsEmbeddedObjectSafe(const char * originalScheme,
RefPtr<HTMLAnchorElement> anchor = HTMLAnchorElement::FromContentOrNull(objectAsElement);
if (image)
{ uint64_t ignored; image->GetSrc(objURL, *(nsIPrincipal*)(&ignored)); } // XXX TEMPORARY
image->GetSrc(objURL);
else if (link)
link->GetHref(objURL);
else if (anchor)
@ -375,7 +374,7 @@ nsresult nsMsgCompose::ResetUrisForEmbeddedObjects()
mMsgSend->GetPartForDomIndex(i, partNum);
// do we care about anything besides images?
nsAutoString objURL;
uint64_t ignored; image->GetSrc(objURL, *(nsIPrincipal*)(&ignored)); // XXX TEMPORARY
image->GetSrc(objURL);
// First we need to make sure that the URL is associated with a message
// protocol so we don't accidentally manipulate a URL like:
@ -443,7 +442,7 @@ nsresult nsMsgCompose::ResetUrisForEmbeddedObjects()
AppendUTF8toUTF16(spec, newSrc);
newSrc.Append(restOfUrl);
IgnoredErrorResult rv2;
image->SetSrc(newSrc, *nsContentUtils::GetSystemPrincipal(), rv2); // XXX TEMPORARY
image->SetSrc(newSrc, rv2);
}
}
}

Просмотреть файл

@ -83,7 +83,6 @@
#include "nsIMsgProtocolInfo.h"
#include "mozIDOMWindow.h"
#include "mozilla/Preferences.h"
#include "nsIPrincipal.h" // XXX TEMPORARY
using namespace mozilla;
using namespace mozilla::dom;
@ -1315,7 +1314,7 @@ nsMsgComposeAndSend::GetEmbeddedObjectInfo(nsIDOMNode *node, nsMsgAttachmentData
nsString tDesc;
// Create the URI
uint64_t ignored; image->GetSrc(tUrl, *(nsIPrincipal*)(&ignored)); // XXX TEMPORARY
image->GetSrc(tUrl);
if (tUrl.IsEmpty())
return NS_OK;
@ -1839,12 +1838,12 @@ nsMsgComposeAndSend::ProcessMultipartRelated(int32_t *aMailboxCount, int32_t *aN
else if (link)
{
link->GetHref(domURL);
link->SetHref(newSpec, *nsContentUtils::GetSystemPrincipal(), rv2); // XXX TEMPORARY
link->SetHref(newSpec, rv2);
}
else if (image)
{
uint64_t ignored; image->GetSrc(domURL, *(nsIPrincipal*)(&ignored)); // XXX TEMPORARY
image->SetSrc(newSpec, *nsContentUtils::GetSystemPrincipal(), rv2); // XXX TEMPORARY
image->GetSrc(domURL);
image->SetSrc(newSpec, rv2);
}
else if (body)
{
@ -1883,9 +1882,9 @@ nsMsgComposeAndSend::ProcessMultipartRelated(int32_t *aMailboxCount, int32_t *aN
if (anchor) {
anchor->SetHref(NS_ConvertASCIItoUTF16(domSaveArray[i].url), rv2);
} else if (link) {
link->SetHref(NS_ConvertASCIItoUTF16(domSaveArray[i].url), *nsContentUtils::GetSystemPrincipal(), rv2); // XXX TEMPORARY
link->SetHref(NS_ConvertASCIItoUTF16(domSaveArray[i].url), rv2);
} else if (image) {
image->SetSrc(NS_ConvertASCIItoUTF16(domSaveArray[i].url), *nsContentUtils::GetSystemPrincipal(), rv2); // XXX TEMPORARY
image->SetSrc(NS_ConvertASCIItoUTF16(domSaveArray[i].url), rv2);
}
else if (body) {
body->SetBackground(NS_ConvertASCIItoUTF16(domSaveArray[i].url), rv2);