code: private static CSSClipRect  parseClip(String val)
     {
        if ("auto".equals(val))
           return null;
        if (!val.startsWith("rect("))
           return null;
  
        TextScanner scan = new TextScanner(val.substring(5));
        scan.skipWhitespace();
  
        Length top = parseLengthOrAuto(scan);
        scan.skipCommaWhitespace();
        Length right = parseLengthOrAuto(scan);
        scan.skipCommaWhitespace();
        Length bottom = parseLengthOrAuto(scan);
        scan.skipCommaWhitespace();
        Length left = parseLengthOrAuto(scan);
  
        scan.skipWhitespace();
        if (!scan.consume(')') && !scan.empty())   // Be forgibing. Allow missing ')'.
           return null;
  
        return new CSSClipRect(top, right, bottom, left);
     }
docs: Parse CSS clip shape (always a rect())