From 737dbdb1a5f785441caa6c51614e387a03ad3898 Mon Sep 17 00:00:00 2001 From: Ronald Brill Date: Tue, 15 Oct 2024 09:50:54 +0200 Subject: [PATCH] special handling of the bgsound tag in FF removed. BGSound is now handled as unknown tag in all browsers. Looks like this was a leftover from the IE days. --- src/changes/changes.xml | 4 ++ .../org/htmlunit/BrowserVersionFeatures.java | 4 -- .../htmlunit/html/DefaultElementFactory.java | 6 +-- .../JavaScriptConfiguration.java | 3 +- .../javascript/host/xml/XMLSerializer.java | 1 - .../general/ElementOwnPropertiesTest.java | 43 ------------------- 6 files changed, 6 insertions(+), 55 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 9de5257384..18b2a9ccb0 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -8,6 +8,10 @@ + + Special handling of the bgsound tag in FF removed. BGSound is now handled as unknown tag in all browsers. + Looks like this was a leftover from the IE days. + Function initHashChangeEvent() is no longer available in FF_ESR. diff --git a/src/main/java/org/htmlunit/BrowserVersionFeatures.java b/src/main/java/org/htmlunit/BrowserVersionFeatures.java index cf5d097df0..26aed9de08 100644 --- a/src/main/java/org/htmlunit/BrowserVersionFeatures.java +++ b/src/main/java/org/htmlunit/BrowserVersionFeatures.java @@ -237,10 +237,6 @@ public enum BrowserVersionFeatures { @BrowserFeature({CHROME, EDGE}) JS_AUDIO_PROCESSING_EVENT_CTOR, - /** HTMLBGSoundElement reported as HTMLUnknownElement. */ - @BrowserFeature({FF, FF_ESR}) - JS_BGSOUND_AS_UNKNOWN, - /** toDataURL for canvas returns the CHROME version of the PNG. */ @BrowserFeature({CHROME, EDGE}) JS_CANVAS_DATA_URL_CHROME_PNG, diff --git a/src/main/java/org/htmlunit/html/DefaultElementFactory.java b/src/main/java/org/htmlunit/html/DefaultElementFactory.java index 34219b090b..d374dabf65 100644 --- a/src/main/java/org/htmlunit/html/DefaultElementFactory.java +++ b/src/main/java/org/htmlunit/html/DefaultElementFactory.java @@ -62,7 +62,7 @@ public class DefaultElementFactory implements ElementFactory { KEYGEN_, HtmlAbbreviated.TAG_NAME, HtmlAcronym.TAG_NAME, HtmlAnchor.TAG_NAME, HtmlAddress.TAG_NAME, HtmlArea.TAG_NAME, HtmlArticle.TAG_NAME, HtmlAside.TAG_NAME, HtmlAudio.TAG_NAME, - HtmlBackgroundSound.TAG_NAME, HtmlBase.TAG_NAME, HtmlBaseFont.TAG_NAME, + HtmlBase.TAG_NAME, HtmlBaseFont.TAG_NAME, HtmlBidirectionalIsolation.TAG_NAME, HtmlBidirectionalOverride.TAG_NAME, HtmlBig.TAG_NAME, HtmlBlink.TAG_NAME, HtmlBlockQuote.TAG_NAME, HtmlBody.TAG_NAME, HtmlBold.TAG_NAME, HtmlBreak.TAG_NAME, HtmlButton.TAG_NAME, HtmlCanvas.TAG_NAME, HtmlCaption.TAG_NAME, @@ -197,10 +197,6 @@ public HtmlElement createElementNS(final SgmlPage page, final String namespaceUR element = new HtmlAudio(qualifiedName, page, attributeMap); break; - case HtmlBackgroundSound.TAG_NAME: - element = new HtmlBackgroundSound(qualifiedName, page, attributeMap); - break; - case HtmlBase.TAG_NAME: element = new HtmlBase(qualifiedName, page, attributeMap); break; diff --git a/src/main/java/org/htmlunit/javascript/configuration/JavaScriptConfiguration.java b/src/main/java/org/htmlunit/javascript/configuration/JavaScriptConfiguration.java index 5eed017dca..4bc44605c8 100644 --- a/src/main/java/org/htmlunit/javascript/configuration/JavaScriptConfiguration.java +++ b/src/main/java/org/htmlunit/javascript/configuration/JavaScriptConfiguration.java @@ -247,7 +247,6 @@ import org.htmlunit.javascript.host.html.HTMLAnchorElement; import org.htmlunit.javascript.host.html.HTMLAreaElement; import org.htmlunit.javascript.host.html.HTMLAudioElement; -import org.htmlunit.javascript.host.html.HTMLBGSoundElement; import org.htmlunit.javascript.host.html.HTMLBRElement; import org.htmlunit.javascript.host.html.HTMLBaseElement; import org.htmlunit.javascript.host.html.HTMLBodyElement; @@ -590,7 +589,7 @@ public final class JavaScriptConfiguration extends AbstractJavaScriptConfigurati Geolocation.class, GeolocationCoordinates.class, GeolocationPosition.class, GeolocationPositionError.class, HashChangeEvent.class, Headers.class, History.class, HTMLAllCollection.class, HTMLAnchorElement.class, HTMLAreaElement.class, HTMLAudioElement.class, - HTMLBaseElement.class, HTMLBGSoundElement.class, + HTMLBaseElement.class, HTMLBodyElement.class, HTMLBRElement.class, HTMLButtonElement.class, HTMLCanvasElement.class, HTMLCollection.class, HTMLDataElement.class, HTMLDataListElement.class, diff --git a/src/main/java/org/htmlunit/javascript/host/xml/XMLSerializer.java b/src/main/java/org/htmlunit/javascript/host/xml/XMLSerializer.java index 1f3c5b35c5..d84ff8b901 100644 --- a/src/main/java/org/htmlunit/javascript/host/xml/XMLSerializer.java +++ b/src/main/java/org/htmlunit/javascript/host/xml/XMLSerializer.java @@ -47,7 +47,6 @@ public class XMLSerializer extends HtmlUnitScriptable { private static final Set NON_EMPTY_TAGS = new HashSet<>(Arrays.asList( HtmlAbbreviated.TAG_NAME, HtmlAcronym.TAG_NAME, HtmlAnchor.TAG_NAME, HtmlAddress.TAG_NAME, HtmlAudio.TAG_NAME, - HtmlBackgroundSound.TAG_NAME, HtmlBidirectionalOverride.TAG_NAME, HtmlBig.TAG_NAME, HtmlBlink.TAG_NAME, HtmlBlockQuote.TAG_NAME, HtmlBody.TAG_NAME, HtmlBold.TAG_NAME, HtmlButton.TAG_NAME, HtmlCanvas.TAG_NAME, HtmlCaption.TAG_NAME, diff --git a/src/test/java/org/htmlunit/general/ElementOwnPropertiesTest.java b/src/test/java/org/htmlunit/general/ElementOwnPropertiesTest.java index 3fc733c1e5..9f230333b2 100644 --- a/src/test/java/org/htmlunit/general/ElementOwnPropertiesTest.java +++ b/src/test/java/org/htmlunit/general/ElementOwnPropertiesTest.java @@ -2331,49 +2331,6 @@ public void audio() throws Exception { EDGE = "constructor()", FF = "constructor()", FF_ESR = "constructor()") - @HtmlUnitNYI(FF = "accessKey[GSCE],autofocus[GSCE]," - + "blur(),click(),constructor(),contentEditable[GSCE],dataset[GCE],dir[GSCE]," - + "enterKeyHint[GSCE],focus(),hidden[GSCE],innerText[GSCE],isContentEditable[GCE],lang[GSCE]," - + "offsetHeight[GCE],offsetLeft[GCE],offsetParent[GCE],offsetTop[GCE],offsetWidth[GCE]," - + "onabort[GSCE],onanimationcancel[GSCE],onanimationend[GSCE],onanimationiteration[GSCE]," - + "onanimationstart[GSCE],onblur[GSCE],oncanplay[GSCE],oncanplaythrough[GSCE],onchange[GSCE]," - + "onclick[GSCE],onclose[GSCE],oncontextmenu[GSCE],oncopy[GSCE],oncuechange[GSCE],oncut[GSCE]," - + "ondblclick[GSCE],ondrag[GSCE],ondragend[GSCE],ondragenter[GSCE],ondragleave[GSCE],ondragover[GSCE]," - + "ondragstart[GSCE],ondrop[GSCE],ondurationchange[GSCE],onemptied[GSCE],onended[GSCE],onerror[GSCE]," - + "onfocus[GSCE],ongotpointercapture[GSCE],oninput[GSCE],oninvalid[GSCE],onkeydown[GSCE]," - + "onkeypress[GSCE],onkeyup[GSCE],onload[GSCE],onloadeddata[GSCE],onloadedmetadata[GSCE]," - + "onloadstart[GSCE],onmousedown[GSCE],onmouseenter[GSCE],onmouseleave[GSCE],onmousemove[GSCE]," - + "onmouseout[GSCE],onmouseover[GSCE],onmouseup[GSCE],onmozfullscreenchange[GSCE]," - + "onmozfullscreenerror[GSCE],onpaste[GSCE],onpause[GSCE],onplay[GSCE],onplaying[GSCE]," - + "onpointercancel[GSCE],onpointerdown[GSCE],onpointerenter[GSCE],onpointerleave[GSCE]," - + "onpointermove[GSCE],onpointerout[GSCE],onpointerover[GSCE],onpointerup[GSCE],onprogress[GSCE]," - + "onratechange[GSCE],onreset[GSCE],onresize[GSCE],onscroll[GSCE],onscrollend[GSCE]," - + "onseeked[GSCE],onseeking[GSCE]," - + "onselect[GSCE],onselectionchange[GSCE],onselectstart[GSCE],onstalled[GSCE],onsubmit[GSCE]," - + "onsuspend[GSCE],ontimeupdate[GSCE],ontoggle[GSCE],ontransitioncancel[GSCE],ontransitionend[GSCE]," - + "ontransitionrun[GSCE],ontransitionstart[GSCE],onvolumechange[GSCE],onwaiting[GSCE],outerText[GSCE]," - + "spellcheck[GSCE],style[GSCE],tabIndex[GSCE],title[GSCE]", - FF_ESR = "accessKey[GSCE],autofocus[GSCE]," - + "blur(),click(),constructor(),contentEditable[GSCE],dataset[GCE],dir[GSCE]," - + "enterKeyHint[GSCE],focus(),hidden[GSCE],innerText[GSCE],isContentEditable[GCE],lang[GSCE]," - + "offsetHeight[GCE],offsetLeft[GCE],offsetParent[GCE],offsetTop[GCE],offsetWidth[GCE]," - + "onabort[GSCE],onanimationcancel[GSCE],onanimationend[GSCE],onanimationiteration[GSCE]," - + "onanimationstart[GSCE],onblur[GSCE],oncanplay[GSCE],oncanplaythrough[GSCE],onchange[GSCE]," - + "onclick[GSCE],onclose[GSCE],oncontextmenu[GSCE],oncopy[GSCE],oncuechange[GSCE],oncut[GSCE]," - + "ondblclick[GSCE],ondrag[GSCE],ondragend[GSCE],ondragenter[GSCE],ondragleave[GSCE],ondragover[GSCE]," - + "ondragstart[GSCE],ondrop[GSCE],ondurationchange[GSCE],onemptied[GSCE],onended[GSCE],onerror[GSCE]," - + "onfocus[GSCE],ongotpointercapture[GSCE],oninput[GSCE],oninvalid[GSCE],onkeydown[GSCE]," - + "onkeypress[GSCE],onkeyup[GSCE],onload[GSCE],onloadeddata[GSCE],onloadedmetadata[GSCE]," - + "onloadstart[GSCE],onmousedown[GSCE],onmouseenter[GSCE],onmouseleave[GSCE],onmousemove[GSCE]," - + "onmouseout[GSCE],onmouseover[GSCE],onmouseup[GSCE],onmozfullscreenchange[GSCE]," - + "onmozfullscreenerror[GSCE],onpaste[GSCE],onpause[GSCE],onplay[GSCE],onplaying[GSCE]," - + "onpointercancel[GSCE],onpointerdown[GSCE],onpointerenter[GSCE],onpointerleave[GSCE]," - + "onpointermove[GSCE],onpointerout[GSCE],onpointerover[GSCE],onpointerup[GSCE],onprogress[GSCE]," - + "onratechange[GSCE],onreset[GSCE],onresize[GSCE],onscroll[GSCE],onseeked[GSCE],onseeking[GSCE]," - + "onselect[GSCE],onselectionchange[GSCE],onselectstart[GSCE],onstalled[GSCE],onsubmit[GSCE]," - + "onsuspend[GSCE],ontimeupdate[GSCE],ontoggle[GSCE],ontransitioncancel[GSCE],ontransitionend[GSCE]," - + "ontransitionrun[GSCE],ontransitionstart[GSCE],onvolumechange[GSCE],onwaiting[GSCE],outerText[GSCE]," - + "spellcheck[GSCE],style[GSCE],tabIndex[GSCE],title[GSCE]") public void bgsound() throws Exception { test("bgsound"); }