Clean up caret rect code
Categories
(Core :: Disability Access APIs, task)
Tracking
()
People
(Reporter: Jamie, Assigned: Jamie)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-release+
|
Details | Review |
In bug 1966812, GetCaretRect is being unified into HyperTextAccessibleBase. That means we can clean up a bunch of things:
- On Windows, there are different versions of AccessibleWrap::UpdateSystemCaretFor for local and remote. These can be unified into a single function which uses HyperTextAccessibleBase::GetCaretRect. It might even make sense to just move this into Platform.cpp.
- PlatformFocusEvent and PlatformCaretEvent currently take a caret rect. For LocalAccessible, this is empty on all platforms. We should just get rid of this argument and have platforms call GetCaretRect if they need it.
- DocAccessibleChild::GetCaretRectFor should take a LocalAccessible, rather than an id. Calling ID() is a lot nicer than reinterpret_cast. This will require an equivalent change to SendFocusEvent and SendCaretMoveEvent.
| Assignee | ||
Comment 1•6 months ago
|
||
If bug 1966812 doesn't do this, we should also probably make GetCaretRect return `std::pair<mozilla::LayoutDeviceIntRect, nsIWidget*> instead of taking nsIWidget as an out parameter.
| Assignee | ||
Updated•6 months ago
|
| Assignee | ||
Comment 2•6 months ago
|
||
Previously, we had separate versions for LocalAccessible and RemoteAccessible.
Now that GetCaretRect is unified (bug 1966812), we can unify these into a single function.
| Assignee | ||
Comment 3•6 months ago
|
||
This is only in AccessibleWrap for vestigial reasons.
These days, it has nothing to do with AccessibleWrap at all.
This just moves the code with no changes.
| Assignee | ||
Comment 4•6 months ago
|
||
This argument was provided inconsistently.
it wasn't even used on Windows for LocalAccessible because we need the nsIWidget there.
Now that we have unified GetCaretRect, it isn't necessary, so just get rid of it.
| Assignee | ||
Comment 5•6 months ago
|
||
Instead of overriding these with intermediate functions that get and pass the caret rect, just get and pass it directly.
This avoids indirection and thus makes the code easier to follow and reason about.
I think this indirection was originally added because the need for the caret rect was previously Windows specific, but it isn't any longer.
Comment 8•6 months ago
|
||
Backed out for causing build bustages @ Platform.cpp
Backout link: https://hg-edge.mozilla.org/integration/autoland/rev/8b0d004a4d3f03394d1e7072f95d95a65415a0dc
| Assignee | ||
Updated•6 months ago
|
Comment 10•6 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/0b6a16b23cdd
https://hg.mozilla.org/mozilla-central/rev/569c9a52612c
https://hg.mozilla.org/mozilla-central/rev/c86d497de229
https://hg.mozilla.org/mozilla-central/rev/ab5d9681e738
https://hg.mozilla.org/mozilla-central/rev/e70925dcdcd7
Updated•5 months ago
|
| Assignee | ||
Comment 11•5 months ago
|
||
Previously, we had separate versions for LocalAccessible and RemoteAccessible.
Now that GetCaretRect is unified (bug 1966812), we can unify these into a single function.
Original Revision: https://phabricator.services.mozilla.com/D256563
Updated•5 months ago
|
Comment 12•5 months ago
|
||
firefox-release Uplift Approval Request
- User impact if declined: Breaks text entry with Windows Magnifier (bug 1984045).
- Code covered by automated testing: yes
- Fix verified in Nightly: yes
- Needs manual QE test: no
- Steps to reproduce for manual QE testing: not applicable
- Risk associated with taking this patch: low
- Explanation of risk level: Baked for almost a full Nightly cycle. Changes Windows specific code to use a cross-platform function which is well covered by automated tests.
- String changes made/needed: none
- Is Android affected?: no
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Comment 13•5 months ago
|
||
| uplift | ||
Description
•