Closed Bug 1763191 Opened 2 years ago Closed 2 years ago

Support RemoteAccessibles in screen coordinate conversion functions

Categories

(Core :: Disability Access APIs, defect, P2)

defect

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: morgan, Assigned: morgan)

References

Details

Attachments

(1 file)

TextBounds() and CharBounds() both require we support various coordinate types: parent relative, screen relative, and window relative.
Currently, the functions we use for those conversions (see nsAccUtils::ConvertToScreenCoords and nsCoreUtils::GetScreenCoordsForWindow among others) only support LocalAccessibles. As we move away from sync IPC and towards our caching infrastructure, the remote versions of [Text|Char]Bounds() will no longer depend on the local implementations. As a result, we need to support the coordinate conversion functions for RemoteAccessibles explicitly.

Let's do that here.

Attachment #9270933 - Attachment description: WIP: Bug 1763191: Add suppport for cached remote accessibles in coordinate conversion functions r?eeejay → Bug 1763191: Add suppport for cached remote accessibles in coordinate conversion functions r?eeejay
Attachment #9270933 - Attachment description: Bug 1763191: Add suppport for cached remote accessibles in coordinate conversion functions r?eeejay → Bug 1763191: Add suppport for remote accessibles in coordinate conversion functions r?eeejay
Attachment #9270933 - Attachment description: Bug 1763191: Add suppport for remote accessibles in coordinate conversion functions r?eeejay → Bug 1763191: Add suppport for cached remote accessibles in coordinate conversion functions r?eeejay
Pushed by mreschenberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b424302d8ba0
Add suppport for cached remote accessibles in coordinate conversion functions r=eeejay

Backed out for causing Bp-hybrid bustages on nsAccUtils.

Push with failures

Failure log

Backout link

