mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 711841, Null(C)String(), r=bsmedberg,glandium
This commit is contained in:
parent
6e8b839d73
commit
c35f7bb3a9
@ -1402,11 +1402,9 @@ nsDOMImplementation::CreateDocumentType(const nsAString& aQualifiedName,
|
||||
NS_ENSURE_TRUE(name, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
// Indicate that there is no internal subset (not just an empty one)
|
||||
nsAutoString voidString;
|
||||
voidString.SetIsVoid(true);
|
||||
return NS_NewDOMDocumentType(aReturn, mOwner->NodeInfoManager(),
|
||||
name, aPublicId,
|
||||
aSystemId, voidString);
|
||||
aSystemId, NullString());
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -1461,14 +1459,12 @@ nsDOMImplementation::CreateHTMLDocument(const nsAString& aTitle,
|
||||
|
||||
nsCOMPtr<nsIDOMDocumentType> doctype;
|
||||
// Indicate that there is no internal subset (not just an empty one)
|
||||
nsAutoString voidString;
|
||||
voidString.SetIsVoid(true);
|
||||
nsresult rv = NS_NewDOMDocumentType(getter_AddRefs(doctype),
|
||||
mOwner->NodeInfoManager(),
|
||||
nsGkAtoms::html, // aName
|
||||
EmptyString(), // aPublicId
|
||||
EmptyString(), // aSystemId
|
||||
voidString); // aInternalSubset
|
||||
NullString()); // aInternalSubset
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@ function checkDoc(title, expectedtitle, normalizedtitle) {
|
||||
is(doc.doctype.name, "html");
|
||||
is(doc.doctype.publicId, "");
|
||||
is(doc.doctype.systemId, "");
|
||||
is(doc.doctype.internalSubset, null, "internalSubset should be null!");
|
||||
isElement(doc.documentElement, "html");
|
||||
isElement(doc.documentElement.firstChild, "head");
|
||||
is(doc.documentElement.firstChild.childNodes.length, 1);
|
||||
|
@ -77,10 +77,7 @@ Canvas2D_SetStyleHelper(JSContext *cx, JSObject *obj, jsid id, jsval *vp,
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
nsString voidStr;
|
||||
voidStr.SetIsVoid(true);
|
||||
|
||||
rv = (self->*setfunc)(voidStr, arg0);
|
||||
rv = (self->*setfunc)(NullString(), arg0);
|
||||
}
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
|
@ -2453,11 +2453,9 @@ HTMLContentSink::AddDocTypeDecl(const nsIParserNode& aNode)
|
||||
}
|
||||
|
||||
// Indicate that there is no internal subset (not just an empty one)
|
||||
nsAutoString voidString;
|
||||
voidString.SetIsVoid(true);
|
||||
rv = NS_NewDOMDocumentType(getter_AddRefs(docType),
|
||||
mDocument->NodeInfoManager(), nameAtom,
|
||||
publicId, systemId, voidString);
|
||||
publicId, systemId, NullString());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (oldDocType) {
|
||||
|
@ -936,14 +936,12 @@ txMozillaXMLOutput::createResultDocument(const nsSubstring& aName, PRInt32 aNsID
|
||||
}
|
||||
|
||||
// Indicate that there is no internal subset (not just an empty one)
|
||||
nsAutoString voidString;
|
||||
voidString.SetIsVoid(true);
|
||||
rv = NS_NewDOMDocumentType(getter_AddRefs(documentType),
|
||||
mNodeInfoManager,
|
||||
doctypeName,
|
||||
mOutputFormat.mPublicId,
|
||||
mOutputFormat.mSystemId,
|
||||
voidString);
|
||||
NullString());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIContent> docType = do_QueryInterface(documentType);
|
||||
|
@ -734,12 +734,9 @@ IndexedDatabaseManager::EnsureOriginIsInitialized(const nsACString& aOrigin,
|
||||
rv = fileManagerDirectory->Append(dbBaseFilename);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsString voidString;
|
||||
voidString.SetIsVoid(true);
|
||||
|
||||
nsCOMPtr<mozIStorageConnection> connection;
|
||||
rv = OpenDatabaseHelper::CreateDatabaseConnection(
|
||||
voidString, file, fileManagerDirectory, getter_AddRefs(connection));
|
||||
NullString(), file, fileManagerDirectory, getter_AddRefs(connection));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<mozIStorageStatement> stmt;
|
||||
|
@ -368,6 +368,9 @@ StringEndsWith( const nsACString& aSource, const nsACString& aSubstring,
|
||||
const nsAFlatString& EmptyString();
|
||||
const nsAFlatCString& EmptyCString();
|
||||
|
||||
const nsAFlatString& NullString();
|
||||
const nsAFlatCString& NullCString();
|
||||
|
||||
/**
|
||||
* Compare a UTF-8 string to an UTF-16 string.
|
||||
*
|
||||
|
@ -1046,6 +1046,22 @@ EmptyCString()
|
||||
return sEmpty;
|
||||
}
|
||||
|
||||
const nsAFlatString&
|
||||
NullString()
|
||||
{
|
||||
static const nsXPIDLString sNull;
|
||||
|
||||
return sNull;
|
||||
}
|
||||
|
||||
const nsAFlatCString&
|
||||
NullCString()
|
||||
{
|
||||
static const nsXPIDLCString sNull;
|
||||
|
||||
return sNull;
|
||||
}
|
||||
|
||||
PRInt32
|
||||
CompareUTF8toUTF16(const nsASingleFragmentCString& aUTF8String,
|
||||
const nsASingleFragmentString& aUTF16String)
|
||||
|
Loading…
Reference in New Issue
Block a user