On Sun, 26 Apr 2026 05:59:48 GMT, Jeremy Wood <[email protected]> wrote:
>> I guess the accessibleContext is tied to the type of the document, so if the >> document is changed the accessibleContext should be updated/reset as well, >> correct? > > Sorry this delay. > > I rewrote the test, so hopefully it now covers more ground (in a more clear > way). Specifically for your question I added [this > test](https://github.com/openjdk/jdk/pull/30401/changes#diff-5b5087bc0acb0dae3c480443959d5c6a6504919d7db045e8ff1ff18f672307ffR105): > here I alternate changing the Document and make sure that we don't end up > with too many DocumentListeners. > > (There's also a stand-alone unit test for the original complaint, and a > stand-alone unit test for prrace's complaint.) > > Does this test satisfy your question? > > I also wrote a [fourth unit > test](https://github.com/mickleness/jdk/compare/8380790...mickleness:jdk:8380790C?expand=1) > in a separate branch: this fourth test constantly reassigns the _same_ > HTMLDocument. If anyone wants to discuss that further we can, but it feels > increasingly far removed from the problem this ticket is trying to address. >I guess the accessibleContext is tied to the type of the document, so if the >document is changed the accessibleContext should be updated/reset as well, >correct? How the "JEditorPane.getAccessibleContext" is updated if the editorKit and/or document was updated? How we will swap AccessibleJEditorPaneHTML/AccessibleJEditorPane based on editorKit and clean all that listeners? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30401#discussion_r3150374919
