Skip to content

Commit 6e45dfe

Browse files
authored
Merge pull request #496 from w3c/overflow
Overflow
2 parents b9bf03a + 629ef67 commit 6e45dfe

10 files changed

+825
-0
lines changed

org/w3c/css/properties/CSS3Properties.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,12 @@ 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-clip-margin: org.w3c.css.properties.css3.CssOverflowClipMargin
523+
overflow-inline: org.w3c.css.properties.css3.CssOverflowInline
521524
overflow-x: org.w3c.css.properties.css3.CssOverflowX
522525
overflow-y: org.w3c.css.properties.css3.CssOverflowY
526+
scrollbar-gutter: org.w3c.css.properties.css3.CssScrollbarGutter
523527
ruby-span: org.w3c.css.properties.css3.CssRubySpan
524528

525529
filter: org.w3c.css.properties.css3.CssFilter
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 CssOverflowClipMargin extends CssProperty {
18+
19+
20+
/**
21+
* Create a new CssOverflowClipMargin
22+
*/
23+
public CssOverflowClipMargin() {
24+
}
25+
26+
/**
27+
* Creates a new CssOverflowClipMargin
28+
*
29+
* @param expression The expression for this property
30+
* @throws InvalidParamException
31+
* Expressions are incorrect
32+
*/
33+
public CssOverflowClipMargin(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 CssOverflowClipMargin(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-clip-margin";
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).cssOverflowClipMargin != null)
82+
style.addRedefinitionWarning(ac, this);
83+
((Css3Style) style).cssOverflowClipMargin = 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 CssOverflowClipMargin &&
93+
value.equals(((CssOverflowClipMargin) 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).getOverflowClipMargin();
106+
} else {
107+
return ((Css3Style) style).cssOverflowClipMargin;
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+

0 commit comments

Comments
 (0)