Skip to content

Commit fbe43c5

Browse files
authored
Merge pull request #417 from w3c/text-transform-4
text-4 updates
2 parents e409d4c + 1f1786f commit fbe43c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+4571
-83
lines changed

org/w3c/css/properties/CSS3Properties.properties

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,19 @@ overflow-wrap: org.w3c.css.properties.css3.CssOverflowW
194194
#alias per spec
195195
word-wrap: org.w3c.css.properties.css3.CssOverflowWrap
196196
word-break: org.w3c.css.properties.css3.CssWordBreak
197+
hanging-punctuation: org.w3c.css.properties.css3.CssHangingPunctuation
198+
hyphenate-character: org.w3c.css.properties.css3.CssHyphenateCharacter
199+
hyphenate-limit-chars: org.w3c.css.properties.css3.CssHyphenateLimitChars
200+
hyphenate-limit-last: org.w3c.css.properties.css3.CssHyphenateLimitLast
201+
hyphenate-limit-lines: org.w3c.css.properties.css3.CssHyphenateLimitLines
202+
hyphenate-limit-zone: org.w3c.css.properties.css3.CssHyphenateLimitZone
197203
hyphens: org.w3c.css.properties.css3.CssHyphens
198204
line-break: org.w3c.css.properties.css3.CssLineBreak
205+
line-padding: org.w3c.css.properties.css3.CssLinePadding
199206
text-align: org.w3c.css.properties.css3.CssTextAlign
200207
text-align-all: org.w3c.css.properties.css3.CssTextAlignAll
201208
text-align-last: org.w3c.css.properties.css3.CssTextAlignLast
209+
text-autospace: org.w3c.css.properties.css3.CssTextAutospace
202210
text-indent: org.w3c.css.properties.css3.CssTextIndent
203211
text-justify: org.w3c.css.properties.css3.CssTextJustify
204212
text-transform: org.w3c.css.properties.css3.CssTextTransform
@@ -217,15 +225,26 @@ text-emphasis: org.w3c.css.properties.css3.CssTextEmpha
217225
text-emphasis-color: org.w3c.css.properties.css3.CssTextEmphasisColor
218226
text-emphasis-position: org.w3c.css.properties.css3.CssTextEmphasisPosition
219227
text-emphasis-style: org.w3c.css.properties.css3.CssTextEmphasisStyle
228+
text-group-align: org.w3c.css.properties.css3.CssTextGroupAlign
220229
text-size-adjust: org.w3c.css.properties.css3.CssTextSizeAdjust
230+
text-spacing: org.w3c.css.properties.css3.CssTextSpacing
231+
text-spacing-trim: org.w3c.css.properties.css3.CssTextSpacingTrim
221232
text-underline-offset: org.w3c.css.properties.css3.CssTextUnderlineOffset
222233
text-underline-position: org.w3c.css.properties.css3.CssTextUnderlinePosition
234+
text-wrap: org.w3c.css.properties.css3.CssTextWrap
235+
text-wrap-mode: org.w3c.css.properties.css3.CssTextWrapMode
236+
text-wrap-style: org.w3c.css.properties.css3.CssTextWrapStyle
223237
tab-size: org.w3c.css.properties.css3.CssTabSize
224-
hanging-punctuation: org.w3c.css.properties.css3.CssHangingPunctuation
238+
wrap-after: org.w3c.css.properties.css3.CssWrapAfter
239+
wrap-before: org.w3c.css.properties.css3.CssWrapBefore
240+
wrap-inside: org.w3c.css.properties.css3.CssWrapInside
241+
white-space-collapse: org.w3c.css.properties.css3.CssWhiteSpaceCollapse
242+
white-space-trim: org.w3c.css.properties.css3.CssWhiteSpaceTrim
225243

226244
text-combine-upright: org.w3c.css.properties.css3.CssTextCombineUpright
227245
text-orientation: org.w3c.css.properties.css3.CssTextOrientation
228246
glyph-orientation-vertical: org.w3c.css.properties.css3.CssGlyphOrientationVertical
247+
word-space-transform: org.w3c.css.properties.css3.CssWordSpaceTransform
229248

230249

