Re: RFR: 8247957: remove doclint support for HTML 4 [v3]

2020-12-17 Thread Yoshiki Sato
On Thu, 17 Dec 2020 04:58:21 GMT, Jonathan Gibbons  wrote:

>> Yoshiki Sato has refreshed the contents of this pull request, and previous 
>> commits have been removed. The incremental views will show differences 
>> compared to the previous content of the PR. The pull request contains one 
>> new commit since the last revision:
>> 
>>   8257204 and 8256313
>>   8257204: Remove usage of -Xhtmlversion option from javac
>>   8256313: JavaCompilation.gmk needs to be updated not to use 
>> --doclint-format html5 option
>
> Mostly OK; some minor suggestions

Some related changes to 8258460 in closed repo is here.
https://orahub.oci.oraclecorp.com/yoshiki_sato/jdk/-/merge_requests/new?merge_request%5Bsource_branch%5D=JDK-8247957_2

-

PR: https://git.openjdk.java.net/jdk/pull/893


Re: RFR: 8247957: remove doclint support for HTML 4 [v3]

2020-12-16 Thread Yoshiki Sato
On Thu, 17 Dec 2020 04:48:44 GMT, Jonathan Gibbons  wrote:

>> OK: valid
>> OBSOLETE: obsolete, deprecated, but still supported (valid)
>> UNSUPPORTED: ever supported but no longer supported (invalid)
>> INVALID: the rest of others (invalid)
>> 
>> UNSUPPORTED can be used if we would like to choose a friendly message 
>> instead of saying "unknown tag" only.
>> OBSOLETE is not used anywhere in this commit.  Although HTML5 has some 
>> obsolete features, 
>> [JDK-8215577](https://bugs.openjdk.java.net/browse/JDK-8215577) didn't 
>> define them as valid features if my understanding is correct.  So I chose 
>> not to allow obsolete features in order to avoid inconsistency.
>
> For both `ElemKind` and `AttrKind` there only seem to be two kinds:
> * valid
> * previously valid
> 
> For these two cases, `OK` is obviously reasonable for `valid`, but `OBSOLETE` 
> seems a better fit than `UNSUPPORTED`, but you could also use `HTML4` or 
> `OLD_HTML4` or something like that to indicate why we're keeping the name 
> around for better messages.  Or, stay with `UNSUPPORTED` but add a doc 
> comment explaining that it was previously supported but no longer supported

Ok, I will use `HTML4`.

-

PR: https://git.openjdk.java.net/jdk/pull/893


Re: RFR: 8247957: remove doclint support for HTML 4 [v3]

2020-12-16 Thread Yoshiki Sato
On Thu, 17 Dec 2020 04:52:48 GMT, Jonathan Gibbons  wrote:

>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/resources/doclint.properties
>>  line 36:
>> 
>>> 34: dc.attr.img.border.not.number = attribute "border" for img is not a 
>>> number
>>> 35: dc.attr.table.border.not.valid = attribute "border" for table only 
>>> accepts "" or "1", use CSS instead: {0}
>>> 36: dc.attr.table.border.not.number = attribute "border" for table is not a 
>>> number
>> 
>> suggest dropping "use CSS instead"
>
> The wording of `attribute "border" for img is not a number` seems strange.
> Suggest something like `invalid value for attribute "border": {0}`

Ok, I will fix that.

-

PR: https://git.openjdk.java.net/jdk/pull/893


Re: RFR: 8247957: remove doclint support for HTML 4 [v3]

2020-12-16 Thread Jonathan Gibbons
On Thu, 17 Dec 2020 01:40:14 GMT, Yoshiki Sato  wrote:

>> HTML4 is no longer supported in javadoc.
>> 
>> doclint needs to drop HTML4 support as well.
>> The changes consist of:
>> * Removing jdk.javadoc.internal.doclint.HtmlVersion and its references.
>> * Sorting out supported tags and attributes in HTML5 (including fix 
>> incorrect permission of valign in TH, TR, TD, THEAD and TBODY)
>> * Modifying test code and expected outputs to be checked in HTML5
>
> Yoshiki Sato has refreshed the contents of this pull request, and previous 
> commits have been removed. The incremental views will show differences 
> compared to the previous content of the PR. The pull request contains one new 
> commit since the last revision:
> 
>   8257204 and 8256313
>   8257204: Remove usage of -Xhtmlversion option from javac
>   8256313: JavaCompilation.gmk needs to be updated not to use 
> --doclint-format html5 option

Mostly OK; some minor suggestions

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/resources/doclint.properties
 line 36:

> 34: dc.attr.img.border.not.number = attribute "border" for img is not a number
> 35: dc.attr.table.border.not.valid = attribute "border" for table only 
> accepts "" or "1", use CSS instead: {0}
> 36: dc.attr.table.border.not.number = attribute "border" for table is not a 
> number

suggest dropping "use CSS instead"

-

PR: https://git.openjdk.java.net/jdk/pull/893


Re: RFR: 8247957: remove doclint support for HTML 4 [v3]

2020-12-16 Thread Jonathan Gibbons
On Thu, 17 Dec 2020 04:50:59 GMT, Jonathan Gibbons  wrote:

>> Yoshiki Sato has refreshed the contents of this pull request, and previous 
>> commits have been removed. The incremental views will show differences 
>> compared to the previous content of the PR. The pull request contains one 
>> new commit since the last revision:
>> 
>>   8257204 and 8256313
>>   8257204: Remove usage of -Xhtmlversion option from javac
>>   8256313: JavaCompilation.gmk needs to be updated not to use 
>> --doclint-format html5 option
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/resources/doclint.properties
>  line 36:
> 
>> 34: dc.attr.img.border.not.number = attribute "border" for img is not a 
>> number
>> 35: dc.attr.table.border.not.valid = attribute "border" for table only 
>> accepts "" or "1", use CSS instead: {0}
>> 36: dc.attr.table.border.not.number = attribute "border" for table is not a 
>> number
> 
> suggest dropping "use CSS instead"

The wording of `attribute "border" for img is not a number` seems strange.
Suggest something like `invalid value for attribute "border": {0}`

-

PR: https://git.openjdk.java.net/jdk/pull/893


Re: RFR: 8247957: remove doclint support for HTML 4 [v3]

2020-12-16 Thread Jonathan Gibbons
On Thu, 12 Nov 2020 03:10:01 GMT, Yoshiki Sato  wrote:

>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/HtmlTag.java line 
>> 410:
>> 
>>> 408: OBSOLETE,
>>> 409: UNSUPPORTED
>>> 410: }
>> 
>> On one hand, I don't think we need this level of detail, but on the other, I 
>> see it closely matches `AttrKind`, so OK.
>> 
>> Is there are useful distinction between INVALID / OBSOLETE / UNSUPPORTED ?
>
> OK: valid
> OBSOLETE: obsolete, deprecated, but still supported (valid)
> UNSUPPORTED: ever supported but no longer supported (invalid)
> INVALID: the rest of others (invalid)
> 
> UNSUPPORTED can be used if we would like to choose a friendly message instead 
> of saying "unknown tag" only.
> OBSOLETE is not used anywhere in this commit.  Although HTML5 has some 
> obsolete features, 
> [JDK-8215577](https://bugs.openjdk.java.net/browse/JDK-8215577) didn't define 
> them as valid features if my understanding is correct.  So I chose not to 
> allow obsolete features in order to avoid inconsistency.

For both `ElemKind` and `AttrKind` there only seem to be two kinds:
* valid
* previously valid

For these two cases, `OK` is obviously reasonable for `valid`, but `OBSOLETE` 
seems a better fit than `UNSUPPORTED`, but you could also use `HTML4` or 
`OLD_HTML4` or something like that to indicate why we're keeping the name 
around for better messages.  Or, stay with `UNSUPPORTED` but add a doc comment 
explaining that it was previously supported but no longer supported

-

PR: https://git.openjdk.java.net/jdk/pull/893


Re: RFR: 8247957: remove doclint support for HTML 4 [v3]

2020-12-16 Thread Yoshiki Sato
> HTML4 is no longer supported in javadoc.
> 
> doclint needs to drop HTML4 support as well.
> The changes consist of:
> * Removing jdk.javadoc.internal.doclint.HtmlVersion and its references.
> * Sorting out supported tags and attributes in HTML5 (including fix incorrect 
> permission of valign in TH, TR, TD, THEAD and TBODY)
> * Modifying test code and expected outputs to be checked in HTML5

Yoshiki Sato has refreshed the contents of this pull request, and previous 
commits have been removed. The incremental views will show differences compared 
to the previous content of the PR. The pull request contains one new commit 
since the last revision:

  8257204 and 8256313
  8257204: Remove usage of -Xhtmlversion option from javac
  8256313: JavaCompilation.gmk needs to be updated not to use --doclint-format 
html5 option

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/893/files
  - new: https://git.openjdk.java.net/jdk/pull/893/files/294b3cce..30db3882

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=893=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=893=01-02

  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/893.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/893/head:pull/893

PR: https://git.openjdk.java.net/jdk/pull/893