Hi Sylvain,
I can't reproduce this in Windows 10 with Firefox 58b6 64 bit. I wrote my
own complete test case so we can test with exactly the same code. It'd be
great if you could compile the following C++ code. Then, start Firefox,
load
example.com and run the test case. Here's the code:
---
// embeds.cpp: Test NAVRELATION_EMBEDS.
// Compile with:
// cl /EHsc embeds.cpp user32.lib oleacc.lib ole32.lib oleaut32.lib
#include <windows.h>
#include <oleacc.h>
#include <iostream>
using namespace std;
// Tweak as needed to find the Firefox window.
// This title works if using a Firefox release
// with
example.com loaded in the active tab.
const char WINDOW_TITLE[] = "Example Domain - Mozilla Firefox";
const long NAVRELATION_EMBEDS = 0x1009;
int main()
{
CoInitialize(NULL);
HWND window = FindWindow("MozillaWindowClass", WINDOW_TITLE);
cout << "Window " << window << endl;
if (!window) {
cout << "Failed to get window" << endl;
return 1;
}
IAccessible* rootAcc;
HRESULT hr = AccessibleObjectFromWindow(window, OBJID_CLIENT,
IID_IAccessible, (void**)&rootAcc);
if (FAILED(hr)) {
cout << "AccessibleObjectFromWindow failed with " << hr << endl;
return 1;
}
VARIANT child;
child.vt = VT_I4;
child.lVal = CHILDID_SELF;
VARIANT target;
for (int i = 0; i < 5; ++i) {
hr = rootAcc->accNavigate(NAVRELATION_EMBEDS, child, &target);
cout << "accNavigate result " << hr << endl;
if (hr == S_OK) {
target.pdispVal->Release();
break;
}
Sleep(1000);
}
rootAcc->Release();
}
---
When I do this, I get the following:
Window 006F0AFE
accNavigate result -
2147467259
accNavigate result 0
So, the first try fails, but the second succeeds.
Jamie
> _______________________________________________
> dev-accessibility mailing list
>
dev-acce...@lists.mozilla.org
>
https://lists.mozilla.org/listinfo/dev-accessibility
>