Skip to content

Commit 283ee60

Browse files
committed
1 parent 69ce215 commit 283ee60

File tree

6 files changed

+336
-0
lines changed

6 files changed

+336
-0
lines changed

org/w3c/css/properties/CSS3Properties.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,8 @@ nav-up: org.w3c.css.properties.css3.CssNavUp
518518
nav-right: org.w3c.css.properties.css3.CssNavRight
519519
nav-down: org.w3c.css.properties.css3.CssNavDown
520520
nav-left: org.w3c.css.properties.css3.CssNavLeft
521+
overflow-block: org.w3c.css.properties.css3.CssOverflowBlock
522+
overflow-inline: org.w3c.css.properties.css3.CssOverflowInline
521523
overflow-x: org.w3c.css.properties.css3.CssOverflowX
522524
overflow-y: org.w3c.css.properties.css3.CssOverflowY
523525
ruby-span: org.w3c.css.properties.css3.CssRubySpan
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
//
2+
// Author: Yves Lafon <ylafon@w3.org>
3+
//
4+
// (c) COPYRIGHT W3C, 2026.
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 CssOverflowBlock extends CssProperty {
18+
19+
20+
/**
21+
* Create a new CssOverflowBlock
22+
*/
23+
public CssOverflowBlock() {
24+
}
25+
26+
/**
27+
* Creates a new CssOverflowBlock
28+
*
29+
* @param expression The expression for this property
30+
* @throws InvalidParamException
31+
* Expressions are incorrect
32+
*/
33+
public CssOverflowBlock(ApplContext ac, CssExpression expression, boolean check)
34+
throws InvalidParamException {
35+
throw new InvalidParamException("value",
36+
expression.getValue().toString(),
37+
getPropertyName(), ac);
38+
}
39+
40+
public CssOverflowBlock(ApplContext ac, CssExpression expression)
41+
throws InvalidParamException {
42+
this(ac, expression, false);
43+
}
44+
45+
/**
46+
* Returns the value of this property
47+
*/
48+
public Object get() {
49+
return value;
50+
}
51+
52+
53+
/**
54+
* Returns the name of this property
55+
*/
56+
public final String getPropertyName() {
57+
return "overflow-block";
58+
}
59+
60+
/**
61+
* Returns true if this property is "softly" inherited
62+
* e.g. his value is equals to inherit
63+
*/
64+
public boolean isSoftlyInherited() {
65+
return inherit.equals(value);
66+
}
67+
68+
/**
69+
* Returns a string representation of the object.
70+
*/
71+
public String toString() {
72+
return value.toString();
73+
}
74+
75+
/**
76+
* Add this property to the CssStyle.
77+
*
78+
* @param style The CssStyle
79+
*/
80+
public void addToStyle(ApplContext ac, CssStyle style) {
81+
if (((Css3Style) style).cssOverflowBlock != null)
82+
style.addRedefinitionWarning(ac, this);
83+
((Css3Style) style).cssOverflowBlock = this;
84+
}
85+
86+
/**
87+
* Compares two properties for equality.
88+
*
89+
* @param property The other property.
90+
*/
91+
public boolean equals(CssProperty property) {
92+
return (property instanceof CssOverflowBlock &&
93+
value.equals(((CssOverflowBlock) property).value));
94+
}
95+
96+
97+
/**
98+
* Get this property in the style.
99+
*
100+
* @param style The style where the property is
101+
* @param resolve if true, resolve the style to find this property
102+
*/
103+
public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
104+
if (resolve) {
105+
return ((Css3Style) style).getOverflowBlock();
106+
} else {
107+
return ((Css3Style) style).cssOverflowBlock;
108+
}
109+
}
110+
}
111+
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
//
2+
// Author: Yves Lafon <ylafon@w3.org>
3+
//
4+
// (c) COPYRIGHT W3C, 2026.
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 CssOverflowInline extends CssProperty {
18+
19+
20+
/**
21+
* Create a new CssOverflowInline
22+
*/
23+
public CssOverflowInline() {
24+
}
25+
26+
/**
27+
* Creates a new CssOverflowInline
28+
*
29+
* @param expression The expression for this property
30+
* @throws InvalidParamException
31+
* Expressions are incorrect
32+
*/
33+
public CssOverflowInline(ApplContext ac, CssExpression expression, boolean check)
34+
throws InvalidParamException {
35+
throw new InvalidParamException("value",
36+
expression.getValue().toString(),
37+
getPropertyName(), ac);
38+
}
39+
40+
public CssOverflowInline(ApplContext ac, CssExpression expression)
41+
throws InvalidParamException {
42+
this(ac, expression, false);
43+
}
44+
45+
/**
46+
* Returns the value of this property
47+
*/
48+
public Object get() {
49+
return value;
50+
}
51+
52+
53+
/**
54+
* Returns the name of this property
55+
*/
56+
public final String getPropertyName() {
57+
return "overflow-block";
58+
}
59+
60+
/**
61+
* Returns true if this property is "softly" inherited
62+
* e.g. his value is equals to inherit
63+
*/
64+
public boolean isSoftlyInherited() {
65+
return inherit.equals(value);
66+
}
67+
68+
/**
69+
* Returns a string representation of the object.
70+
*/
71+
public String toString() {
72+
return value.toString();
73+
}
74+
75+
/**
76+
* Add this property to the CssStyle.
77+
*
78+
* @param style The CssStyle
79+
*/
80+
public void addToStyle(ApplContext ac, CssStyle style) {
81+
if (((Css3Style) style).cssOverflowInline != null)
82+
style.addRedefinitionWarning(ac, this);
83+
((Css3Style) style).cssOverflowInline = this;
84+
}
85+
86+
/**
87+
* Compares two properties for equality.
88+
*
89+
* @param property The other property.
90+
*/
91+
public boolean equals(CssProperty property) {
92+
return (property instanceof CssOverflowInline &&
93+
value.equals(((CssOverflowInline) property).value));
94+
}
95+
96+
97+
/**
98+
* Get this property in the style.
99+
*
100+
* @param style The style where the property is
101+
* @param resolve if true, resolve the style to find this property
102+
*/
103+
public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
104+
if (resolve) {
105+
return ((Css3Style) style).getOverflowInline();
106+
} else {
107+
return ((Css3Style) style).cssOverflowInline;
108+
}
109+
}
110+
}
111+

org/w3c/css/properties/css3/Css3Style.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@
201201
import org.w3c.css.properties.css.CssOrder;
202202
import org.w3c.css.properties.css.CssOutlineOffset;
203203
import org.w3c.css.properties.css.CssOverflowAnchor;
204+
import org.w3c.css.properties.css.CssOverflowBlock;
205+
import org.w3c.css.properties.css.CssOverflowInline;
204206
import org.w3c.css.properties.css.CssOverflowStyle;
205207
import org.w3c.css.properties.css.CssOverflowWrap;
206208
import org.w3c.css.properties.css.CssOverflowX;
@@ -590,6 +592,8 @@ public class Css3Style extends ATSCStyle {
590592

591593
public CssOverflowX cssOverflowX;
592594
public CssOverflowY cssOverflowY;
595+
public CssOverflowBlock cssOverflowBlock;
596+
public CssOverflowInline cssOverflowInline;
593597

594598
public CssObjectFit cssObjectFit;
595599
public CssObjectPosition cssObjectPosition;
@@ -3004,6 +3008,24 @@ public CssOverflowY getOverflowY() {
30043008
return cssOverflowY;
30053009
}
30063010

3011+
public CssOverflowBlock getOverflowBlock() {
3012+
if (cssOverflowBlock == null) {
3013+
cssOverflowBlock =
3014+
(CssOverflowBlock) style.CascadingOrder(
3015+
new CssOverflowBlock(), style, selector);
3016+
}
3017+
return cssOverflowBlock;
3018+
}
3019+
3020+
public CssOverflowInline getOverflowInline() {
3021+
if (cssOverflowInline == null) {
3022+
cssOverflowInline =
3023+
(CssOverflowInline) style.CascadingOrder(
3024+
new CssOverflowInline(), style, selector);
3025+
}
3026+
return cssOverflowInline;
3027+
}
3028+
30073029
public CssRubySpan getRubySpan() {
30083030
if (cssRubySpan == null) {
30093031
cssRubySpan =
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
//
2+
// Author: Yves Lafon <ylafon@w3.org>
3+
//
4+
// (c) COPYRIGHT W3C, 2026.
5+
// Please first read the full copyright statement in file COPYRIGHT.html
6+
package org.w3c.css.properties.css3;
7+
8+
import org.w3c.css.util.ApplContext;
9+
import org.w3c.css.util.InvalidParamException;
10+
import org.w3c.css.values.CssExpression;
11+
12+
/**
13+
* @spec https://www.w3.org/TR/2025/WD-css-overflow-3-20251007/#propdef-overflow-block
14+
* @see CssOverflow
15+
*/
16+
public class CssOverflowBlock extends org.w3c.css.properties.css.CssOverflowBlock {
17+
18+
/**
19+
* Create a new CssOverflowBlock
20+
*/
21+
public CssOverflowBlock() {
22+
value = initial;
23+
}
24+
25+
/**
26+
* Creates a new CssOverflowBlock
27+
*
28+
* @param expression The expression for this property
29+
* @throws InvalidParamException
30+
* Expressions are incorrect
31+
*/
32+
public CssOverflowBlock(ApplContext ac, CssExpression expression, boolean check)
33+
throws InvalidParamException {
34+
setByUser();
35+
value = CssOverflow.checkOverflowAxis(ac, expression, check, this);
36+
}
37+
38+
public CssOverflowBlock(ApplContext ac, CssExpression expression)
39+
throws InvalidParamException {
40+
this(ac, expression, false);
41+
}
42+
43+
44+
}
45+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
//
2+
// Author: Yves Lafon <ylafon@w3.org>
3+
//
4+
// (c) COPYRIGHT W3C, 2026.
5+
// Please first read the full copyright statement in file COPYRIGHT.html
6+
package org.w3c.css.properties.css3;
7+
8+
import org.w3c.css.util.ApplContext;
9+
import org.w3c.css.util.InvalidParamException;
10+
import org.w3c.css.values.CssExpression;
11+
12+
/**
13+
* @spec https://www.w3.org/TR/2025/WD-css-overflow-3-20251007/#propdef-overflow-inline
14+
* @see CssOverflow
15+
*/
16+
public class CssOverflowInline extends org.w3c.css.properties.css.CssOverflowInline {
17+
18+
/**
19+
* Create a new CssOverflowInline
20+
*/
21+
public CssOverflowInline() {
22+
value = initial;
23+
}
24+
25+
/**
26+
* Creates a new CssOverflowInline
27+
*
28+
* @param expression The expression for this property
29+
* @throws InvalidParamException
30+
* Expressions are incorrect
31+
*/
32+
public CssOverflowInline(ApplContext ac, CssExpression expression, boolean check)
33+
throws InvalidParamException {
34+
setByUser();
35+
value = CssOverflow.checkOverflowAxis(ac, expression, check, this);
36+
}
37+
38+
public CssOverflowInline(ApplContext ac, CssExpression expression)
39+
throws InvalidParamException {
40+
this(ac, expression, false);
41+
}
42+
43+
44+
}
45+

0 commit comments

Comments
 (0)