Bug 801545 - Remove DocumentType.internalSubset, r=bz
authorAryeh Gregor <ayg@aryeh.name>
Mon, 19 Oct 2015 09:53:41 +0100
changeset 303525 457e2b6d6e2a62351ea12ec782cb1ade1fd1bb08
parent 303524 c99688fbf5fa0b31dfd40bb3dd945fcb5e636ef7
child 303526 9eb54c6df8010f528b06a4a029907d5aacd86055
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs801545
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 801545 - Remove DocumentType.internalSubset, r=bz The C++ method GetInternalSubset() and related apparatus remains, and is used by the XML serializer etc.
dom/base/test/mochitest.ini
dom/base/test/test_bug438519.html
dom/base/test/test_createHTMLDocument.html
dom/imptests/failures/html/dom/test_historical.html.json
dom/tests/mochitest/dom-level2-core/exclusions.js
dom/tests/mochitest/dom-level2-core/mochitest.ini
dom/tests/mochitest/dom-level2-core/test_documenttypeinternalSubset01.html
dom/tests/mochitest/dom-level2-core/test_internalSubset01.html
dom/webidl/DocumentType.webidl
testing/web-platform/meta/dom/historical.html.ini
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -505,17 +505,16 @@ skip-if = (buildapp == 'b2g' && toolkit 
 [test_bug428847.html]
 [test_bug429157.html]
 [test_bug431082.html]
 [test_bug431701.html]
 [test_bug431833.html]
 [test_bug433533.html]
 [test_bug433662.html]
 [test_bug435425.html]
-[test_bug438519.html]
 [test_bug444030.xhtml]
 [test_bug444322.html]
 [test_bug444722.html]
 [test_bug448993.html]
 [test_bug450160.html]
 [test_bug451376.html]
 [test_bug453521.html]
 [test_bug453736.html]
deleted file mode 100644
--- a/dom/base/test/test_bug438519.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=438519
--->
-<head>
-  <title>Test for Bug 438519</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body onload="doTest()">
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=438519">Mozilla Bug 438519</a>
-<p id="display"></p>
-<div id="content" style="display:none">
-
-<iframe id="empty" src="data:text/xml,<!DOCTYPE HTML []><html></html>"></iframe>
-<iframe id="missing" src="data:text/xml,<!DOCTYPE HTML><html></html>"></iframe>
-<iframe id="entity" src="data:text/xml,<!DOCTYPE HTML [ <!ENTITY foo 'foo'> ]><html></html>"></iframe>
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Bug 218236 **/
-
-SimpleTest.waitForExplicitFinish();
-
-function doTest() {
-  function checkInternalSubset(id, expected) {
-    var e = document.getElementById(id);
-    is(e.contentDocument.doctype.internalSubset, expected, "checking '" + id + "'");
-  }
-
-  checkInternalSubset("empty", "");
-  checkInternalSubset("missing", null);
-  checkInternalSubset("entity", " <!ENTITY foo 'foo'> ");
-  SimpleTest.finish();
-}
-
-</script>
-</pre>
-</body>
-</html>
-
--- a/dom/base/test/test_createHTMLDocument.html
+++ b/dom/base/test/test_createHTMLDocument.html
@@ -19,17 +19,16 @@ function checkDoc(title, expectedtitle, 
   var doc = document.implementation.createHTMLDocument(title);
   is(doc.readyState, "complete");
   is(doc.compatMode, "CSS1Compat");
   // Opera doesn't have a doctype: DSK-311092
   ok(doc.doctype, "Need a doctype");
   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");
   if (title !== undefined) {
     is(doc.documentElement.firstChild.childNodes.length, 1);
     isElement(doc.documentElement.firstChild.firstChild, "title");
     // Doesn't always work out in WebKit.
     ok(doc.documentElement.firstChild.firstChild.firstChild, "Need a text node.");
     is(doc.documentElement.firstChild.firstChild.firstChild.data, expectedtitle);
--- a/dom/imptests/failures/html/dom/test_historical.html.json
+++ b/dom/imptests/failures/html/dom/test_historical.html.json
@@ -2,10 +2,9 @@
   "Historical DOM features must be removed: CDATASection": true,
   "Historical DOM features must be removed: createCDATASection": true,
   "Historical DOM features must be removed: createAttribute": true,
   "Historical DOM features must be removed: createAttributeNS": true,
   "Historical DOM features must be removed: getAttributeNode": true,
   "Historical DOM features must be removed: getAttributeNodeNS": true,
   "Historical DOM features must be removed: setAttributeNode": true,
   "Historical DOM features must be removed: removeAttributeNode": true,
-  "DocumentType member must be nuked: internalSubset": true
 }
--- a/dom/tests/mochitest/dom-level2-core/exclusions.js
+++ b/dom/tests/mochitest/dom-level2-core/exclusions.js
@@ -8,17 +8,17 @@ dtdTests = ["attrgetownerelement01", "do
             "documentimportnode04", "documentimportnode19",
             "documentimportnode20", "documentimportnode21",
             "documentimportnode22",
             "elementgetattributenodens03", "elementgetattributens02",
             "elementhasattribute02", "getAttributeNS01", "getElementById01",
             "getNamedItemNS03", "getNamedItemNS04", "hasAttribute02",
             "hasAttributeNS04", "importNode07", "importNode09",
             "importNode10", "importNode11", "importNode12", "importNode13",
-            "internalSubset01", "localName02", "namednodemapgetnameditemns01",
+            "localName02", "namednodemapgetnameditemns01",
             "namednodemapremovenameditemns02",
             "namednodemapremovenameditemns05", "namednodemapsetnameditemns05",
             "namednodemapsetnameditemns09", "namednodemapsetnameditemns10",
             "namednodemapsetnameditemns11", "namespaceURI01", 
             "nodeissupported04", "nodenormalize01", "nodesetprefix04",
             "prefix08", "removeAttributeNS01", "removeAttributeNS02",
             "removeNamedItemNS03", "setAttributeNodeNS02", "setAttributeNS03",
             "setNamedItemNS04"];
--- a/dom/tests/mochitest/dom-level2-core/mochitest.ini
+++ b/dom/tests/mochitest/dom-level2-core/mochitest.ini
@@ -88,17 +88,16 @@ support-files =
 [test_documentimportnode14.html]
 [test_documentimportnode15.html]
 [test_documentimportnode17.html]
 [test_documentimportnode18.html]
 [test_documentimportnode19.html]
 [test_documentimportnode20.html]
 [test_documentimportnode21.html]
 [test_documentimportnode22.html]
-[test_documenttypeinternalSubset01.html]
 [test_documenttypepublicid01.html]
 [test_documenttypesystemid01.html]
 [test_domimplementationcreatedocument03.html]
 [test_domimplementationcreatedocument04.html]
 [test_domimplementationcreatedocument05.html]
 [test_domimplementationcreatedocument07.html]
 [test_domimplementationcreatedocumenttype01.html]
 [test_domimplementationcreatedocumenttype02.html]
@@ -187,17 +186,16 @@ support-files =
 [test_importNode10.html]
 [test_importNode11.html]
 [test_importNode12.html]
 [test_importNode13.html]
 [test_importNode14.html]
 [test_importNode15.html]
 [test_importNode16.html]
 [test_importNode17.html]
-[test_internalSubset01.html]
 [test_localName01.html]
 [test_localName02.html]
 [test_localName03.html]
 [test_localName04.html]
 [test_namednodemapgetnameditemns01.html]
 [test_namednodemapgetnameditemns02.html]
 [test_namednodemapgetnameditemns03.html]
 [test_namednodemapgetnameditemns04.html]
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-core/test_documenttypeinternalSubset01.html
+++ /dev/null
@@ -1,123 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/core/documenttypeinternalSubset01</title>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
-<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-<script type="text/javascript" src="DOMTestCase.js"></script>
-<script type="text/javascript" src="exclusions.js"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['documenttypeinternalSubset01'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "staffNS");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-  if (++docsLoaded == 1) {
-    setUpPageStatus = 'complete';
-    runJSUnitTests();
-    markTodos();
-    SimpleTest.finish();
-  }
-}
-
-var docName = 'documenttypeinternalSubset01';
-
-
-/**
-* 
-    The method getInternalSubset() returns the internal subset as a string. 
-  
-    Create a new DocumentType node with null values for publicId and systemId.
-    Verify that its internal subset is null.
-
-* @author IBM
-* @author Neil Delima
-* @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-Core-DocType-internalSubset
-* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=259
-*/
-function documenttypeinternalSubset01() {
-   var success;
-    if(checkInitialization(builder, "documenttypeinternalSubset01") != null) return;
-    var doc;
-      var docType;
-      var domImpl;
-      var internal;
-      var nullNS = null;
-
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "staffNS");
-      domImpl = doc.implementation;
-docType = domImpl.createDocumentType("l2:root",nullNS,nullNS);
-      internal = docType.internalSubset;
-
-      assertNull("internalSubsetNull",internal);
-    
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/core/documenttypeinternalSubset01</h2>
-<p></p>
-<p>
-Copyright (c) 2001-2004 World Wide Web Consortium, 
-(Massachusetts Institute of Technology, European Research Consortium 
-for Informatics and Mathematics, Keio University). All 
-Rights Reserved. This work is distributed under the <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">W3C(r) Software License</a> in the 
-hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
-</p>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/dom-level2-core/test_internalSubset01.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>http://www.w3.org/2001/DOM-Test-Suite/level2/core/internalSubset01</title>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
-<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-<script type="text/javascript" src="DOMTestCase.js"></script>
-<script type="text/javascript" src="exclusions.js"></script>
-<script type="text/javascript">
-// expose test function names
-function exposeTestFunctionNames()
-{
-return ['internalSubset01'];
-}
-
-var docsLoaded = -1000000;
-var builder = null;
-
-//
-//   This function is called by the testing framework before
-//      running the test suite.
-//
-//   If there are no configuration exceptions, asynchronous
-//        document loading is started.  Otherwise, the status
-//        is set to complete and the exception is immediately
-//        raised when entering the body of the test.
-//
-function setUpPage() {
-   setUpPageStatus = 'running';
-   try {
-     //
-     //   creates test document builder, may throw exception
-     //
-     builder = createConfiguredBuilder();
-
-      docsLoaded = 0;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      docsLoaded += preload(docRef, "doc", "staff2");
-        
-       if (docsLoaded == 1) {
-          setUpPage = 'complete';
-       }
-    } catch(ex) {
-    	catchInitializationError(builder, ex);
-        setUpPage = 'complete';
-    }
-}
-
-//
-//   This method is called on the completion of 
-//      each asychronous load started in setUpTests.
-//
-//   When every synchronous loaded document has completed,
-//      the page status is changed which allows the
-//      body of the test to be executed.
-function loadComplete() {
-  if (++docsLoaded == 1) {
-    setUpPageStatus = 'complete';
-    runJSUnitTests();
-    markTodos();
-    SimpleTest.finish();
-  }
-}
-
-var docName = 'internalSubset01';
-
-
-/**
-* 
-    The "getInternalSubset()" method returns 
-   the internal subset as a string or null if there is none.
-   This does not contain the delimiting brackets.
-   
-   Retrieve the documenttype.
-   Apply the "getInternalSubset()" method.  Null is returned since there 
-   is not an internal subset.
-
-* @author NIST
-* @author Mary Brady
-* @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-Core-DocType-internalSubset
-*/
-function internalSubset01() {
-   var success;
-    if(checkInitialization(builder, "internalSubset01") != null) return;
-    var doc;
-      var docType;
-      var internal;
-      
-      var docRef = null;
-      if (typeof(this.doc) != 'undefined') {
-        docRef = this.doc;
-      }
-      doc = load(docRef, "doc", "staff2");
-      docType = doc.doctype;
-
-      internal = docType.internalSubset;
-
-      assertNull("internalSubsetNull",internal);
-    
-}
-
-</script>
-</head>
-<body>
-<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/core/internalSubset01</h2>
-<p></p>
-<p>
-Copyright (c) 2001-2004 World Wide Web Consortium, 
-(Massachusetts Institute of Technology, European Research Consortium 
-for Informatics and Mathematics, Keio University). All 
-Rights Reserved. This work is distributed under the <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">W3C(r) Software License</a> in the 
-hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
-</p>
-</body>
-</html>
--- a/dom/webidl/DocumentType.webidl
+++ b/dom/webidl/DocumentType.webidl
@@ -9,14 +9,11 @@
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 interface DocumentType : Node {
   readonly attribute DOMString name;
   readonly attribute DOMString publicId;
   readonly attribute DOMString systemId;
-
-  // Mozilla extension
-  readonly attribute DOMString? internalSubset;
 };
 
 DocumentType implements ChildNode;
--- a/testing/web-platform/meta/dom/historical.html.ini
+++ b/testing/web-platform/meta/dom/historical.html.ini
@@ -4,19 +4,16 @@
     expected: FAIL
 
   [Historical DOM features must be removed: DOMError]
     expected: FAIL
 
   [Historical DOM features must be removed: createCDATASection]
     expected: FAIL
 
-  [DocumentType member must be nuked: internalSubset]
-    expected: FAIL
-
   [Node member must be nuked: namespaceURI]
     expected: FAIL
 
   [Node member must be nuked: prefix]
     expected: FAIL
 
   [Node member must be nuked: localName]
     expected: FAIL