From f828451e5f9b4fe63545485dcb97f7e3e4a425b2 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Mon, 1 Jun 2020 14:16:06 +0200 Subject: Issue #1525 - Kill marquee element * Remove marquee code * Regenerate HTML Elements/parser code for Removal of Marquee. Co-authored-by: Gaming4JC --- .../mozlog/mozlog/formatters/html/xmlgen.py | 2 +- .../tests/dom/nodes/Node-cloneNode.html | 1 - .../tests/tools/html5lib/html5lib/constants.py | 2 - .../tests/tools/html5lib/html5lib/html5parser.py | 20 -- .../tests/testdata/tree-construction/tests1.dat | 280 --------------------- .../tests/testdata/tree-construction/tests19.dat | 12 - .../tools/html5lib/html5lib/treebuilders/_base.py | 4 +- testing/web-platform/tests/tools/py/py/_xmlgen.py | 2 +- 8 files changed, 4 insertions(+), 319 deletions(-) (limited to 'testing') diff --git a/testing/mozbase/mozlog/mozlog/formatters/html/xmlgen.py b/testing/mozbase/mozlog/mozlog/formatters/html/xmlgen.py index e545e9a7d..e5998cda3 100644 --- a/testing/mozbase/mozlog/mozlog/formatters/html/xmlgen.py +++ b/testing/mozbase/mozlog/mozlog/formatters/html/xmlgen.py @@ -106,7 +106,7 @@ class html(Namespace): 'colgroup,comment,dd,del,dfn,dir,div,dl,dt,em,embed,' 'fieldset,font,form,frameset,h1,h2,h3,h4,h5,h6,head,html,' 'i,iframe,img,input,ins,kbd,label,legend,li,link,listing,' - 'map,marquee,menu,meta,multicol,nobr,noembed,noframes,' + 'map,menu,meta,multicol,nobr,noembed,noframes,' 'noscript,object,ol,optgroup,option,p,pre,q,s,script,' 'select,small,span,strike,strong,style,sub,sup,table,' 'tbody,td,textarea,tfoot,th,thead,title,tr,tt,u,ul,xmp,' diff --git a/testing/web-platform/tests/dom/nodes/Node-cloneNode.html b/testing/web-platform/tests/dom/nodes/Node-cloneNode.html index 9fb939f7e..644a614fb 100644 --- a/testing/web-platform/tests/dom/nodes/Node-cloneNode.html +++ b/testing/web-platform/tests/dom/nodes/Node-cloneNode.html @@ -115,7 +115,6 @@ test(function() { create_element_and_check("main", HTMLElement); create_element_and_check("map", HTMLMapElement); create_element_and_check("mark", HTMLElement); - create_element_and_check("marquee", HTMLElement); create_element_and_check("meta", HTMLMetaElement); create_element_and_check("meter", HTMLMeterElement); create_element_and_check("nav", HTMLElement); diff --git a/testing/web-platform/tests/tools/html5lib/html5lib/constants.py b/testing/web-platform/tests/tools/html5lib/html5lib/constants.py index e7089846d..a1f601b40 100644 --- a/testing/web-platform/tests/tools/html5lib/html5lib/constants.py +++ b/testing/web-platform/tests/tools/html5lib/html5lib/constants.py @@ -302,7 +302,6 @@ scopingElements = frozenset(( (namespaces["html"], "applet"), (namespaces["html"], "caption"), (namespaces["html"], "html"), - (namespaces["html"], "marquee"), (namespaces["html"], "object"), (namespaces["html"], "table"), (namespaces["html"], "td"), @@ -386,7 +385,6 @@ specialElements = frozenset(( (namespaces["html"], "li"), (namespaces["html"], "link"), (namespaces["html"], "listing"), - (namespaces["html"], "marquee"), (namespaces["html"], "menu"), (namespaces["html"], "meta"), (namespaces["html"], "nav"), diff --git a/testing/web-platform/tests/tools/html5lib/html5lib/html5parser.py b/testing/web-platform/tests/tools/html5lib/html5lib/html5parser.py index 5b9ce7d72..0fdba6c89 100644 --- a/testing/web-platform/tests/tools/html5lib/html5lib/html5parser.py +++ b/testing/web-platform/tests/tools/html5lib/html5lib/html5parser.py @@ -898,7 +898,6 @@ def getPhases(debug): "strong", "tt", "u"), self.startTagFormatting), ("nobr", self.startTagNobr), ("button", self.startTagButton), - (("applet", "marquee", "object"), self.startTagAppletMarqueeObject), ("xmp", self.startTagXmp), ("table", self.startTagTable), (("area", "br", "embed", "img", "keygen", "wbr"), @@ -935,7 +934,6 @@ def getPhases(debug): (headingElements, self.endTagHeading), (("a", "b", "big", "code", "em", "font", "i", "nobr", "s", "small", "strike", "strong", "tt", "u"), self.endTagFormatting), - (("applet", "marquee", "object"), self.endTagAppletMarqueeObject), ("br", self.endTagBr), ]) self.endTagHandler.default = self.endTagOther @@ -1133,12 +1131,6 @@ def getPhases(debug): self.tree.insertElement(token) self.parser.framesetOK = False - def startTagAppletMarqueeObject(self, token): - self.tree.reconstructActiveFormattingElements() - self.tree.insertElement(token) - self.tree.activeFormattingElements.append(Marker) - self.parser.framesetOK = False - def startTagXmp(self, token): if self.tree.elementInScope("p", variant="button"): self.endTagP(impliedTagToken("p")) @@ -1558,18 +1550,6 @@ def getPhases(debug): self.tree.openElements.insert( self.tree.openElements.index(furthestBlock) + 1, clone) - def endTagAppletMarqueeObject(self, token): - if self.tree.elementInScope(token["name"]): - self.tree.generateImpliedEndTags() - if self.tree.openElements[-1].name != token["name"]: - self.parser.parseError("end-tag-too-early", {"name": token["name"]}) - - if self.tree.elementInScope(token["name"]): - element = self.tree.openElements.pop() - while element.name != token["name"]: - element = self.tree.openElements.pop() - self.tree.clearActiveFormattingElements() - def endTagBr(self, token): self.parser.parseError("unexpected-end-tag-treated-as", {"originalName": "br", "newName": "br element"}) diff --git a/testing/web-platform/tests/tools/html5lib/html5lib/tests/testdata/tree-construction/tests1.dat b/testing/web-platform/tests/tools/html5lib/html5lib/tests/testdata/tree-construction/tests1.dat index d6726e305..cc65fd2fa 100644 --- a/testing/web-platform/tests/tools/html5lib/html5lib/tests/testdata/tree-construction/tests1.dat +++ b/testing/web-platform/tests/tools/html5lib/html5lib/tests/testdata/tree-construction/tests1.dat @@ -283,27 +283,6 @@ Line1
Line2
Line3
Line4 |