RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated [v3]
Alexey Ivanov
aivanov at openjdk.java.net
Tue Jun 7 19:19:40 UTC 2022
On Mon, 6 Jun 2022 16:28:22 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:
>> I see your points and agree that your points are valid. Parser has no part in the display and is fact handled elsewhere.
>>
>> I initially had to look through and learn what each class for HTML parsing is responsible for, and Parser is meant to handle reading chars and adding the chars to a buffer to be processed elsewhere. In this case, I found the HTML contents were routed to DocumentParser. And from there, I had to trace the stack and add debugging statements to find that hidden tags were responsible for the specialized text fields and text areas that appeared.
>>
>> I'll definitely iterate on the documentation to increase clarity and remove mention of HiddenTagView.
>
> The editor kit is responsible for delegating which tags will be displayed this way. The list of tags supported can be located in the HTML class, and it's worth noting that script tag is among the tags listed here. But, there is another list of tags in the editor kit's code which are the tags that do not have full support. Script tags are one of these tags; another example being title tags. These tags that are not fully supported, alongside unknown tags, are being passed into HiddenTagView and being displayed as such. So, I tried simplifying the doc description to state the behavior as relevant to the Parser class only. Maybe additional documentation is required in HTMLEditorKit as well?
Do we want to say anything about them being hidden when editable is set to false?
If I add the following line to the test:
jep.setEditable(false);
Then the script tags are hidden from view.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7446
More information about the client-libs-dev
mailing list