File tree Expand file tree Collapse file tree
org/w3c/css/properties/css1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939import org .w3c .css .util .Util ;
4040import org .w3c .css .util .Warning ;
4141import org .w3c .css .util .Warnings ;
42- import org .w3c .css .values .CssLength ;
43- import org .w3c .css .values .CssPercentage ;
42+ import org .w3c .css .values .CssCheckableValue ;
4443import org .w3c .css .values .CssTypes ;
4544import org .w3c .css .values .CssValue ;
4645
@@ -1051,7 +1050,7 @@ final void compute(CssValue value) {
10511050 case CssTypes .CSS_PERCENTAGE :
10521051 // FIXME, it depends on the unit of the parent in the cascade.
10531052 try {
1054- CssPercentage percent = value .getPercentage ();
1053+ CssCheckableValue percent = value .getCheckableValue ();
10551054 if (!percent .isZero ()) {
10561055 relative = true ;
10571056 }
@@ -1061,13 +1060,15 @@ final void compute(CssValue value) {
10611060 break ;
10621061 case CssTypes .CSS_LENGTH :
10631062 try {
1064- CssLength length = value .getLength ();
1063+ CssCheckableValue length = value .getCheckableValue ();
10651064 // 0 is always 0, no need to check
10661065 if (!length .isZero ()) {
1067- if (length .isAbsolute ()) {
1068- absolute = true ;
1069- } else {
1070- relative = true ;
1066+ if (length .getRawType () == CssTypes .CSS_LENGTH ) {
1067+ if (length .getLength ().isAbsolute ()) {
1068+ absolute = true ;
1069+ } else {
1070+ relative = true ;
1071+ }
10711072 }
10721073 }
10731074 } catch (InvalidParamException ipe ) {
You can’t perform that action at this time.
0 commit comments