Skip to content

Commit

Permalink
Chrome/Edge 131 (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Nov 17, 2024
1 parent fa114df commit 4b7e4ff
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
9 changes: 9 additions & 0 deletions src/main/java/org/htmlunit/javascript/host/css/CSSRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
*/
package org.htmlunit.javascript.host.css;

import static org.htmlunit.javascript.configuration.SupportedBrowser.CHROME;
import static org.htmlunit.javascript.configuration.SupportedBrowser.EDGE;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.htmlunit.cssparser.dom.AbstractCSSRuleImpl;
Expand Down Expand Up @@ -98,6 +101,12 @@ public class CSSRule extends HtmlUnitScriptable {
@JsxConstant
public static final int KEYFRAME_RULE = 8;

/**
* The rule is a {@code CSSMerginRule}.
*/
@JsxConstant({CHROME, EDGE})
public static final int MARGIN_RULE = 9;

/**
* The rule is a {@code CSSNamespaceRule}.
*/
Expand Down
20 changes: 10 additions & 10 deletions src/test/java/org/htmlunit/general/ElementOwnPropertiesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ public void htmlElement() throws Exception {
+ "elementTiming[GSCE],firstElementChild[GCE],getAnimations(),getAttribute(),getAttributeNames(),"
+ "getAttributeNode(),getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),"
+ "getClientRects(),getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),"
+ "getHTML(),getInnerHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),hasPointerCapture(),"
+ "getHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),hasPointerCapture(),"
+ "id[GSCE],innerHTML[GSCE],insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),"
+ "lastElementChild[GCE],localName[GCE],matches(),namespaceURI[GCE],nextElementSibling[GCE],"
+ "onbeforecopy[GSCE],onbeforecut[GSCE],onbeforepaste[GSCE],onfullscreenchange[GSCE],"
Expand Down Expand Up @@ -555,7 +555,7 @@ public void htmlElement() throws Exception {
+ "elementTiming[GSCE],firstElementChild[GCE],getAnimations(),getAttribute(),getAttributeNames(),"
+ "getAttributeNode(),getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),"
+ "getClientRects(),getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),"
+ "getHTML(),getInnerHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),hasPointerCapture(),"
+ "getHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),hasPointerCapture(),"
+ "id[GSCE],innerHTML[GSCE],insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),"
+ "lastElementChild[GCE],localName[GCE],matches(),namespaceURI[GCE],nextElementSibling[GCE],"
+ "onbeforecopy[GSCE],onbeforecut[GSCE],onbeforepaste[GSCE],onfullscreenchange[GSCE],"
Expand Down Expand Up @@ -629,7 +629,7 @@ public void htmlElement() throws Exception {
+ "classList[GCE],className[GSCE],clientHeight[GCE],clientLeft[GCE],clientTop[GCE],"
+ "clientWidth[GCE],closest(),constructor(),firstElementChild[GCE],getAttribute(),getAttributeNode(),"
+ "getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),getClientRects(),"
+ "getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),getHTML(),getInnerHTML(),"
+ "getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),getHTML(),"
+ "hasAttribute(),hasAttributeNS(),hasAttributes(),id[GSCE],innerHTML[GSCE],insertAdjacentElement(),"
+ "insertAdjacentHTML(),insertAdjacentText(),lastElementChild[GCE],localName[GCE],matches(),"
+ "namespaceURI[GCE],nextElementSibling[GCE],onbeforecopy[GSCE],onbeforecut[GSCE],onbeforepaste[GSCE],"
Expand All @@ -644,7 +644,7 @@ public void htmlElement() throws Exception {
+ "classList[GCE],className[GSCE],clientHeight[GCE],clientLeft[GCE],clientTop[GCE],"
+ "clientWidth[GCE],closest(),constructor(),firstElementChild[GCE],getAttribute(),getAttributeNode(),"
+ "getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),getClientRects(),"
+ "getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),getHTML(),getInnerHTML(),"
+ "getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),getHTML(),"
+ "hasAttribute(),hasAttributeNS(),hasAttributes(),id[GSCE],innerHTML[GSCE],insertAdjacentElement(),"
+ "insertAdjacentHTML(),insertAdjacentText(),lastElementChild[GCE],localName[GCE],matches(),"
+ "namespaceURI[GCE],nextElementSibling[GCE],onbeforecopy[GSCE],onbeforecut[GSCE],onbeforepaste[GSCE],"
Expand Down Expand Up @@ -710,7 +710,7 @@ public void element() throws Exception {
+ "elementTiming[GSCE],firstElementChild[GCE],getAnimations(),getAttribute(),getAttributeNames(),"
+ "getAttributeNode(),getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),"
+ "getClientRects(),getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),"
+ "getHTML(),getInnerHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),hasPointerCapture(),"
+ "getHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),hasPointerCapture(),"
+ "id[GSCE],innerHTML[GSCE],insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),"
+ "lastElementChild[GCE],localName[GCE],matches(),namespaceURI[GCE],nextElementSibling[GCE],"
+ "onbeforecopy[GSCE],onbeforecut[GSCE],onbeforepaste[GSCE],onfullscreenchange[GSCE],"
Expand Down Expand Up @@ -740,7 +740,7 @@ public void element() throws Exception {
+ "elementTiming[GSCE],firstElementChild[GCE],getAnimations(),getAttribute(),getAttributeNames(),"
+ "getAttributeNode(),getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),"
+ "getClientRects(),getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),"
+ "getHTML(),getInnerHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),hasPointerCapture(),"
+ "getHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),hasPointerCapture(),"
+ "id[GSCE],innerHTML[GSCE],insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),"
+ "lastElementChild[GCE],localName[GCE],matches(),namespaceURI[GCE],nextElementSibling[GCE],"
+ "onbeforecopy[GSCE],onbeforecut[GSCE],onbeforepaste[GSCE],onfullscreenchange[GSCE],"
Expand Down Expand Up @@ -815,7 +815,7 @@ public void element() throws Exception {
+ "className[GSCE],clientHeight[GCE],clientLeft[GCE],clientTop[GCE],clientWidth[GCE],closest(),"
+ "constructor(),firstElementChild[GCE],getAttribute(),getAttributeNode(),getAttributeNodeNS(),"
+ "getAttributeNS(),getBoundingClientRect(),getClientRects(),getElementsByClassName(),"
+ "getElementsByTagName(),getElementsByTagNameNS(),getHTML(),getInnerHTML(),"
+ "getElementsByTagName(),getElementsByTagNameNS(),getHTML(),"
+ "hasAttribute(),hasAttributeNS(),"
+ "hasAttributes(),id[GSCE],innerHTML[GSCE],insertAdjacentElement(),insertAdjacentHTML(),"
+ "insertAdjacentText(),lastElementChild[GCE],localName[GCE],matches(),namespaceURI[GCE],"
Expand All @@ -833,7 +833,7 @@ public void element() throws Exception {
+ "className[GSCE],clientHeight[GCE],clientLeft[GCE],clientTop[GCE],clientWidth[GCE],closest(),"
+ "constructor(),firstElementChild[GCE],getAttribute(),getAttributeNode(),getAttributeNodeNS(),"
+ "getAttributeNS(),getBoundingClientRect(),getClientRects(),getElementsByClassName(),"
+ "getElementsByTagName(),getElementsByTagNameNS(),getHTML(),getInnerHTML(),"
+ "getElementsByTagName(),getElementsByTagNameNS(),getHTML(),"
+ "hasAttribute(),hasAttributeNS(),"
+ "hasAttributes(),id[GSCE],innerHTML[GSCE],insertAdjacentElement(),insertAdjacentHTML(),"
+ "insertAdjacentText(),lastElementChild[GCE],localName[GCE],matches(),namespaceURI[GCE],"
Expand Down Expand Up @@ -17868,12 +17868,12 @@ public void xmlHttpRequest() throws Exception {
*/
@Test
@Alerts(CHROME = "arrayBuffer(),blob(),body[GCE],bodyUsed[GCE],cache[GCE],clone(),constructor(),credentials[GCE],"
+ "destination[GCE],formData(),headers[GCE],integrity[GCE],isHistoryNavigation[GCE],json(),"
+ "destination[GCE],duplex[GCE],formData(),headers[GCE],integrity[GCE],isHistoryNavigation[GCE],json(),"
+ "keepalive[GCE],method[GCE],mode[GCE],redirect[GCE],referrer[GCE],referrerPolicy[GCE],signal[GCE],"
+ "targetAddressSpace[GCE],text(),"
+ "url[GCE]",
EDGE = "arrayBuffer(),blob(),body[GCE],bodyUsed[GCE],cache[GCE],clone(),constructor(),credentials[GCE],"
+ "destination[GCE],formData(),headers[GCE],integrity[GCE],isHistoryNavigation[GCE],json(),"
+ "destination[GCE],duplex[GCE],formData(),headers[GCE],integrity[GCE],isHistoryNavigation[GCE],json(),"
+ "keepalive[GCE],method[GCE],mode[GCE],redirect[GCE],referrer[GCE],referrerPolicy[GCE],signal[GCE],"
+ "targetAddressSpace[GCE],text(),"
+ "url[GCE]",
Expand Down
16 changes: 8 additions & 8 deletions src/test/java/org/htmlunit/general/ElementPropertiesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ public void htmlElement() throws Exception {
+ "firstElementChild,getAnimations(),getAttribute(),getAttributeNames(),getAttributeNode(),"
+ "getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),getClientRects(),"
+ "getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),getHTML(),"
+ "getInnerHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),hasPointerCapture(),id,innerHTML,"
+ "hasAttribute(),hasAttributeNS(),hasAttributes(),hasPointerCapture(),id,innerHTML,"
+ "insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),lastElementChild,localName,"
+ "matches(),namespaceURI,onbeforecopy,onbeforecut,onbeforepaste,onfullscreenchange,"
+ "onfullscreenerror,onsearch,onwebkitfullscreenchange,onwebkitfullscreenerror,outerHTML,part,"
Expand All @@ -665,7 +665,7 @@ public void htmlElement() throws Exception {
+ "firstElementChild,getAnimations(),getAttribute(),getAttributeNames(),getAttributeNode(),"
+ "getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),getClientRects(),"
+ "getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),getHTML(),"
+ "getInnerHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),hasPointerCapture(),id,innerHTML,"
+ "hasAttribute(),hasAttributeNS(),hasAttributes(),hasPointerCapture(),id,innerHTML,"
+ "insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),lastElementChild,localName,"
+ "matches(),namespaceURI,onbeforecopy,onbeforecut,onbeforepaste,onfullscreenchange,"
+ "onfullscreenerror,onsearch,onwebkitfullscreenchange,onwebkitfullscreenerror,outerHTML,part,"
Expand Down Expand Up @@ -725,7 +725,7 @@ public void htmlElement() throws Exception {
+ "clientWidth,closest(),firstElementChild,getAttribute(),getAttributeNode(),getAttributeNodeNS(),"
+ "getAttributeNS(),getBoundingClientRect(),getClientRects(),getElementsByClassName(),"
+ "getElementsByTagName(),getElementsByTagNameNS(),"
+ "getHTML(),getInnerHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),"
+ "getHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),"
+ "id,innerHTML,insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),lastElementChild,"
+ "localName,matches(),namespaceURI,onbeforecopy,onbeforecut,onbeforepaste,"
+ "onsearch,onwebkitfullscreenchange,onwebkitfullscreenerror,outerHTML,"
Expand All @@ -741,7 +741,7 @@ public void htmlElement() throws Exception {
+ "clientWidth,closest(),firstElementChild,getAttribute(),getAttributeNode(),getAttributeNodeNS(),"
+ "getAttributeNS(),getBoundingClientRect(),getClientRects(),getElementsByClassName(),"
+ "getElementsByTagName(),getElementsByTagNameNS(),"
+ "getHTML(),getInnerHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),"
+ "getHTML(),hasAttribute(),hasAttributeNS(),hasAttributes(),"
+ "id,innerHTML,insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),lastElementChild,"
+ "localName,matches(),namespaceURI,onbeforecopy,onbeforecut,onbeforepaste,"
+ "onsearch,onwebkitfullscreenchange,onwebkitfullscreenerror,outerHTML,"
Expand Down Expand Up @@ -801,7 +801,7 @@ public void element() throws Exception {
+ "clientTop,clientWidth,closest(),computedStyleMap(),currentCSSZoom,elementTiming,getAnimations(),"
+ "getAttribute(),getAttributeNames(),getAttributeNode(),getAttributeNodeNS(),getAttributeNS(),"
+ "getBoundingClientRect(),getClientRects(),getElementsByClassName(),getElementsByTagName(),"
+ "getElementsByTagNameNS(),getHTML(),getInnerHTML(),hasAttribute(),hasAttributeNS(),"
+ "getElementsByTagNameNS(),getHTML(),hasAttribute(),hasAttributeNS(),"
+ "hasAttributes(),hasPointerCapture(),id,innerHTML,insertAdjacentElement(),insertAdjacentHTML(),"
+ "insertAdjacentText(),localName,matches(),namespaceURI,nextElementSibling,onbeforecopy,"
+ "onbeforecut,onbeforepaste,onfullscreenchange,onfullscreenerror,onsearch,onwebkitfullscreenchange,"
Expand All @@ -823,7 +823,7 @@ public void element() throws Exception {
+ "clientTop,clientWidth,closest(),computedStyleMap(),currentCSSZoom,elementTiming,getAnimations(),"
+ "getAttribute(),getAttributeNames(),getAttributeNode(),getAttributeNodeNS(),getAttributeNS(),"
+ "getBoundingClientRect(),getClientRects(),getElementsByClassName(),getElementsByTagName(),"
+ "getElementsByTagNameNS(),getHTML(),getInnerHTML(),hasAttribute(),hasAttributeNS(),"
+ "getElementsByTagNameNS(),getHTML(),hasAttribute(),hasAttributeNS(),"
+ "hasAttributes(),hasPointerCapture(),id,innerHTML,insertAdjacentElement(),insertAdjacentHTML(),"
+ "insertAdjacentText(),localName,matches(),namespaceURI,nextElementSibling,onbeforecopy,"
+ "onbeforecut,onbeforepaste,onfullscreenchange,onfullscreenerror,onsearch,onwebkitfullscreenchange,"
Expand Down Expand Up @@ -881,7 +881,7 @@ public void element() throws Exception {
@HtmlUnitNYI(CHROME = "after(),attributes,before(),classList,className,clientHeight,clientLeft,clientTop,"
+ "clientWidth,closest(),getAttribute(),getAttributeNode(),getAttributeNodeNS(),getAttributeNS(),"
+ "getBoundingClientRect(),getClientRects(),getElementsByClassName(),getElementsByTagName(),"
+ "getElementsByTagNameNS(),getHTML(),getInnerHTML(),"
+ "getElementsByTagNameNS(),getHTML(),"
+ "hasAttribute(),hasAttributeNS(),hasAttributes(),id,innerHTML,"
+ "insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),localName,matches(),"
+ "namespaceURI,nextElementSibling,onbeforecopy,onbeforecut,onbeforepaste,"
Expand All @@ -894,7 +894,7 @@ public void element() throws Exception {
EDGE = "after(),attributes,before(),classList,className,clientHeight,clientLeft,clientTop,"
+ "clientWidth,closest(),getAttribute(),getAttributeNode(),getAttributeNodeNS(),getAttributeNS(),"
+ "getBoundingClientRect(),getClientRects(),getElementsByClassName(),getElementsByTagName(),"
+ "getElementsByTagNameNS(),getHTML(),getInnerHTML(),"
+ "getElementsByTagNameNS(),getHTML(),"
+ "hasAttribute(),hasAttributeNS(),hasAttributes(),id,innerHTML,"
+ "insertAdjacentElement(),insertAdjacentHTML(),insertAdjacentText(),localName,matches(),"
+ "namespaceURI,nextElementSibling,onbeforecopy,onbeforecut,onbeforepaste,"
Expand Down

0 comments on commit 4b7e4ff

Please sign in to comment.