Backed out changeset 77af189b5c49 (bug 1373984) for build bustage in nsHtml5Parser.cpp a=backout CLOSED TREE
MozReview-Commit-ID: 6kBmU71j2To
This commit is contained in:
@@ -374,15 +374,14 @@ ForEachPing(nsIContent* aContent, ForEachPingCallback aCallback, void* aClosure)
|
||||
}
|
||||
|
||||
nsIDocument* doc = aContent->OwnerDoc();
|
||||
nsAutoCString charset;
|
||||
doc->GetDocumentCharacterSet()->Name(charset);
|
||||
|
||||
nsWhitespaceTokenizer tokenizer(value);
|
||||
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
nsCOMPtr<nsIURI> uri, baseURI = aContent->GetBaseURI();
|
||||
ios->NewURI(NS_ConvertUTF16toUTF8(tokenizer.nextToken()),
|
||||
charset.get(), baseURI, getter_AddRefs(uri));
|
||||
doc->GetDocumentCharacterSet().get(),
|
||||
baseURI, getter_AddRefs(uri));
|
||||
// if we can't generate a valid URI, then there is nothing to do
|
||||
if (!uri) {
|
||||
continue;
|
||||
@@ -833,8 +832,6 @@ nsDocShell::nsDocShell()
|
||||
, mDefaultLoadFlags(nsIRequest::LOAD_NORMAL)
|
||||
, mFrameType(FRAME_TYPE_REGULAR)
|
||||
, mPrivateBrowsingId(0)
|
||||
, mForcedCharset(nullptr)
|
||||
, mParentCharset(nullptr)
|
||||
, mParentCharsetSource(0)
|
||||
, mJSRunToCompletionDepth(0)
|
||||
, mTouchEventsOverride(nsIDocShell::TOUCHEVENTS_OVERRIDE_NONE)
|
||||
@@ -2033,7 +2030,7 @@ nsDocShell::GetCharset(nsACString& aCharset)
|
||||
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
|
||||
nsIDocument* doc = presShell->GetDocument();
|
||||
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
|
||||
doc->GetDocumentCharacterSet()->Name(aCharset);
|
||||
aCharset = doc->GetDocumentCharacterSet();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -2119,7 +2116,7 @@ NS_IMETHODIMP
|
||||
nsDocShell::SetForcedCharset(const nsACString& aCharset)
|
||||
{
|
||||
if (aCharset.IsEmpty()) {
|
||||
mForcedCharset = nullptr;
|
||||
mForcedCharset.Truncate();
|
||||
return NS_OK;
|
||||
}
|
||||
const Encoding* encoding = Encoding::ForLabel(aCharset);
|
||||
@@ -2131,19 +2128,19 @@ nsDocShell::SetForcedCharset(const nsACString& aCharset)
|
||||
// Reject XSS hazards
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
mForcedCharset = encoding;
|
||||
encoding->Name(mForcedCharset);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetForcedCharset(nsACString& aResult)
|
||||
{
|
||||
mForcedCharset->Name(aResult);
|
||||
aResult = mForcedCharset;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsDocShell::SetParentCharset(const Encoding*& aCharset,
|
||||
nsDocShell::SetParentCharset(const nsACString& aCharset,
|
||||
int32_t aCharsetSource,
|
||||
nsIPrincipal* aPrincipal)
|
||||
{
|
||||
@@ -2153,7 +2150,7 @@ nsDocShell::SetParentCharset(const Encoding*& aCharset,
|
||||
}
|
||||
|
||||
void
|
||||
nsDocShell::GetParentCharset(const Encoding*& aCharset,
|
||||
nsDocShell::GetParentCharset(nsACString& aCharset,
|
||||
int32_t* aCharsetSource,
|
||||
nsIPrincipal** aPrincipal)
|
||||
{
|
||||
@@ -4195,7 +4192,7 @@ nsDocShell::AddChild(nsIDocShellTreeItem* aChild)
|
||||
// the actual source charset, which is what we're trying to
|
||||
// expose here.
|
||||
|
||||
const Encoding* parentCS = doc->GetDocumentCharacterSet();
|
||||
const nsACString& parentCS = doc->GetDocumentCharacterSet();
|
||||
int32_t charsetSource = doc->GetDocumentCharacterSetSource();
|
||||
// set the child's parentCharset
|
||||
childAsDocShell->SetParentCharset(parentCS,
|
||||
@@ -11624,8 +11621,7 @@ nsDocShell::ScrollToAnchor(bool aCurHasRef, bool aNewHasRef,
|
||||
NS_ENSURE_TRUE(mContentViewer, NS_ERROR_FAILURE);
|
||||
nsIDocument* doc = mContentViewer->GetDocument();
|
||||
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
|
||||
nsAutoCString charset;
|
||||
doc->GetDocumentCharacterSet()->Name(charset);
|
||||
const nsACString& charset = doc->GetDocumentCharacterSet();
|
||||
|
||||
nsCOMPtr<nsITextToSubURI> textToSubURI =
|
||||
do_GetService(NS_ITEXTTOSUBURI_CONTRACTID, &rv);
|
||||
|
||||
Reference in New Issue
Block a user