Skip to content

Commit 2fb749d

Browse files
authored
Merge pull request #314 from w3c/text-decor-4
Text decor 4
2 parents 38b6627 + 2af1eed commit 2fb749d

25 files changed

+1739
-134
lines changed

org/w3c/css/properties/CSS3Properties.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,19 @@ text-decoration: org.w3c.css.properties.css3.CssTextDecor
191191
text-decoration-color: org.w3c.css.properties.css3.CssTextDecorationColor
192192
text-decoration-line: org.w3c.css.properties.css3.CssTextDecorationLine
193193
text-decoration-skip: org.w3c.css.properties.css3.CssTextDecorationSkip
194+
text-decoration-skip-box: org.w3c.css.properties.css3.CssTextDecorationSkipBox
195+
text-decoration-skip-ink: org.w3c.css.properties.css3.CssTextDecorationSkipInk
196+
text-decoration-skip-inset: org.w3c.css.properties.css3.CssTextDecorationSkipInset
197+
text-decoration-skip-self: org.w3c.css.properties.css3.CssTextDecorationSkipSelf
198+
text-decoration-skip-spaces: org.w3c.css.properties.css3.CssTextDecorationSkipSpaces
194199
text-decoration-style: org.w3c.css.properties.css3.CssTextDecorationStyle
200+
text-decoration-thickness: org.w3c.css.properties.css3.CssTextDecorationThickness
195201
text-emphasis: org.w3c.css.properties.css3.CssTextEmphasis
196202
text-emphasis-color: org.w3c.css.properties.css3.CssTextEmphasisColor
197203
text-emphasis-position: org.w3c.css.properties.css3.CssTextEmphasisPosition
198204
text-emphasis-style: org.w3c.css.properties.css3.CssTextEmphasisStyle
199205
text-size-adjust: org.w3c.css.properties.css3.CssTextSizeAdjust
206+
text-underline-offset: org.w3c.css.properties.css3.CssTextUnderlineOffset
200207
text-underline-position: org.w3c.css.properties.css3.CssTextUnderlinePosition
201208
tab-size: org.w3c.css.properties.css3.CssTabSize
202209
hanging-punctuation: org.w3c.css.properties.css3.CssHangingPunctuation
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
//
2+
// Author: Yves Lafon <ylafon@w3.org>
3+
//
4+
// (c) COPYRIGHT MIT, ERCIM, Keio, Beihang, 2021.
5+
// Please first read the full copyright statement in file COPYRIGHT.html
6+
package org.w3c.css.properties.css;
7+
8+
import org.w3c.css.parser.CssStyle;
9+
import org.w3c.css.properties.css3.Css3Style;
10+
import org.w3c.css.util.ApplContext;
11+
import org.w3c.css.util.InvalidParamException;
12+
import org.w3c.css.values.CssExpression;
13+
import org.w3c.css.values.CssValue;
14+
15+
/**
16+
* @since CSS3
17+
*/
18+
public class CssTextDecorationSkipBox extends CssProperty {
19+
20+
public CssValue value;
21+
22+
/**
23+
* Create a new CssTextDecorationSkipBox
24+
*/
25+
public CssTextDecorationSkipBox() {
26+
}
27+
28+
/**
29+
* Creates a new CssTextDecorationSkipBox
30+
*
31+
* @param expression The expression for this property
32+
* @throws InvalidParamException
33+
* Expressions are incorrect
34+
*/
35+
public CssTextDecorationSkipBox(ApplContext ac, CssExpression expression, boolean check)
36+
throws InvalidParamException {
37+
throw new InvalidParamException("value",
38+
expression.getValue().toString(),
39+
getPropertyName(), ac);
40+
}
41+
42+
public CssTextDecorationSkipBox(ApplContext ac, CssExpression expression)
43+
throws InvalidParamException {
44+
this(ac, expression, false);
45+
}
46+
47+
/**
48+
* Returns the value of this property
49+
*/
50+
public Object get() {
51+
return value;
52+
}
53+
54+
55+
/**
56+
* Returns the name of this property
57+
*/
58+
public final String getPropertyName() {
59+
return "text-decoration-skip-box";
60+
}
61+
62+
/**
63+
* Returns true if this property is "softly" inherited
64+
* e.g. his value is equals to inherit
65+
*/
66+
public boolean isSoftlyInherited() {
67+
return value.equals(inherit);
68+
}
69+
70+
/**
71+
* Returns a string representation of the object.
72+
*/
73+
public String toString() {
74+
return value.toString();
75+
}
76+
77+
/**
78+
* Add this property to the CssStyle.
79+
*
80+
* @param style The CssStyle
81+
*/
82+
public void addToStyle(ApplContext ac, CssStyle style) {
83+
Css3Style s = (Css3Style) style;
84+
if (s.cssTextDecorationSkipBox != null) {
85+
style.addRedefinitionWarning(ac, this);
86+
}
87+
s.cssTextDecorationSkipBox = this;
88+
}
89+
90+
91+
/**
92+
* Compares two properties for equality.
93+
*
94+
* @param property The other property.
95+
*/
96+
public boolean equals(CssProperty property) {
97+
return (property instanceof CssTextDecorationSkipBox &&
98+
value.equals(((CssTextDecorationSkipBox) property).value));
99+
}
100+
101+
102+
/**
103+
* Get this property in the style.
104+
*
105+
* @param style The style where the property is
106+
* @param resolve if true, resolve the style to find this property
107+
*/
108+
public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
109+
if (resolve) {
110+
return ((Css3Style) style).getTextDecorationSkipBox();
111+
} else {
112+
return ((Css3Style) style).cssTextDecorationSkipBox;
113+
}
114+
}
115+
}
116+
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
//
2+
// Author: Yves Lafon <ylafon@w3.org>
3+
//
4+
// (c) COPYRIGHT MIT, ERCIM, Keio, Beihang, 2021.
5+
// Please first read the full copyright statement in file COPYRIGHT.html
6+
package org.w3c.css.properties.css;
7+
8+
import org.w3c.css.parser.CssStyle;
9+
import org.w3c.css.properties.css3.Css3Style;
10+
import org.w3c.css.util.ApplContext;
11+
import org.w3c.css.util.InvalidParamException;
12+
import org.w3c.css.values.CssExpression;
13+
import org.w3c.css.values.CssValue;
14+
15+
/**
16+
* @since CSS3
17+
*/
18+
public class CssTextDecorationSkipInk extends CssProperty {
19+
20+
public CssValue value;
21+
22+
/**
23+
* Create a new CssTextDecorationSkipInk
24+
*/
25+
public CssTextDecorationSkipInk() {
26+
}
27+
28+
/**
29+
* Creates a new CssTextDecorationSkipInk
30+
*
31+
* @param expression The expression for this property
32+
* @throws InvalidParamException
33+
* Expressions are incorrect
34+
*/
35+
public CssTextDecorationSkipInk(ApplContext ac, CssExpression expression, boolean check)
36+
throws InvalidParamException {
37+
throw new InvalidParamException("value",
38+
expression.getValue().toString(),
39+
getPropertyName(), ac);
40+
}
41+
42+
public CssTextDecorationSkipInk(ApplContext ac, CssExpression expression)
43+
throws InvalidParamException {
44+
this(ac, expression, false);
45+
}
46+
47+
/**
48+
* Returns the value of this property
49+
*/
50+
public Object get() {
51+
return value;
52+
}
53+
54+
55+
/**
56+
* Returns the name of this property
57+
*/
58+
public final String getPropertyName() {
59+
return "text-decoration-skip-ink";
60+
}
61+
62+
/**
63+
* Returns true if this property is "softly" inherited
64+
* e.g. his value is equals to inherit
65+
*/
66+
public boolean isSoftlyInherited() {
67+
return value.equals(inherit);
68+
}
69+
70+
/**
71+
* Returns a string representation of the object.
72+
*/
73+
public String toString() {
74+
return value.toString();
75+
}
76+
77+
/**
78+
* Add this property to the CssStyle.
79+
*
80+
* @param style The CssStyle
81+
*/
82+
public void addToStyle(ApplContext ac, CssStyle style) {
83+
Css3Style s = (Css3Style) style;
84+
if (s.cssTextDecorationSkipInk != null) {
85+
style.addRedefinitionWarning(ac, this);
86+
}
87+
s.cssTextDecorationSkipInk = this;
88+
}
89+
90+
91+
/**
92+
* Compares two properties for equality.
93+
*
94+
* @param property The other property.
95+
*/
96+
public boolean equals(CssProperty property) {
97+
return (property instanceof CssTextDecorationSkipInk &&
98+
value.equals(((CssTextDecorationSkipInk) property).value));
99+
}
100+
101+
102+
/**
103+
* Get this property in the style.
104+
*
105+
* @param style The style where the property is
106+
* @param resolve if true, resolve the style to find this property
107+
*/
108+
public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
109+
if (resolve) {
110+
return ((Css3Style) style).getTextDecorationSkipInk();
111+
} else {
112+
return ((Css3Style) style).cssTextDecorationSkipInk;
113+
}
114+
}
115+
}
116+
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
//
2+
// Author: Yves Lafon <ylafon@w3.org>
3+
//
4+
// (c) COPYRIGHT MIT, ERCIM, Keio, Beihang, 2021.
5+
// Please first read the full copyright statement in file COPYRIGHT.html
6+
package org.w3c.css.properties.css;
7+
8+
import org.w3c.css.parser.CssStyle;
9+
import org.w3c.css.properties.css3.Css3Style;
10+
import org.w3c.css.util.ApplContext;
11+
import org.w3c.css.util.InvalidParamException;
12+
import org.w3c.css.values.CssExpression;
13+
import org.w3c.css.values.CssValue;
14+
15+
/**
16+
* @since CSS3
17+
*/
18+
public class CssTextDecorationSkipInset extends CssProperty {
19+
20+
public CssValue value;
21+
22+
/**
23+
* Create a new CssTextDecorationSkipInset
24+
*/
25+
public CssTextDecorationSkipInset() {
26+
}
27+
28+
/**
29+
* Creates a new CssTextDecorationSkipInset
30+
*
31+
* @param expression The expression for this property
32+
* @throws InvalidParamException
33+
* Expressions are incorrect
34+
*/
35+
public CssTextDecorationSkipInset(ApplContext ac, CssExpression expression, boolean check)
36+
throws InvalidParamException {
37+
throw new InvalidParamException("value",
38+
expression.getValue().toString(),
39+
getPropertyName(), ac);
40+
}
41+
42+
public CssTextDecorationSkipInset(ApplContext ac, CssExpression expression)
43+
throws InvalidParamException {
44+
this(ac, expression, false);
45+
}
46+
47+
/**
48+
* Returns the value of this property
49+
*/
50+
public Object get() {
51+
return value;
52+
}
53+
54+
55+
/**
56+
* Returns the name of this property
57+
*/
58+
public final String getPropertyName() {
59+
return "text-decoration-skip-inset";
60+
}
61+
62+
/**
63+
* Returns true if this property is "softly" inherited
64+
* e.g. his value is equals to inherit
65+
*/
66+
public boolean isSoftlyInherited() {
67+
return value.equals(inherit);
68+
}
69+
70+
/**
71+
* Returns a string representation of the object.
72+
*/
73+
public String toString() {
74+
return value.toString();
75+
}
76+
77+
/**
78+
* Add this property to the CssStyle.
79+
*
80+
* @param style The CssStyle
81+
*/
82+
public void addToStyle(ApplContext ac, CssStyle style) {
83+
Css3Style s = (Css3Style) style;
84+
if (s.cssTextDecorationSkipInset != null) {
85+
style.addRedefinitionWarning(ac, this);
86+
}
87+
s.cssTextDecorationSkipInset = this;
88+
}
89+
90+
91+
/**
92+
* Compares two properties for equality.
93+
*
94+
* @param property The other property.
95+
*/
96+
public boolean equals(CssProperty property) {
97+
return (property instanceof CssTextDecorationSkipInset &&
98+
value.equals(((CssTextDecorationSkipInset) property).value));
99+
}
100+
101+
102+
/**
103+
* Get this property in the style.
104+
*
105+
* @param style The style where the property is
106+
* @param resolve if true, resolve the style to find this property
107+
*/
108+
public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
109+
if (resolve) {
110+
return ((Css3Style) style).getTextDecorationSkipInset();
111+
} else {
112+
return ((Css3Style) style).cssTextDecorationSkipInset;
113+
}
114+
}
115+
}
116+

0 commit comments

Comments
 (0)