docs: @CheckReturnValue
    Context transitionToState(HtmlContext state) {
      Context.Builder builder = toBuilder().withState(state).withUriPart(UriPart.NONE);
      if (uriPart != UriPart.NONE) {
        // Only reset the URI type if we're leaving a URI; intentionally, URI type needs to
        // remain prior to the URI, for example, to maintain state between "src", the "=", and
        // the opening quotes (if any).
        builder.withUriType(UriType.NONE);
      }
      return builder.build();
    }