[task 2022-04-18T17:41:01.827Z] 17:41:01     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/accessible/base'
[task 2022-04-18T17:41:01.831Z] 17:41:01     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ --sysroot /builds/worker/fetches/MacOSX10.12.sdk -mmacosx-version-min=10.12 -stdlib=libc++ -std=gnu++17 --target=x86_64-apple-darwin -o nsAccUtils.o -c  -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_MACOSX=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/accessible/base -I/builds/worker/workspace/obj-build/accessible/base -I/builds/worker/checkouts/gecko/accessible/generic -I/builds/worker/checkouts/gecko/accessible/html -I/builds/worker/checkouts/gecko/accessible/ipc -I/builds/worker/checkouts/gecko/dom/base -I/builds/worker/checkouts/gecko/dom/xul -I/builds/worker/checkouts/gecko/accessible/ipc/other -I/builds/worker/checkouts/gecko/accessible/xpcom -I/builds/worker/checkouts/gecko/accessible/xul -I/builds/worker/checkouts/gecko/dom/base -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/checkouts/gecko/layout/generic -I/builds/worker/checkouts/gecko/layout/style -I/builds/worker/checkouts/gecko/layout/xul -I/builds/worker/checkouts/gecko/layout/xul/tree -I/builds/worker/checkouts/gecko/accessible/mac -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -DMOZILLA_CLIENT -include /builds/worker/workspace/obj-build/mozilla-config.h -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wcomma -Wenum-compare-conditional -Wimplicit-fallthrough -Wduplicate-method-arg -Wduplicate-method-match -Wmissing-method-return-type -Wobjc-signed-char-bool -Wsemicolon-before-method-body -Wsuper-class-method-mismatch -Werror=non-literal-null-conversion -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=free-nonheap-object -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi -Wthread-safety -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -fcrash-diagnostics-dir=/builds/worker/artifacts -fno-exceptions -fPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -gdwarf-4 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fno-omit-frame-pointer -funwind-tables -Werror -fno-strict-aliasing  -MD -MP -MF .deps/nsAccUtils.o.pp   /builds/worker/checkouts/gecko/accessible/base/nsAccUtils.cpp
[task 2022-04-18T17:41:01.831Z] 17:41:01     INFO -  In file included from /builds/worker/checkouts/gecko/accessible/base/nsAccUtils.cpp:6:
[task 2022-04-18T17:41:01.832Z] 17:41:01     INFO -  In file included from /builds/worker/checkouts/gecko/accessible/base/nsAccUtils.h:9:
[task 2022-04-18T17:41:01.832Z] 17:41:01     INFO -  In file included from /builds/worker/checkouts/gecko/accessible/generic/LocalAccessible.h:9:
[task 2022-04-18T17:41:01.832Z] 17:41:01     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/mozilla/ComputedStyle.h:13:
[task 2022-04-18T17:41:01.833Z] 17:41:01     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/mozilla/CachedInheritingStyles.h:11:
[task 2022-04-18T17:41:01.837Z] 17:41:01    ERROR -  /builds/worker/workspace/obj-build/dist/include/nsCOMPtr.h:436:5: error: static_assert failed due to requirement '1 < sizeof (TestForIID<nsIDocShellTreeOwner>(nullptr))' "nsCOMPtr only works for types with IIDs.  Either use RefPtr; add an IID to your type with NS_DECLARE_STATIC_IID_ACCESSOR/NS_DEFINE_STATIC_IID_ACCESSOR; or make the nsCOMPtr point to a base class with an IID."
[task 2022-04-18T17:41:01.837Z] 17:41:01     INFO -      static_assert(1 < sizeof(TestForIID<T>(nullptr)),
[task 2022-04-18T17:41:01.838Z] 17:41:01     INFO -      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2022-04-18T17:41:01.838Z] 17:41:01     INFO -  /builds/worker/workspace/obj-build/dist/include/nsCOMPtr.h:477:5: note: in instantiation of member function 'nsCOMPtr<nsIDocShellTreeOwner>::assert_validity' requested here
[task 2022-04-18T17:41:01.838Z] 17:41:01     INFO -      assert_validity();
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -      ^
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  /builds/worker/checkouts/gecko/accessible/base/nsAccUtils.cpp:335:34: note: in instantiation of member function 'nsCOMPtr<nsIDocShellTreeOwner>::nsCOMPtr' requested here
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -    nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -                                   ^
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  In file included from /builds/worker/checkouts/gecko/accessible/base/nsAccUtils.cpp:6:
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  In file included from /builds/worker/checkouts/gecko/accessible/base/nsAccUtils.h:9:
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  In file included from /builds/worker/checkouts/gecko/accessible/generic/LocalAccessible.h:9:
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/mozilla/ComputedStyle.h:13:
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/mozilla/CachedInheritingStyles.h:11:
[task 2022-04-18T17:41:01.840Z] 17:41:01    ERROR -  /builds/worker/workspace/obj-build/dist/include/nsCOMPtr.h:212:7: error: no matching function for call to 'ToSupports'
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -        ToSupports(static_cast<mozilla::PointedToType<T>*>(aPtr)));
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -        ^~~~~~~~~~
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  /builds/worker/checkouts/gecko/accessible/base/nsAccUtils.cpp:339:40: note: in instantiation of function template specialization 'do_QueryInterface<nsCOMPtr<nsIDocShellTreeOwner>>' requested here
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -    nsCOMPtr<nsIBaseWindow> baseWindow = do_QueryInterface(treeOwner);
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -                                         ^
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  /builds/worker/workspace/obj-build/dist/include/nsISupportsImpl.h:38:21: note: candidate function not viable: cannot convert argument of incomplete type 'mozilla::PointedToType<nsCOMPtr<nsIDocShellTreeOwner>> *' (aka 'nsIDocShellTreeOwner *') to 'decltype(nullptr)' (aka 'nullptr_t') for 1st argument
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  inline nsISupports* ToSupports(decltype(nullptr)) { return nullptr; }
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -                      ^
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  /builds/worker/workspace/obj-build/dist/include/nsISupportsImpl.h:40:21: note: candidate function not viable: cannot convert argument of incomplete type 'mozilla::PointedToType<nsCOMPtr<nsIDocShellTreeOwner>> *' (aka 'nsIDocShellTreeOwner *') to 'nsISupports *' for 1st argument
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  inline nsISupports* ToSupports(nsISupports* aSupports) { return aSupports; }
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -                      ^
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:616:21: note: candidate function not viable: cannot convert argument of incomplete type 'mozilla::PointedToType<nsCOMPtr<nsIDocShellTreeOwner>> *' (aka 'nsIDocShellTreeOwner *') to 'mozilla::Runnable *' for 1st argument
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  inline nsISupports* ToSupports(mozilla::Runnable* p) {
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -                      ^
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  /builds/worker/checkouts/gecko/dom/base/nsINode.h:2324:21: note: candidate function not viable: cannot convert argument of incomplete type 'mozilla::PointedToType<nsCOMPtr<nsIDocShellTreeOwner>> *' (aka 'nsIDocShellTreeOwner *') to 'nsINode *' for 1st argument
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  inline nsISupports* ToSupports(nsINode* aPointer) { return aPointer; }
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -                      ^
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/Blob.h:156:21: note: candidate function not viable: cannot convert argument of incomplete type 'mozilla::PointedToType<nsCOMPtr<nsIDocShellTreeOwner>> *' (aka 'nsIDocShellTreeOwner *') to 'mozilla::dom::Blob *' for 1st argument
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  inline nsISupports* ToSupports(mozilla::dom::Blob* aBlob) {
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -                      ^
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/Document.h:5481:21: note: candidate function not viable: cannot convert argument of incomplete type 'mozilla::PointedToType<nsCOMPtr<nsIDocShellTreeOwner>> *' (aka 'nsIDocShellTreeOwner *') to 'mozilla::dom::Document *' for 1st argument
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  inline nsISupports* ToSupports(mozilla::dom::Document* aDoc) {
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -                      ^
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  /builds/worker/workspace/obj-build/dist/include/nsCycleCollectionNoteChild.h:43:14: note: candidate template ignored: substitution failure [with T = nsIDocShellTreeOwner]: incomplete type 'nsIDocShellTreeOwner' named in nested name specifier
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  nsISupports* ToSupports(
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -               ^
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  2 errors generated.
[task 2022-04-18T17:41:01.840Z] 17:41:01    ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:658: nsAccUtils.o] Error 1
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/accessible/base'
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  gmake[4]: *** Waiting for unfinished jobs....
[task 2022-04-18T17:41:01.840Z] 17:41:01     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/dom/clients/manager'
Flags: needinfo?(mreschenberg)
Flags: needinfo?(mreschenberg)
Pushed by mreschenberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/962cc0018f21
Add suppport for cached remote accessibles in coordinate conversion functions r=eeejay
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: