@depup/jsdom 30.1.0-depup.2 → 30.1.1-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/changes.json +8 -8
- package/lib/api.js +79 -146
- package/lib/jsdom/browser/Window.js +18 -31
- package/lib/jsdom/browser/not-implemented.js +1 -1
- package/lib/jsdom/browser/resources/decompress-interceptor.js +2 -2
- package/lib/jsdom/browser/resources/jsdom-dispatcher.js +3 -3
- package/lib/jsdom/browser/resources/per-document-resource-loader.js +4 -6
- package/lib/jsdom/browser/resources/request-interceptor.js +1 -1
- package/lib/jsdom/living/crypto/Crypto-impl.js +1 -1
- package/lib/jsdom/living/css/CSSStyleDeclaration-impl.js +4 -21
- package/lib/jsdom/living/css/helpers/generic-property-descriptor.js +2 -3
- package/lib/jsdom/living/css/helpers/stylesheets.js +3 -3
- package/lib/jsdom/living/css/properties/background.js +4 -5
- package/lib/jsdom/living/css/properties/backgroundAttachment.js +2 -4
- package/lib/jsdom/living/css/properties/backgroundClip.js +2 -4
- package/lib/jsdom/living/css/properties/backgroundColor.js +2 -4
- package/lib/jsdom/living/css/properties/backgroundImage.js +2 -4
- package/lib/jsdom/living/css/properties/backgroundOrigin.js +2 -4
- package/lib/jsdom/living/css/properties/backgroundPosition.js +2 -6
- package/lib/jsdom/living/css/properties/backgroundPositionX.js +2 -4
- package/lib/jsdom/living/css/properties/backgroundPositionY.js +2 -4
- package/lib/jsdom/living/css/properties/backgroundRepeat.js +2 -4
- package/lib/jsdom/living/css/properties/backgroundSize.js +2 -4
- package/lib/jsdom/living/css/properties/border.js +2 -3
- package/lib/jsdom/living/css/properties/borderBottom.js +2 -5
- package/lib/jsdom/living/css/properties/borderBottomColor.js +2 -12
- package/lib/jsdom/living/css/properties/borderBottomStyle.js +2 -12
- package/lib/jsdom/living/css/properties/borderBottomWidth.js +2 -12
- package/lib/jsdom/living/css/properties/borderColor.js +2 -5
- package/lib/jsdom/living/css/properties/borderLeft.js +2 -5
- package/lib/jsdom/living/css/properties/borderLeftColor.js +2 -12
- package/lib/jsdom/living/css/properties/borderLeftStyle.js +2 -12
- package/lib/jsdom/living/css/properties/borderLeftWidth.js +2 -12
- package/lib/jsdom/living/css/properties/borderRight.js +2 -5
- package/lib/jsdom/living/css/properties/borderRightColor.js +2 -12
- package/lib/jsdom/living/css/properties/borderRightStyle.js +2 -12
- package/lib/jsdom/living/css/properties/borderRightWidth.js +2 -12
- package/lib/jsdom/living/css/properties/borderSpacing.js +2 -3
- package/lib/jsdom/living/css/properties/borderStyle.js +2 -5
- package/lib/jsdom/living/css/properties/borderTop.js +2 -5
- package/lib/jsdom/living/css/properties/borderTopColor.js +2 -12
- package/lib/jsdom/living/css/properties/borderTopStyle.js +2 -12
- package/lib/jsdom/living/css/properties/borderTopWidth.js +2 -12
- package/lib/jsdom/living/css/properties/borderWidth.js +2 -5
- package/lib/jsdom/living/css/properties/bottom.js +2 -3
- package/lib/jsdom/living/css/properties/clip.js +2 -3
- package/lib/jsdom/living/css/properties/display.js +2 -3
- package/lib/jsdom/living/css/properties/flex.js +2 -3
- package/lib/jsdom/living/css/properties/flexBasis.js +2 -4
- package/lib/jsdom/living/css/properties/flexGrow.js +2 -4
- package/lib/jsdom/living/css/properties/flexShrink.js +2 -4
- package/lib/jsdom/living/css/properties/font.js +2 -3
- package/lib/jsdom/living/css/properties/fontFamily.js +2 -4
- package/lib/jsdom/living/css/properties/fontSize.js +2 -4
- package/lib/jsdom/living/css/properties/fontStyle.js +2 -4
- package/lib/jsdom/living/css/properties/fontVariant.js +2 -4
- package/lib/jsdom/living/css/properties/fontWeight.js +2 -4
- package/lib/jsdom/living/css/properties/height.js +2 -3
- package/lib/jsdom/living/css/properties/left.js +2 -3
- package/lib/jsdom/living/css/properties/lineHeight.js +2 -4
- package/lib/jsdom/living/css/properties/margin.js +2 -3
- package/lib/jsdom/living/css/properties/marginBottom.js +2 -4
- package/lib/jsdom/living/css/properties/marginLeft.js +2 -4
- package/lib/jsdom/living/css/properties/marginRight.js +2 -4
- package/lib/jsdom/living/css/properties/marginTop.js +2 -4
- package/lib/jsdom/living/css/properties/opacity.js +2 -3
- package/lib/jsdom/living/css/properties/padding.js +2 -3
- package/lib/jsdom/living/css/properties/paddingBottom.js +2 -4
- package/lib/jsdom/living/css/properties/paddingLeft.js +2 -4
- package/lib/jsdom/living/css/properties/paddingRight.js +2 -4
- package/lib/jsdom/living/css/properties/paddingTop.js +2 -4
- package/lib/jsdom/living/css/properties/right.js +2 -3
- package/lib/jsdom/living/css/properties/top.js +2 -3
- package/lib/jsdom/living/css/properties/width.js +2 -3
- package/lib/jsdom/living/helpers/focusing.js +213 -10
- package/lib/jsdom/living/helpers/runtime-script-errors.js +2 -2
- package/lib/jsdom/living/mutation-observer/MutationObserver-impl.js +1 -1
- package/lib/jsdom/living/navigator/Navigator-impl.js +1 -1
- package/lib/jsdom/living/navigator/NavigatorConcurrentHardware-impl.js +1 -1
- package/lib/jsdom/living/nodes/Document-impl.js +31 -33
- package/lib/jsdom/living/nodes/GlobalEventHandlers-impl.js +3 -2
- package/lib/jsdom/living/nodes/HTMLFrameElement-impl.js +10 -15
- package/lib/jsdom/living/nodes/HTMLOrSVGElement-impl.js +5 -39
- package/lib/jsdom/living/nodes/HTMLScriptElement-impl.js +5 -4
- package/lib/jsdom/living/websockets/WebSocket-impl.js +1 -1
- package/lib/jsdom/living/window/navigation.js +1 -1
- package/lib/jsdom/living/xhr/XMLHttpRequest-impl.js +2 -2
- package/lib/jsdom/virtual-console.js +1 -1
- package/package.json +13 -14
|
@@ -81,7 +81,7 @@ exports.createStyleSheetForElement = (cssText, elementImpl, href) => {
|
|
|
81
81
|
error.sheetText = cssText;
|
|
82
82
|
error.type = "css-parsing";
|
|
83
83
|
|
|
84
|
-
globalObject.
|
|
84
|
+
globalObject._settings.virtualConsole.emit("jsdomError", error);
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
|
|
@@ -99,7 +99,7 @@ function parseImportedStyleSheet(cssText, importRule) {
|
|
|
99
99
|
error.sheetText = cssText;
|
|
100
100
|
error.type = "css-parsing";
|
|
101
101
|
|
|
102
|
-
globalObject.
|
|
102
|
+
globalObject._settings.virtualConsole.emit("jsdomError", error);
|
|
103
103
|
});
|
|
104
104
|
|
|
105
105
|
scanForImportRules(globalObject, importRule.styleSheet.cssRules._list, baseURLString);
|
|
@@ -138,7 +138,7 @@ function scanForImportRules(globalObject, ruleImpls, baseURLString) {
|
|
|
138
138
|
);
|
|
139
139
|
error.type = "resource-loading";
|
|
140
140
|
error.url = ruleImpl.href;
|
|
141
|
-
globalObject.
|
|
141
|
+
globalObject._settings.virtualConsole.emit("jsdomError", error);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
if (parsed) {
|
|
@@ -52,20 +52,20 @@ const serializationLonghands = [
|
|
|
52
52
|
];
|
|
53
53
|
|
|
54
54
|
const descriptor = {
|
|
55
|
-
set(v) {
|
|
55
|
+
set(v, priority = "") {
|
|
56
56
|
v = v.trim();
|
|
57
57
|
if (v === "" || parsers.hasVarFunc(v)) {
|
|
58
58
|
for (const [key] of shorthandFor) {
|
|
59
59
|
this._setProperty(key, "");
|
|
60
60
|
}
|
|
61
|
-
this._setProperty(property, v);
|
|
61
|
+
this._setProperty(property, v, priority);
|
|
62
62
|
} else {
|
|
63
63
|
const bgValues = parse(v);
|
|
64
64
|
if (typeof bgValues === "string") {
|
|
65
65
|
for (const [key] of shorthandFor) {
|
|
66
|
-
this._setProperty(key, bgValues);
|
|
66
|
+
this._setProperty(key, bgValues, priority);
|
|
67
67
|
}
|
|
68
|
-
this._setProperty(property, bgValues);
|
|
68
|
+
this._setProperty(property, bgValues, priority);
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
if (!Array.isArray(bgValues)) {
|
|
@@ -132,7 +132,6 @@ const descriptor = {
|
|
|
132
132
|
}
|
|
133
133
|
backgrounds.push(bg.join(" "));
|
|
134
134
|
}
|
|
135
|
-
const priority = this._priorities.get(property) ?? "";
|
|
136
135
|
for (const [longhand, value] of bgMap) {
|
|
137
136
|
this._setProperty(longhand, value.join(", "), priority);
|
|
138
137
|
}
|
|
@@ -6,16 +6,14 @@ const property = "background-attachment";
|
|
|
6
6
|
const shorthand = "background";
|
|
7
7
|
|
|
8
8
|
const descriptor = {
|
|
9
|
-
set(v) {
|
|
9
|
+
set(v, priority = "") {
|
|
10
10
|
v = v.trim();
|
|
11
11
|
if (parsers.hasVarFunc(v)) {
|
|
12
12
|
this._setProperty(shorthand, "");
|
|
13
|
-
this._setProperty(property, v);
|
|
13
|
+
this._setProperty(property, v, priority);
|
|
14
14
|
} else {
|
|
15
15
|
const val = parse(v);
|
|
16
16
|
if (typeof val === "string") {
|
|
17
|
-
const priority =
|
|
18
|
-
!this._priorities.get(shorthand) && this._priorities.has(property) ? this._priorities.get(property) : "";
|
|
19
17
|
this._setProperty(property, val, priority);
|
|
20
18
|
}
|
|
21
19
|
}
|
|
@@ -6,16 +6,14 @@ const property = "background-clip";
|
|
|
6
6
|
const shorthand = "background";
|
|
7
7
|
|
|
8
8
|
const descriptor = {
|
|
9
|
-
set(v) {
|
|
9
|
+
set(v, priority = "") {
|
|
10
10
|
v = v.trim();
|
|
11
11
|
if (parsers.hasVarFunc(v)) {
|
|
12
12
|
this._setProperty(shorthand, "");
|
|
13
|
-
this._setProperty(property, v);
|
|
13
|
+
this._setProperty(property, v, priority);
|
|
14
14
|
} else {
|
|
15
15
|
const val = parse(v);
|
|
16
16
|
if (typeof val === "string") {
|
|
17
|
-
const priority =
|
|
18
|
-
!this._priorities.get(shorthand) && this._priorities.has(property) ? this._priorities.get(property) : "";
|
|
19
17
|
this._setProperty(property, val, priority);
|
|
20
18
|
}
|
|
21
19
|
}
|
|
@@ -6,16 +6,14 @@ const property = "background-color";
|
|
|
6
6
|
const shorthand = "background";
|
|
7
7
|
|
|
8
8
|
const descriptor = {
|
|
9
|
-
set(v) {
|
|
9
|
+
set(v, priority = "") {
|
|
10
10
|
v = v.trim();
|
|
11
11
|
if (parsers.hasVarFunc(v)) {
|
|
12
12
|
this._setProperty(shorthand, "");
|
|
13
|
-
this._setProperty(property, v);
|
|
13
|
+
this._setProperty(property, v, priority);
|
|
14
14
|
} else {
|
|
15
15
|
const val = parse(v);
|
|
16
16
|
if (typeof val === "string") {
|
|
17
|
-
const priority =
|
|
18
|
-
!this._priorities.get(shorthand) && this._priorities.has(property) ? this._priorities.get(property) : "";
|
|
19
17
|
this._setProperty(property, val, priority);
|
|
20
18
|
}
|
|
21
19
|
}
|
|
@@ -6,16 +6,14 @@ const property = "background-image";
|
|
|
6
6
|
const shorthand = "background";
|
|
7
7
|
|
|
8
8
|
const descriptor = {
|
|
9
|
-
set(v) {
|
|
9
|
+
set(v, priority = "") {
|
|
10
10
|
v = v.trim();
|
|
11
11
|
if (parsers.hasVarFunc(v)) {
|
|
12
12
|
this._setProperty(shorthand, "");
|
|
13
|
-
this._setProperty(property, v);
|
|
13
|
+
this._setProperty(property, v, priority);
|
|
14
14
|
} else {
|
|
15
15
|
const val = parse(v);
|
|
16
16
|
if (typeof val === "string") {
|
|
17
|
-
const priority =
|
|
18
|
-
!this._priorities.get(shorthand) && this._priorities.has(property) ? this._priorities.get(property) : "";
|
|
19
17
|
this._setProperty(property, val, priority);
|
|
20
18
|
}
|
|
21
19
|
}
|
|
@@ -6,16 +6,14 @@ const property = "background-origin";
|
|
|
6
6
|
const shorthand = "background";
|
|
7
7
|
|
|
8
8
|
const descriptor = {
|
|
9
|
-
set(v) {
|
|
9
|
+
set(v, priority = "") {
|
|
10
10
|
v = v.trim();
|
|
11
11
|
if (parsers.hasVarFunc(v)) {
|
|
12
12
|
this._setProperty(shorthand, "");
|
|
13
|
-
this._setProperty(property, v);
|
|
13
|
+
this._setProperty(property, v, priority);
|
|
14
14
|
} else {
|
|
15
15
|
const val = parse(v);
|
|
16
16
|
if (typeof val === "string") {
|
|
17
|
-
const priority =
|
|
18
|
-
!this._priorities.get(shorthand) && this._priorities.has(property) ? this._priorities.get(property) : "";
|
|
19
17
|
this._setProperty(property, val, priority);
|
|
20
18
|
}
|
|
21
19
|
}
|
|
@@ -21,20 +21,16 @@ const shorthandFor = new Map([
|
|
|
21
21
|
]);
|
|
22
22
|
|
|
23
23
|
const descriptor = {
|
|
24
|
-
set(v) {
|
|
24
|
+
set(v, priority = "") {
|
|
25
25
|
v = v.trim();
|
|
26
26
|
if (parsers.hasVarFunc(v)) {
|
|
27
27
|
this._setProperty(background, "");
|
|
28
28
|
this._setProperty(propertyX, "");
|
|
29
29
|
this._setProperty(propertyY, "");
|
|
30
|
-
this._setProperty(property, v);
|
|
30
|
+
this._setProperty(property, v, priority);
|
|
31
31
|
} else {
|
|
32
32
|
const val = parseLonghands(v);
|
|
33
33
|
if (val) {
|
|
34
|
-
const priority =
|
|
35
|
-
!this._priorities.get(background) && this._priorities.has(property) ?
|
|
36
|
-
this._priorities.get(property) :
|
|
37
|
-
"";
|
|
38
34
|
this._setProperty(background, "");
|
|
39
35
|
this._setProperty(propertyX, val.x, priority);
|
|
40
36
|
this._setProperty(propertyY, val.y, priority);
|
|
@@ -7,17 +7,15 @@ const property = backgroundPosition.propertyX;
|
|
|
7
7
|
const shorthand = backgroundPosition.property;
|
|
8
8
|
|
|
9
9
|
const descriptor = {
|
|
10
|
-
set(v) {
|
|
10
|
+
set(v, priority = "") {
|
|
11
11
|
v = v.trim();
|
|
12
12
|
if (parsers.hasVarFunc(v)) {
|
|
13
13
|
this._setProperty("background", "");
|
|
14
14
|
this._setProperty(shorthand, "");
|
|
15
|
-
this._setProperty(property, v);
|
|
15
|
+
this._setProperty(property, v, priority);
|
|
16
16
|
} else {
|
|
17
17
|
const val = parse(v);
|
|
18
18
|
if (typeof val === "string") {
|
|
19
|
-
const priority =
|
|
20
|
-
!this._priorities.get(shorthand) && this._priorities.has(property) ? this._priorities.get(property) : "";
|
|
21
19
|
backgroundPosition.setLonghand(this, property, val, priority);
|
|
22
20
|
}
|
|
23
21
|
}
|
|
@@ -7,17 +7,15 @@ const property = backgroundPosition.propertyY;
|
|
|
7
7
|
const shorthand = backgroundPosition.property;
|
|
8
8
|
|
|
9
9
|
const descriptor = {
|
|
10
|
-
set(v) {
|
|
10
|
+
set(v, priority = "") {
|
|
11
11
|
v = v.trim();
|
|
12
12
|
if (parsers.hasVarFunc(v)) {
|
|
13
13
|
this._setProperty("background", "");
|
|
14
14
|
this._setProperty(shorthand, "");
|
|
15
|
-
this._setProperty(property, v);
|
|
15
|
+
this._setProperty(property, v, priority);
|
|
16
16
|
} else {
|
|
17
17
|
const val = parse(v);
|
|
18
18
|
if (typeof val === "string") {
|
|
19
|
-
const priority =
|
|
20
|
-
!this._priorities.get(shorthand) && this._priorities.has(property) ? this._priorities.get(property) : "";
|
|
21
19
|
backgroundPosition.setLonghand(this, property, val, priority);
|
|
22
20
|
}
|
|
23
21
|
}
|
|
@@ -9,16 +9,14 @@ const property = "background-repeat";
|
|
|
9
9
|
const shorthand = "background";
|
|
10
10
|
|
|
11
11
|
const descriptor = {
|
|
12
|
-
set(v) {
|
|
12
|
+
set(v, priority = "") {
|
|
13
13
|
v = v.trim();
|
|
14
14
|
if (parsers.hasVarFunc(v)) {
|
|
15
15
|
this._setProperty(shorthand, "");
|
|
16
|
-
this._setProperty(property, v);
|
|
16
|
+
this._setProperty(property, v, priority);
|
|
17
17
|
} else {
|
|
18
18
|
const val = parse(v);
|
|
19
19
|
if (typeof val === "string") {
|
|
20
|
-
const priority =
|
|
21
|
-
!this._priorities.get(shorthand) && this._priorities.has(property) ? this._priorities.get(property) : "";
|
|
22
20
|
this._setProperty(property, val, priority);
|
|
23
21
|
}
|
|
24
22
|
}
|
|
@@ -9,16 +9,14 @@ const property = "background-size";
|
|
|
9
9
|
const shorthand = "background";
|
|
10
10
|
|
|
11
11
|
const descriptor = {
|
|
12
|
-
set(v) {
|
|
12
|
+
set(v, priority = "") {
|
|
13
13
|
v = v.trim();
|
|
14
14
|
if (parsers.hasVarFunc(v)) {
|
|
15
15
|
this._setProperty(shorthand, "");
|
|
16
|
-
this._setProperty(property, v);
|
|
16
|
+
this._setProperty(property, v, priority);
|
|
17
17
|
} else {
|
|
18
18
|
const val = parse(v);
|
|
19
19
|
if (typeof val === "string") {
|
|
20
|
-
const priority =
|
|
21
|
-
!this._priorities.get(shorthand) && this._priorities.has(property) ? this._priorities.get(property) : "";
|
|
22
20
|
this._setProperty(property, val, priority);
|
|
23
21
|
}
|
|
24
22
|
}
|
|
@@ -37,14 +37,13 @@ const positionShorthandFor = new Map([
|
|
|
37
37
|
]);
|
|
38
38
|
|
|
39
39
|
const descriptor = {
|
|
40
|
-
set(v) {
|
|
40
|
+
set(v, priority = "") {
|
|
41
41
|
v = v.trim();
|
|
42
42
|
if (parsers.hasVarFunc(v)) {
|
|
43
|
-
this._borderSetter(property, v,
|
|
43
|
+
this._borderSetter(property, v, priority);
|
|
44
44
|
} else {
|
|
45
45
|
const val = parse(v);
|
|
46
46
|
if (val || typeof val === "string") {
|
|
47
|
-
const priority = this._priorities.get(property) ?? "";
|
|
48
47
|
this._borderSetter(property, val, priority);
|
|
49
48
|
}
|
|
50
49
|
}
|
|
@@ -6,7 +6,6 @@ const borderBottomStyle = require("./borderBottomStyle");
|
|
|
6
6
|
const borderBottomColor = require("./borderBottomColor");
|
|
7
7
|
|
|
8
8
|
const property = "border-bottom";
|
|
9
|
-
const shorthand = "border";
|
|
10
9
|
|
|
11
10
|
const subProps = {
|
|
12
11
|
width: borderBottomWidth.property,
|
|
@@ -27,15 +26,13 @@ const shorthandFor = new Map([
|
|
|
27
26
|
]);
|
|
28
27
|
|
|
29
28
|
const descriptor = {
|
|
30
|
-
set(v) {
|
|
29
|
+
set(v, priority = "") {
|
|
31
30
|
v = v.trim();
|
|
32
31
|
if (parsers.hasVarFunc(v)) {
|
|
33
|
-
this._borderSetter(property, v,
|
|
32
|
+
this._borderSetter(property, v, priority);
|
|
34
33
|
} else {
|
|
35
34
|
const val = parse(v);
|
|
36
35
|
if (val || typeof val === "string") {
|
|
37
|
-
const priority =
|
|
38
|
-
!this._priorities.get(shorthand) && this._priorities.has(property) ? this._priorities.get(property) : "";
|
|
39
36
|
this._borderSetter(property, val, priority);
|
|
40
37
|
}
|
|
41
38
|
}
|
|
@@ -3,25 +3,15 @@
|
|
|
3
3
|
const parsers = require("../helpers/css-values");
|
|
4
4
|
|
|
5
5
|
const property = "border-bottom-color";
|
|
6
|
-
const lineShorthand = "border-color";
|
|
7
|
-
const positionShorthand = "border-bottom";
|
|
8
|
-
const shorthand = "border";
|
|
9
6
|
|
|
10
7
|
const descriptor = {
|
|
11
|
-
set(v) {
|
|
8
|
+
set(v, priority = "") {
|
|
12
9
|
v = v.trim();
|
|
13
10
|
if (parsers.hasVarFunc(v)) {
|
|
14
|
-
this._borderSetter(property, v,
|
|
11
|
+
this._borderSetter(property, v, priority);
|
|
15
12
|
} else {
|
|
16
13
|
const val = parse(v);
|
|
17
14
|
if (typeof val === "string") {
|
|
18
|
-
const shorthandPriority = this._priorities.get(shorthand);
|
|
19
|
-
const linePriority = this._priorities.get(lineShorthand);
|
|
20
|
-
const positionPriority = this._priorities.get(positionShorthand);
|
|
21
|
-
const priority =
|
|
22
|
-
!(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property) ?
|
|
23
|
-
this._priorities.get(property) :
|
|
24
|
-
"";
|
|
25
15
|
this._borderSetter(property, val, priority);
|
|
26
16
|
}
|
|
27
17
|
}
|
|
@@ -3,25 +3,15 @@
|
|
|
3
3
|
const parsers = require("../helpers/css-values");
|
|
4
4
|
|
|
5
5
|
const property = "border-bottom-style";
|
|
6
|
-
const lineShorthand = "border-style";
|
|
7
|
-
const positionShorthand = "border-bottom";
|
|
8
|
-
const shorthand = "border";
|
|
9
6
|
|
|
10
7
|
const descriptor = {
|
|
11
|
-
set(v) {
|
|
8
|
+
set(v, priority = "") {
|
|
12
9
|
v = v.trim();
|
|
13
10
|
if (parsers.hasVarFunc(v)) {
|
|
14
|
-
this._borderSetter(property, v,
|
|
11
|
+
this._borderSetter(property, v, priority);
|
|
15
12
|
} else {
|
|
16
13
|
const val = parse(v);
|
|
17
14
|
if (typeof val === "string") {
|
|
18
|
-
const shorthandPriority = this._priorities.get(shorthand);
|
|
19
|
-
const linePriority = this._priorities.get(lineShorthand);
|
|
20
|
-
const positionPriority = this._priorities.get(positionShorthand);
|
|
21
|
-
const priority =
|
|
22
|
-
!(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property) ?
|
|
23
|
-
this._priorities.get(property) :
|
|
24
|
-
"";
|
|
25
15
|
this._borderSetter(property, val, priority);
|
|
26
16
|
}
|
|
27
17
|
}
|
|
@@ -4,25 +4,15 @@ const parsers = require("../helpers/css-values");
|
|
|
4
4
|
const { getResolvedBorderWidth, resolveLineWidth } = require("../helpers/line-widths");
|
|
5
5
|
|
|
6
6
|
const property = "border-bottom-width";
|
|
7
|
-
const lineShorthand = "border-width";
|
|
8
|
-
const positionShorthand = "border-bottom";
|
|
9
|
-
const shorthand = "border";
|
|
10
7
|
|
|
11
8
|
const descriptor = {
|
|
12
|
-
set(v) {
|
|
9
|
+
set(v, priority = "") {
|
|
13
10
|
v = v.trim();
|
|
14
11
|
if (parsers.hasVarFunc(v)) {
|
|
15
|
-
this._borderSetter(property, v,
|
|
12
|
+
this._borderSetter(property, v, priority);
|
|
16
13
|
} else {
|
|
17
14
|
const val = parse(v);
|
|
18
15
|
if (typeof val === "string") {
|
|
19
|
-
const shorthandPriority = this._priorities.get(shorthand);
|
|
20
|
-
const linePriority = this._priorities.get(lineShorthand);
|
|
21
|
-
const positionPriority = this._priorities.get(positionShorthand);
|
|
22
|
-
const priority =
|
|
23
|
-
!(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property) ?
|
|
24
|
-
this._priorities.get(property) :
|
|
25
|
-
"";
|
|
26
16
|
this._borderSetter(property, val, priority);
|
|
27
17
|
}
|
|
28
18
|
}
|
|
@@ -7,7 +7,6 @@ const borderBottomColor = require("./borderBottomColor");
|
|
|
7
7
|
const borderLeftColor = require("./borderLeftColor");
|
|
8
8
|
|
|
9
9
|
const property = "border-color";
|
|
10
|
-
const shorthand = "border";
|
|
11
10
|
|
|
12
11
|
const shorthandFor = new Map([
|
|
13
12
|
[borderTopColor.property, borderTopColor],
|
|
@@ -17,15 +16,13 @@ const shorthandFor = new Map([
|
|
|
17
16
|
]);
|
|
18
17
|
|
|
19
18
|
const descriptor = {
|
|
20
|
-
set(v) {
|
|
19
|
+
set(v, priority = "") {
|
|
21
20
|
v = v.trim();
|
|
22
21
|
if (parsers.hasVarFunc(v)) {
|
|
23
|
-
this._borderSetter(property, v,
|
|
22
|
+
this._borderSetter(property, v, priority);
|
|
24
23
|
} else {
|
|
25
24
|
const val = parse(v);
|
|
26
25
|
if (Array.isArray(val) || typeof val === "string") {
|
|
27
|
-
const priority =
|
|
28
|
-
!this._priorities.get(shorthand) && this._priorities.has(property) ? this._priorities.get(property) : "";
|
|
29
26
|
this._borderSetter(property, val, priority);
|
|
30
27
|
}
|
|
31
28
|
}
|
|
@@ -6,7 +6,6 @@ const borderLeftStyle = require("./borderLeftStyle");
|
|
|
6
6
|
const borderLeftColor = require("./borderLeftColor");
|
|
7
7
|
|
|
8
8
|
const property = "border-left";
|
|
9
|
-
const shorthand = "border";
|
|
10
9
|
|
|
11
10
|
const subProps = {
|
|
12
11
|
width: borderLeftWidth.property,
|
|
@@ -27,15 +26,13 @@ const shorthandFor = new Map([
|
|
|
27
26
|
]);
|
|
28
27
|
|
|
29
28
|
const descriptor = {
|
|
30
|
-
set(v) {
|
|
29
|
+
set(v, priority = "") {
|
|
31
30
|
v = v.trim();
|
|
32
31
|
if (parsers.hasVarFunc(v)) {
|
|
33
|
-
this._borderSetter(property, v,
|
|
32
|
+
this._borderSetter(property, v, priority);
|
|
34
33
|
} else {
|
|
35
34
|
const val = parse(v);
|
|
36
35
|
if (val || typeof val === "string") {
|
|
37
|
-
const priority =
|
|
38
|
-
!this._priorities.get(shorthand) && this._priorities.has(property) ? this._priorities.get(property) : "";
|
|
39
36
|
this._borderSetter(property, val, priority);
|
|
40
37
|
}
|
|
41
38
|
}
|
|
@@ -3,25 +3,15 @@
|
|
|
3
3
|
const parsers = require("../helpers/css-values");
|
|
4
4
|
|
|
5
5
|
const property = "border-left-color";
|
|
6
|
-
const lineShorthand = "border-color";
|
|
7
|
-
const positionShorthand = "border-left";
|
|
8
|
-
const shorthand = "border";
|
|
9
6
|
|
|
10
7
|
const descriptor = {
|
|
11
|
-
set(v) {
|
|
8
|
+
set(v, priority = "") {
|
|
12
9
|
v = v.trim();
|
|
13
10
|
if (parsers.hasVarFunc(v)) {
|
|
14
|
-
this._borderSetter(property, v,
|
|
11
|
+
this._borderSetter(property, v, priority);
|
|
15
12
|
} else {
|
|
16
13
|
const val = parse(v);
|
|
17
14
|
if (typeof val === "string") {
|
|
18
|
-
const shorthandPriority = this._priorities.get(shorthand);
|
|
19
|
-
const linePriority = this._priorities.get(lineShorthand);
|
|
20
|
-
const positionPriority = this._priorities.get(positionShorthand);
|
|
21
|
-
const priority =
|
|
22
|
-
!(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property) ?
|
|
23
|
-
this._priorities.get(property) :
|
|
24
|
-
"";
|
|
25
15
|
this._borderSetter(property, val, priority);
|
|
26
16
|
}
|
|
27
17
|
}
|
|
@@ -3,25 +3,15 @@
|
|
|
3
3
|
const parsers = require("../helpers/css-values");
|
|
4
4
|
|
|
5
5
|
const property = "border-left-style";
|
|
6
|
-
const lineShorthand = "border-style";
|
|
7
|
-
const positionShorthand = "border-left";
|
|
8
|
-
const shorthand = "border";
|
|
9
6
|
|
|
10
7
|
const descriptor = {
|
|
11
|
-
set(v) {
|
|
8
|
+
set(v, priority = "") {
|
|
12
9
|
v = v.trim();
|
|
13
10
|
if (parsers.hasVarFunc(v)) {
|
|
14
|
-
this._borderSetter(property, v,
|
|
11
|
+
this._borderSetter(property, v, priority);
|
|
15
12
|
} else {
|
|
16
13
|
const val = parse(v);
|
|
17
14
|
if (typeof val === "string") {
|
|
18
|
-
const shorthandPriority = this._priorities.get(shorthand);
|
|
19
|
-
const linePriority = this._priorities.get(lineShorthand);
|
|
20
|
-
const positionPriority = this._priorities.get(positionShorthand);
|
|
21
|
-
const priority =
|
|
22
|
-
!(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property) ?
|
|
23
|
-
this._priorities.get(property) :
|
|
24
|
-
"";
|
|
25
15
|
this._borderSetter(property, val, priority);
|
|
26
16
|
}
|
|
27
17
|
}
|
|
@@ -4,25 +4,15 @@ const parsers = require("../helpers/css-values");
|
|
|
4
4
|
const { getResolvedBorderWidth, resolveLineWidth } = require("../helpers/line-widths");
|
|
5
5
|
|
|
6
6
|
const property = "border-left-width";
|
|
7
|
-
const lineShorthand = "border-width";
|
|
8
|
-
const positionShorthand = "border-left";
|
|
9
|
-
const shorthand = "border";
|
|
10
7
|
|
|
11
8
|
const descriptor = {
|
|
12
|
-
set(v) {
|
|
9
|
+
set(v, priority = "") {
|
|
13
10
|
v = v.trim();
|
|
14
11
|
if (parsers.hasVarFunc(v)) {
|
|
15
|
-
this._borderSetter(property, v,
|
|
12
|
+
this._borderSetter(property, v, priority);
|
|
16
13
|
} else {
|
|
17
14
|
const val = parse(v);
|
|
18
15
|
if (typeof val === "string") {
|
|
19
|
-
const shorthandPriority = this._priorities.get(shorthand);
|
|
20
|
-
const linePriority = this._priorities.get(lineShorthand);
|
|
21
|
-
const positionPriority = this._priorities.get(positionShorthand);
|
|
22
|
-
const priority =
|
|
23
|
-
!(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property) ?
|
|
24
|
-
this._priorities.get(property) :
|
|
25
|
-
"";
|
|
26
16
|
this._borderSetter(property, val, priority);
|
|
27
17
|
}
|
|
28
18
|
}
|
|
@@ -6,7 +6,6 @@ const borderRightStyle = require("./borderRightStyle");
|
|
|
6
6
|
const borderRightColor = require("./borderRightColor");
|
|
7
7
|
|
|
8
8
|
const property = "border-right";
|
|
9
|
-
const shorthand = "border";
|
|
10
9
|
|
|
11
10
|
const subProps = {
|
|
12
11
|
width: borderRightWidth.property,
|
|
@@ -27,15 +26,13 @@ const shorthandFor = new Map([
|
|
|
27
26
|
]);
|
|
28
27
|
|
|
29
28
|
const descriptor = {
|
|
30
|
-
set(v) {
|
|
29
|
+
set(v, priority = "") {
|
|
31
30
|
v = v.trim();
|
|
32
31
|
if (parsers.hasVarFunc(v)) {
|
|
33
|
-
this._borderSetter(property, v,
|
|
32
|
+
this._borderSetter(property, v, priority);
|
|
34
33
|
} else {
|
|
35
34
|
const val = parse(v);
|
|
36
35
|
if (val || typeof val === "string") {
|
|
37
|
-
const priority =
|
|
38
|
-
!this._priorities.get(shorthand) && this._priorities.has(property) ? this._priorities.get(property) : "";
|
|
39
36
|
this._borderSetter(property, val, priority);
|
|
40
37
|
}
|
|
41
38
|
}
|
|
@@ -3,25 +3,15 @@
|
|
|
3
3
|
const parsers = require("../helpers/css-values");
|
|
4
4
|
|
|
5
5
|
const property = "border-right-color";
|
|
6
|
-
const lineShorthand = "border-color";
|
|
7
|
-
const positionShorthand = "border-right";
|
|
8
|
-
const shorthand = "border";
|
|
9
6
|
|
|
10
7
|
const descriptor = {
|
|
11
|
-
set(v) {
|
|
8
|
+
set(v, priority = "") {
|
|
12
9
|
v = v.trim();
|
|
13
10
|
if (parsers.hasVarFunc(v)) {
|
|
14
|
-
this._borderSetter(property, v,
|
|
11
|
+
this._borderSetter(property, v, priority);
|
|
15
12
|
} else {
|
|
16
13
|
const val = parse(v);
|
|
17
14
|
if (typeof val === "string") {
|
|
18
|
-
const shorthandPriority = this._priorities.get(shorthand);
|
|
19
|
-
const linePriority = this._priorities.get(lineShorthand);
|
|
20
|
-
const positionPriority = this._priorities.get(positionShorthand);
|
|
21
|
-
const priority =
|
|
22
|
-
!(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property) ?
|
|
23
|
-
this._priorities.get(property) :
|
|
24
|
-
"";
|
|
25
15
|
this._borderSetter(property, val, priority);
|
|
26
16
|
}
|
|
27
17
|
}
|
|
@@ -3,25 +3,15 @@
|
|
|
3
3
|
const parsers = require("../helpers/css-values");
|
|
4
4
|
|
|
5
5
|
const property = "border-right-style";
|
|
6
|
-
const lineShorthand = "border-style";
|
|
7
|
-
const positionShorthand = "border-right";
|
|
8
|
-
const shorthand = "border";
|
|
9
6
|
|
|
10
7
|
const descriptor = {
|
|
11
|
-
set(v) {
|
|
8
|
+
set(v, priority = "") {
|
|
12
9
|
v = v.trim();
|
|
13
10
|
if (parsers.hasVarFunc(v)) {
|
|
14
|
-
this._borderSetter(property, v,
|
|
11
|
+
this._borderSetter(property, v, priority);
|
|
15
12
|
} else {
|
|
16
13
|
const val = parse(v);
|
|
17
14
|
if (typeof val === "string") {
|
|
18
|
-
const shorthandPriority = this._priorities.get(shorthand);
|
|
19
|
-
const linePriority = this._priorities.get(lineShorthand);
|
|
20
|
-
const positionPriority = this._priorities.get(positionShorthand);
|
|
21
|
-
const priority =
|
|
22
|
-
!(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property) ?
|
|
23
|
-
this._priorities.get(property) :
|
|
24
|
-
"";
|
|
25
15
|
this._borderSetter(property, val, priority);
|
|
26
16
|
}
|
|
27
17
|
}
|
|
@@ -4,25 +4,15 @@ const parsers = require("../helpers/css-values");
|
|
|
4
4
|
const { getResolvedBorderWidth, resolveLineWidth } = require("../helpers/line-widths");
|
|
5
5
|
|
|
6
6
|
const property = "border-right-width";
|
|
7
|
-
const lineShorthand = "border-width";
|
|
8
|
-
const positionShorthand = "border-right";
|
|
9
|
-
const shorthand = "border";
|
|
10
7
|
|
|
11
8
|
const descriptor = {
|
|
12
|
-
set(v) {
|
|
9
|
+
set(v, priority = "") {
|
|
13
10
|
v = v.trim();
|
|
14
11
|
if (parsers.hasVarFunc(v)) {
|
|
15
|
-
this._borderSetter(property, v,
|
|
12
|
+
this._borderSetter(property, v, priority);
|
|
16
13
|
} else {
|
|
17
14
|
const val = parse(v);
|
|
18
15
|
if (typeof val === "string") {
|
|
19
|
-
const shorthandPriority = this._priorities.get(shorthand);
|
|
20
|
-
const linePriority = this._priorities.get(lineShorthand);
|
|
21
|
-
const positionPriority = this._priorities.get(positionShorthand);
|
|
22
|
-
const priority =
|
|
23
|
-
!(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property) ?
|
|
24
|
-
this._priorities.get(property) :
|
|
25
|
-
"";
|
|
26
16
|
this._borderSetter(property, val, priority);
|
|
27
17
|
}
|
|
28
18
|
}
|