Remove FakeEmbeddingTextInfo which is no longer necessary.#16768
Conversation
WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant NVDA
participant ia2TextMozilla
User->>NVDA: Request text information
NVDA->>ia2TextMozilla: _getRawTextInfo()
ia2TextMozilla-->>NVDA: Returns TextInfo object
User->>NVDA: Request embedding info
NVDA->>ia2TextMozilla: _getEmbedding()
ia2TextMozilla-->>NVDA: Provides embedding information
User->>NVDA: Request unit endpoints
NVDA->>ia2TextMozilla: _findUnitEndpoints()
ia2TextMozilla-->>NVDA: Returns endpoints
Note over NVDA, ia2TextMozilla: Interaction after removal of FakeEmbeddingTextInfo
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
Note: this is an API breaking change, and as such has been delayed until 2025.1 This needs a changelog entry when the 2025.1 release entries are created |
|
Yeah. It's unfortunate because I very much doubt FakeEmbeddingTextInfo is used by anything - it's just far too specific to an internal implementation detail - but it isn't underscore prefixed, so it has to be considered public. That said, it really doesn't matter when this gets merged given that it's just cleanup. |
|
Can you fix merge conflicts and add a an API removal notice to the changes for developers for 2025.1? |
# Conflicts: # source/NVDAObjects/IAccessible/ia2TextMozilla.py
|
Thanks @SaschaCowley. I had intended to get to this, but just... hadn't yet. :) |
Link to issue number:
None.
Summary of the issue:
ia2TextMozilla.FakeEmbeddingTextInfo was necessary when Firefox didn't support IAccessibleText on tables and table rows. However, that was fixed 6 years ago in Mozilla bug 1052866. Now, this NVDA code is never used.
Description of user facing changes
None. I have not included a change log entry because this is purely code cleanup and has no impact for users or add-on developers.
Description of development approach
Removed the code.
Note that this code mentions a hack for Mozilla bug 1169238. That hack couldn't have worked once Mozilla bug 1052866 was fixed because we never would have used FakeEmbeddingTextInfo after that. Regardless, Mozilla bug 1169238 was fixed over a year ago and that fix is available in all supported versions of Firefox.
Testing strategy:
Test case:
data:text/html,<button>Before</button><div contentEditable="true">foo<table><tr><th>1</th><td>2</td></tr></table>bar</div>In both Firefox and Chrome (results the same before and after this PR):
Known issues with pull request:
None.
Code Review Checklist:
Summary by CodeRabbit
FakeEmbeddingTextInfoclass and updating related methods for more efficient processing.