File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -631,7 +631,7 @@ public void setHSLAColor(CssExpression exp, ApplContext ac)
631631 public void setHWBColor (CssExpression exp , ApplContext ac )
632632 throws InvalidParamException {
633633 // HWB defined in CSSColor Level 4 and onward, currently used in the CSS level
634- if (ac .getCssVersion ().compareTo (CssVersion .CSS ) < 0 ) {
634+ if (ac .getCssVersion ().compareTo (CssVersion .CSS3 ) < 0 ) {
635635 StringBuilder sb = new StringBuilder ();
636636 sb .append ("hwb(" ).append (exp .toStringFromStart ()).append (')' );
637637 throw new InvalidParamException ("notversion" , sb .toString (),
@@ -675,7 +675,7 @@ public void setHWBColor(CssExpression exp, ApplContext ac)
675675 exp .next ();
676676 val = exp .getValue ();
677677 op = exp .getOperator ();
678- if (val == null || op != COMMA ) {
678+ if (val == null || ( op != COMMA && exp . getRemainingCount () > 1 ) ) {
679679 exp .starts ();
680680 throw new InvalidParamException ("invalid-color" , ac );
681681 }
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ public final void setAlpha(ApplContext ac, CssValue val)
7575 throws InvalidParamException {
7676 output = null ;
7777 faSet = true ;
78- vb = RGBA .filterAlpha (ac , val );
78+ va = RGBA .filterAlpha (ac , val );
7979 }
8080
8181 public void normalize () {
@@ -110,7 +110,7 @@ public String toString() {
110110 sb .append (vh ).append (", " );
111111 sb .append (vw ).append (", " );
112112 sb .append (vb );
113- if (faSet ) {
113+ if (! faSet ) {
114114 sb .append (")" );
115115 } else {
116116 sb .append (", " ).append (va ).append (')' );
You can’t perform that action at this time.
0 commit comments