@@ -872,3 +872,3 @@ "use strict"; | ||
| return getComputedStyleDeclaration(elementImpl); | ||
| return idlUtils.wrapperForImpl(getComputedStyleDeclaration(elementImpl)); | ||
| }; | ||
@@ -875,0 +875,0 @@ |
@@ -258,2 +258,5 @@ "use strict"; | ||
| const obj = border.parse(shorthandValue); | ||
| if (typeof obj !== "object") { | ||
| return false; | ||
| } | ||
| if (Object.hasOwn(obj, property)) { | ||
@@ -281,2 +284,5 @@ return value === obj[property]; | ||
| }; | ||
| if (shorthandObj && typeof shorthandObj !== "object") { | ||
| return ""; | ||
| } | ||
| const keys = border.shorthandFor.keys(); | ||
@@ -553,3 +559,7 @@ for (const key of keys) { | ||
| if (lineItem.value) { | ||
| lineItem.value = replacePositionValue(propertyValue, splitValue(lineItem.value), prop2); | ||
| if (isGlobalKeyword(lineItem.value)) { | ||
| lineItem.value = ""; | ||
| } else { | ||
| lineItem.value = replacePositionValue(propertyValue, splitValue(lineItem.value), prop2); | ||
| } | ||
| } | ||
@@ -813,7 +823,19 @@ if (positionItem.value && !matchesBorderShorthandValue(lineProperty, propertyValue, positionItem.value)) { | ||
| if (line === WIDTH && lineWidthItem.value) { | ||
| lineWidthItem.value = replacePositionValue(itemValue, splitValue(lineWidthItem.value), prop2); | ||
| if (isGlobalKeyword(lineWidthItem.value)) { | ||
| lineWidthItem.value = ""; | ||
| } else { | ||
| lineWidthItem.value = replacePositionValue(itemValue, splitValue(lineWidthItem.value), prop2); | ||
| } | ||
| } else if (line === STYLE && lineStyleItem.value) { | ||
| lineStyleItem.value = replacePositionValue(itemValue, splitValue(lineStyleItem.value), prop2); | ||
| if (isGlobalKeyword(lineStyleItem.value)) { | ||
| lineStyleItem.value = ""; | ||
| } else { | ||
| lineStyleItem.value = replacePositionValue(itemValue, splitValue(lineStyleItem.value), prop2); | ||
| } | ||
| } else if (line === COLOR && lineColorItem.value) { | ||
| lineColorItem.value = replacePositionValue(itemValue, splitValue(lineColorItem.value), prop2); | ||
| if (isGlobalKeyword(lineColorItem.value)) { | ||
| lineColorItem.value = ""; | ||
| } else { | ||
| lineColorItem.value = replacePositionValue(itemValue, splitValue(lineColorItem.value), prop2); | ||
| } | ||
| } | ||
@@ -1220,2 +1242,6 @@ longhandItem.value = itemValue; | ||
| const { value, priority } = item; | ||
| if (isGlobalKeyword(value)) { | ||
| longhandProperties.set(property, createPropertyItem(property, value, priority)); | ||
| continue; | ||
| } | ||
| if (property === border.property) { | ||
@@ -1371,6 +1397,5 @@ const lineItems = border.parse(value); | ||
| const { value: shorthandValue, priority: shorthandPriority } = properties.get(background.property); | ||
| if ((!shorthandPriority || priority) && !hasVarFunc(shorthandValue)) { | ||
| if ((!shorthandPriority || priority) && !hasVarFunc(shorthandValue) && !isGlobalKeyword(shorthandValue)) { | ||
| const replacedShorthandValue = replaceBackgroundShorthand(property, parsedProperties); | ||
| properties.delete(background.property); | ||
| properties.set( | ||
| parsedProperties.set( | ||
| background.property, | ||
@@ -1377,0 +1402,0 @@ createPropertyItem(background.property, replacedShorthandValue, shorthandPriority) |
@@ -47,2 +47,9 @@ "use strict"; | ||
| const bgValues = parse(v); | ||
| if (typeof bgValues === "string") { | ||
| for (const [key] of shorthandFor) { | ||
| this._setProperty(key, bgValues); | ||
| } | ||
| this._setProperty(property, bgValues); | ||
| return; | ||
| } | ||
| if (!Array.isArray(bgValues)) { | ||
@@ -100,2 +107,10 @@ return; | ||
| } | ||
| if (parsers.isGlobalKeyword(v)) { | ||
| for (const [longhand] of shorthandFor) { | ||
| if (this.getPropertyValue(longhand) !== v) { | ||
| return ""; | ||
| } | ||
| } | ||
| return v; | ||
| } | ||
| const bgMap = new Map(); | ||
@@ -198,3 +213,3 @@ let l = 0; | ||
| function parse(v) { | ||
| if (v === "") { | ||
| if (v === "" || parsers.isGlobalKeyword(v)) { | ||
| return v; | ||
@@ -201,0 +216,0 @@ } else if (parsers.hasCalcFunc(v)) { |
+4
-5
| { | ||
| "name": "jsdom", | ||
| "version": "29.0.0", | ||
| "version": "29.0.1", | ||
| "description": "A JavaScript implementation of many web standards", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
| "@asamuzakjp/css-color": "^5.0.1", | ||
| "@asamuzakjp/dom-selector": "^7.0.2", | ||
| "@asamuzakjp/dom-selector": "^7.0.3", | ||
| "@bramus/specificity": "^2.4.2", | ||
@@ -42,3 +42,3 @@ "@csstools/css-syntax-patches-for-csstree": "^1.1.1", | ||
| "tough-cookie": "^6.0.1", | ||
| "undici": "^7.24.3", | ||
| "undici": "^7.24.5", | ||
| "w3c-xmlserializer": "^5.0.0", | ||
@@ -61,3 +61,3 @@ "webidl-conversions": "^8.0.1", | ||
| "@stylistic/eslint-plugin": "^5.10.0", | ||
| "@webref/css": "^8.3.0", | ||
| "@webref/css": "^8.5.0", | ||
| "eslint": "^10.0.3", | ||
@@ -98,3 +98,2 @@ "eslint-plugin-html": "^8.1.4", | ||
| "wpt:update": "git submodule update --init --recursive --remote && cd test/web-platform-tests/tests && python wpt.py manifest --path ../wpt-manifest.json", | ||
| "update-authors": "git log --format=\"%aN <%aE>\" | sort -f | uniq > AUTHORS.txt", | ||
| "benchmark": "node ./benchmark/runner" | ||
@@ -101,0 +100,0 @@ }, |
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
6928791
0.03%176693
0.04%Updated