Bug 687426 - Remove Document.xmlEncoding; r=sicking

This commit is contained in:
Ms2ger 2011-10-01 18:14:40 +02:00
Родитель 8bc1e13c77
Коммит c28f40844e
9 изменённых файлов: 17 добавлений и 42 удалений

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

@ -73,7 +73,6 @@ DEPRECATED_OPERATION(TextContent)
DEPRECATED_OPERATION(EnablePrivilege)
DEPRECATED_OPERATION(IsSameNode)
DEPRECATED_OPERATION(GlobalStorage)
DEPRECATED_OPERATION(XmlEncoding)
DEPRECATED_OPERATION(XmlVersion)
DEPRECATED_OPERATION(InputEncoding)
DEPRECATED_OPERATION(XmlStandalone)

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

@ -5893,23 +5893,6 @@ nsDocument::GetInputEncoding(nsAString& aInputEncoding)
return NS_OK;
}
NS_IMETHODIMP
nsDocument::GetXmlEncoding(nsAString& aXmlEncoding)
{
WarnOnceAbout(eXmlEncoding);
if (!IsHTML() &&
mXMLDeclarationBits & XML_DECLARATION_BITS_DECLARATION_EXISTS &&
mXMLDeclarationBits & XML_DECLARATION_BITS_ENCODING_EXISTS) {
// XXX We don't store the encoding given in the xml declaration.
// For now, just output the inputEncoding which we do store.
GetInputEncoding(aXmlEncoding);
} else {
SetDOMStringToNull(aXmlEncoding);
}
return NS_OK;
}
NS_IMETHODIMP
nsDocument::GetXmlStandalone(bool *aXmlStandalone)
{

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

@ -59,32 +59,31 @@ function xhrDoc(idx) {
}
// Each row has the document getter function, then the characterSet,
// inputEncoding, xmlEncoding expected for that document.
// inputEncoding expected for that document.
var tests = [
[ frameDoc("one"), "ISO-8859-1", "ISO-8859-1", null ],
[ frameDoc("two"), "UTF-8", "UTF-8", null ],
[ frameDoc("three"), "ISO-8859-1", "ISO-8859-1", null ],
[ frameDoc("four"), "UTF-8", "UTF-8", null ],
[ frameDoc("five"), "UTF-8", "UTF-8", null ],
[ frameDoc("six"), "UTF-8", "UTF-8", "UTF-8"],
[ frameDoc("seven"), "ISO-8859-1", "ISO-8859-1", "ISO-8859-1" ],
[ createDoc, "UTF-8", null, null ],
[ xhrDoc(4), "UTF-8", "UTF-8", null ],
[ xhrDoc(5), "UTF-8", "UTF-8", "UTF-8" ],
[ xhrDoc(6), "ISO-8859-1", "ISO-8859-1", "ISO-8859-1" ],
[ frameDoc("one"), "ISO-8859-1", "ISO-8859-1" ],
[ frameDoc("two"), "UTF-8", "UTF-8" ],
[ frameDoc("three"), "ISO-8859-1", "ISO-8859-1" ],
[ frameDoc("four"), "UTF-8", "UTF-8" ],
[ frameDoc("five"), "UTF-8", "UTF-8" ],
[ frameDoc("six"), "UTF-8", "UTF-8" ],
[ frameDoc("seven"), "ISO-8859-1", "ISO-8859-1" ],
[ createDoc, "UTF-8", null ],
[ xhrDoc(4), "UTF-8", "UTF-8" ],
[ xhrDoc(5), "UTF-8", "UTF-8" ],
[ xhrDoc(6), "ISO-8859-1", "ISO-8859-1" ],
];
function doTest(idx) {
var [docGetter, expectedCharacterSet,
expectedInputEncoding, expectedXMLEncoding] = tests[idx];
expectedInputEncoding] = tests[idx];
var doc = docGetter();
// Have to be careful here to catch null vs ""
is(doc.characterSet, expectedCharacterSet, "Test " + idx + " characterSet");
is(doc.inputEncoding, expectedInputEncoding,
"Test " + idx + " inputEncoding");
is(doc.xmlEncoding, expectedXMLEncoding, "Test " + idx + " xmlEncoding");
}
addLoadEvent(function() {

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

@ -67,7 +67,7 @@ interface nsIDOMCaretPosition;
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
*/
[scriptable, uuid(C54536AF-C238-4D8B-A339-54E2A0649FF5)]
[scriptable, uuid(489faaa9-c54e-466c-8164-9a5fcc3a7052)]
interface nsIDOMDocument : nsIDOMNode
{
readonly attribute nsIDOMDocumentType doctype;
@ -106,8 +106,6 @@ interface nsIDOMDocument : nsIDOMNode
nsIDOMElement getElementById(in DOMString elementId);
// Introduced in DOM Level 3:
readonly attribute DOMString inputEncoding;
// Introduced in DOM Level 3:
readonly attribute DOMString xmlEncoding;
// Introduced in DOM Level 3:
attribute boolean xmlStandalone;
// raises(DOMException) on setting

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

@ -38,7 +38,7 @@
#include "nsIDOMDocument.idl"
[scriptable, uuid(0457526E-1FA5-476C-9314-0F704617B9F4)]
[scriptable, uuid(8168733e-9cf6-4552-9f03-57de11b87f3f)]
interface nsIDOMXMLDocument : nsIDOMDocument
{
// DOM Level 3 Load & Save, DocumentLS

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

@ -47,7 +47,7 @@
*/
interface nsISelection;
[scriptable, uuid(DA6A8183-3C50-4F4A-9EFC-0E050B9A856A)]
[scriptable, uuid(9a23fb3c-1d25-462e-8e85-c78c9dc61755)]
interface nsIDOMHTMLDocument : nsIDOMDocument
{
readonly attribute DOMString URL;

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

@ -39,7 +39,7 @@
interface nsIDOMSVGSVGElement;
[scriptable, uuid(E055EF40-D6BA-443A-B4DB-C1CCFAA6EB31)]
[scriptable, uuid(1767ad4f-bb2b-474b-b208-9910ed152605)]
interface nsIDOMSVGDocument : nsIDOMDocument
{
readonly attribute DOMString domain;

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

@ -112,7 +112,6 @@ nsIJSONDecodeDeprecatedWarning=nsIJSON.decode is deprecated. Please use JSON.pa
nsIJSONEncodeDeprecatedWarning=nsIJSON.encode is deprecated. Please use JSON.stringify instead.
nsIDOMWindowInternalWarning=Use of nsIDOMWindowInternal is deprecated. Use nsIDOMWindow instead.
IsSameNodeWarning=Use of isSameNode is deprecated. Please use A == B to test for equality instead.
XmlEncodingWarning=Use of xmlEncoding is deprecated.
XmlVersionWarning=Use of xmlVersion is deprecated.
InputEncodingWarning=Use of inputEncoding is deprecated.
XmlStandaloneWarning=Use of xmlStandalone is deprecated.

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

@ -39,9 +39,6 @@ function runTest() {
// doc.xmlStandalone
ok(doc.xmlStandalone == clonefalse.xmlStandalone, "xmlStandalone not preserved correctly; " + iframes[i].id);
// doc.xmlEncoding
ok(doc.xmlEncoding == clonefalse.xmlEncoding, "xmlEncoding not preserved correctly; " + iframes[i].id);
// doc.characterSet
ok(doc.characterSet == clonefalse.characterSet, "charset not preserved correctly; " + iframes[i].id);