Skip to content

Commit

Permalink
next round to remove the 'keygen' tag support
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Oct 19, 2024
1 parent 77612e6 commit d2e23ab
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
16 changes: 11 additions & 5 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,22 @@
<body>
<release version="4.5.0" date="xxxx, 2024" description="Chrome/Edge 129, Firefox 131, FirefoxESR 128, WebWorker, Bugfixes">
<action type="update" dev="rbri">
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.
INCOMPATIBLE CHANGE: Return type of AbstractCssStyleDeclaration.item(int) has changed from Object to String.
</action>
<action type="fix" dev="rbri">
Next round to remove the 'keygen' tag support.
</action>
<action type="update" dev="rbri">
Small performance and memory optimization for the creation of our DOM tree.
</action>
<action type="fix" dev="rbri" issue="#882">
AbstractDomNodeList access might throw a NPE due to a race condition in the DomHtmlAttributeChangeListenerImpl
clearing of cachedElements processing.
</action>
<action type="update" dev="rbri">
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.
</action>
<action type="fix" dev="rbri">
Function initHashChangeEvent() is no longer available in FF_ESR.
</action>
Expand All @@ -26,9 +35,6 @@
<action type="update" dev="rbri">
Property window.clientInformation is settable in FF too.
</action>
<action type="update" dev="rbri">
INCOMPATIBLE CHANGE: Return type of AbstractCssStyleDeclaration.item(int) has changed from Object to String.
</action>
<action type="update" dev="rbri">
The WebSocket ctor in FF_ESR now accepts also undefined/null.
</action>
Expand Down
8 changes: 1 addition & 7 deletions src/main/java/org/htmlunit/html/DefaultElementFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,11 @@ static final class OrderedFastHashMapWithLowercaseKeys<K, V> extends OrderedFast
/** Logging support. */
private static final Log LOG = LogFactory.getLog(DefaultElementFactory.class);

private static final String KEYGEN_ = "keygen";

/**
* You can generate your own test cases by looking into ElementTestSource.generateTestForHtmlElements.
*/
public static final List<String> SUPPORTED_TAGS_ = Collections.unmodifiableList(Arrays.asList(
KEYGEN_, HtmlAbbreviated.TAG_NAME, HtmlAcronym.TAG_NAME,
HtmlAbbreviated.TAG_NAME, HtmlAcronym.TAG_NAME,
HtmlAnchor.TAG_NAME, HtmlAddress.TAG_NAME, HtmlArea.TAG_NAME,
HtmlArticle.TAG_NAME, HtmlAside.TAG_NAME, HtmlAudio.TAG_NAME,
HtmlBase.TAG_NAME, HtmlBaseFont.TAG_NAME,
Expand Down Expand Up @@ -168,10 +166,6 @@ public HtmlElement createElementNS(final SgmlPage page, final String namespaceUR

boolean doBrowserCompatibilityCheck = checkBrowserCompatibility;
switch (tagName) {
case KEYGEN_:
element = new HtmlUnknownElement(page, qualifiedName, attributeMap);
break;

case HtmlAbbreviated.TAG_NAME:
element = new HtmlAbbreviated(qualifiedName, page, attributeMap);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ public void setDomNode(final DomNode domNode) {
final String name = domNode.getLocalName();
if ("wbr".equalsIgnoreCase(name)
|| "basefont".equalsIgnoreCase(name)
|| "keygen".equalsIgnoreCase(name)
|| "track".equalsIgnoreCase(name)) {
endTagForbidden_ = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public void setDomNode(final DomNode domNode) {
if (browser.hasFeature(HTMLBASEFONT_END_TAG_FORBIDDEN)) {
switch (StringUtils.toRootLowerCase(domNode.getLocalName())) {
case "basefont":
case "keygen":
endTagForbidden_ = true;
break;
default:
Expand Down
1 change: 0 additions & 1 deletion src/test/java/org/htmlunit/html/AttributesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ public static Test suite() throws Exception {
}
}

supportedTags.remove("keygen");
supportedTags.remove("input");

if (!supportedTags.isEmpty()) {
Expand Down

0 comments on commit d2e23ab

Please sign in to comment.