231250
# marquee
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
//
2+
// Author: Yves Lafon <ylafon@w3.org>
3+
//
4+
// (c) COPYRIGHT MIT, ERCIM, Keio, Beihang, 2022.
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+
14+
/**
15+
* @since CSS3
16+
*/
17+
public class CssHyphenateCharacter extends CssProperty {
18+
19+
/**
20+
* Create a new CssHyphenateCharacter
21+
*/
22+
public CssHyphenateCharacter() {
23+
}
24+
25+
/**
26+
* Creates a new CssHyphenateCharacter
27+
*
28+
* @param expression The expression for this property
29+
* @throws InvalidParamException Expressions are incorrect
30+
*/
31+
public CssHyphenateCharacter(ApplContext ac, CssExpression expression, boolean check)
32+
throws InvalidParamException {
33+
throw new InvalidParamException("value",
34+
expression.getValue().toString(),
35+
getPropertyName(), ac);
36+
}
37+
38+
public CssHyphenateCharacter(ApplContext ac, CssExpression expression)
39+
throws InvalidParamException {
40+
this(ac, expression, false);
41+
}
42+
43+
/**
44+
* Returns the value of this property
45+
*/
46+
public Object get() {
47+
return value;
48+
}
49+
50+
51+
/**
52+
* Returns the name of this property
53+
*/
54+
public final String getPropertyName() {
55+
return "hyphenate-character";
56+
}
57+
58+
/**
59+
* Returns true if this property is "softly" inherited
60+
* e.g. his value is equals to inherit
61+
*/
62+
public boolean isSoftlyInherited() {
63+
return value.equals(inherit);
64+
}
65+
66+
/**
67+
* Returns a string representation of the object.
68+
*/
69+
public String toString() {
70+
return value.toString();
71+
}
72+
73+
/**
74+
* Add this property to the CssStyle.
75+
*
76+
* @param style The CssStyle
77+
*/
78+
public void addToStyle(ApplContext ac, CssStyle style) {
79+
Css3Style s = (Css3Style) style;
80+
if (s.cssHyphenateCharacter != null) {
81+
style.addRedefinitionWarning(ac, this);
82+
}
83+
s.cssHyphenateCharacter = this;
84+
}
85+
86+
87+
/**
88+
* Compares two properties for equality.
89+
*
90+
* @param property The other property.
91+
*/
92+
public boolean equals(CssProperty property) {
93+
return (property instanceof CssHyphenateCharacter &&
94+
value.equals(((CssHyphenateCharacter) property).value));
95+
}
96+
97+
98+
/**
99+
* Get this property in the style.
100+
*
101+
* @param style The style where the property is
102+
* @param resolve if true, resolve the style to find this property
103+
*/
104+
public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
105+
if (resolve) {
106+
return ((Css3Style) style).getHyphenateCharacter();
107+
} else {
108+
return ((Css3Style) style).cssHyphenateCharacter;
109+
}
110+
}
111+
}
112+
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
//
2+
// Author: Yves Lafon <ylafon@w3.org>
3+
//
4+
// (c) COPYRIGHT MIT, ERCIM, Keio, Beihang, 2022.
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+
14+
/**
15+
* @since CSS3
16+
*/
17+
public class CssHyphenateLimitChars extends CssProperty {
18+
19+
/**
20+
* Create a new CssHyphenateLimitChars
21+
*/
22+
public CssHyphenateLimitChars() {
23+
}
24+
25+
/**
26+
* Creates a new CssHyphenateLimitChars
27+
*
28+
* @param expression The expression for this property
29+
* @throws InvalidParamException Expressions are incorrect
30+
*/
31+
public CssHyphenateLimitChars(ApplContext ac, CssExpression expression, boolean check)
32+
throws InvalidParamException {
33+
throw new InvalidParamException("value",
34+
expression.getValue().toString(),
35+
getPropertyName(), ac);
36+
}
37+
38+
public CssHyphenateLimitChars(ApplContext ac, CssExpression expression)
39+
throws InvalidParamException {
40+
this(ac, expression, false);
41+
}
42+
43+
/**
44+
* Returns the value of this property
45+
*/
46+
public Object get() {
47+
return value;
48+
}
49+
50+
51+
/**
52+
* Returns the name of this property
53+
*/
54+
public final String getPropertyName() {
55+
return "hyphenate-limit-chars";
56+
}
57+
58+
/**
59+
* Returns true if this property is "softly" inherited
60+
* e.g. his value is equals to inherit
61+
*/
62+
public boolean isSoftlyInherited() {
63+
return value.equals(inherit);
64+
}
65+
66+
/**
67+
* Returns a string representation of the object.
68+
*/
69+
public String toString() {
70+
return value.toString();
71+
}
72+
73+
/**
74+
* Add this property to the CssStyle.
75+
*
76+
* @param style The CssStyle
77+
*/
78+
public void addToStyle(ApplContext ac, CssStyle style) {
79+
Css3Style s = (Css3Style) style;
80+
if (s.cssHyphenateLimitChars != null) {
81+
style.addRedefinitionWarning(ac, this);
82+
}
83+
s.cssHyphenateLimitChars = this;
84+
}
85+
86+
87+
/**
88+
* Compares two properties for equality.
89+
*
90+
* @param property The other property.
91+
*/
92+
public boolean equals(CssProperty property) {
93+
return (property instanceof CssHyphenateLimitChars &&
94+
value.equals(((CssHyphenateLimitChars) property).value));
95+
}
96+
97+
98+
/**
99+
* Get this property in the style.
100+
*
101+
* @param style The style where the property is
102+
* @param resolve if true, resolve the style to find this property
103+
*/
104+
public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
105+
if (resolve) {
106+
return ((Css3Style) style).getHyphenateLimitChars();
107+
} else {
108+
return ((Css3Style) style).cssHyphenateLimitChars;
109+
}
110+
}
111+
}
112+
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
//
2+
// Author: Yves Lafon <ylafon@w3.org>
3+
//
4+
// (c) COPYRIGHT MIT, ERCIM, Keio, Beihang, 2022.
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+
14+
/**
15+
* @since CSS3
16+
*/
17+
public class CssHyphenateLimitLast extends CssProperty {
18+
19+
/**
20+
* Create a new CssHyphenateLimitLast
21+
*/
22+
public CssHyphenateLimitLast() {
23+
}
24+
25+
/**
26+
* Creates a new CssHyphenateLimitLast
27+
*
28+
* @param expression The expression for this property
29+
* @throws InvalidParamException Expressions are incorrect
30+
*/
31+
public CssHyphenateLimitLast(ApplContext ac, CssExpression expression, boolean check)
32+
throws InvalidParamException {
33+
throw new InvalidParamException("value",
34+
expression.getValue().toString(),
35+
getPropertyName(), ac);
36+
}
37+
38+
public CssHyphenateLimitLast(ApplContext ac, CssExpression expression)
39+
throws InvalidParamException {
40+
this(ac, expression, false);
41+
}
42+
43+
/**
44+
* Returns the value of this property
45+
*/
46+
public Object get() {
47+
return value;
48+
}
49+
50+
51+
/**
52+
* Returns the name of this property
53+
*/
54+
public final String getPropertyName() {
55+
return "hyphenate-limit-last";
56+
}
57+
58+
/**
59+
* Returns true if this property is "softly" inherited
60+
* e.g. his value is equals to inherit
61+
*/
62+
public boolean isSoftlyInherited() {
63+
return value.equals(inherit);
64+
}
65+
66+
/**
67+
* Returns a string representation of the object.
68+
*/
69+
public String toString() {
70+
return value.toString();
71+
}
72+
73+
/**
74+
* Add this property to the CssStyle.
75+
*
76+
* @param style The CssStyle
77+
*/
78+
public void addToStyle(ApplContext ac, CssStyle style) {
79+
Css3Style s = (Css3Style) style;
80+
if (s.cssHyphenateLimitLast != null) {
81+
style.addRedefinitionWarning(ac, this);
82+
}
83+
s.cssHyphenateLimitLast = this;
84+
}
85+
86+
87+
/**
88+
* Compares two properties for equality.
89+
*
90+
* @param property The other property.
91+
*/
92+
public boolean equals(CssProperty property) {
93+
return (property instanceof CssHyphenateLimitLast &&
94+
value.equals(((CssHyphenateLimitLast) property).value));
95+
}
96+
97+
98+
/**
99+
* Get this property in the style.
100+
*
101+
* @param style The style where the property is
102+
* @param resolve if true, resolve the style to find this property
103+
*/
104+
public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
105+
if (resolve) {
106+
return ((Css3Style) style).getHyphenateLimitLast();
107+
} else {
108+
return ((Css3Style) style).cssHyphenateLimitLast;
109+
}
110+
}
111+
}
112+

0 commit comments

Comments
 (0)