Closed Bug 1232972 Opened 9 years ago Closed 3 years ago

ISimpleDOMDocument object is not providing the the correct values

Categories

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

43 Branch
All
Windows
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: rajeshcode, Unassigned)

Details

Attachments

(1 file)

Attached image Screen.JPG
User Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36

Steps to reproduce:

1. Open www.youtube.com in one tab and play some video (now videos are plying by one by one automatically).
2. Take another tab and browse any URL and minimize the window.
3. We are not getting the Window Events when the youtube video is changing to another video (on the minimized state, focus is for the second tab) with "SetWinEventHook()" API.


Actual results:

We are not getting the Window Events properly using "SetWinEventHook()" API with minimized state.


Expected results:

Basically we are capturing each Windows in a machine using Window Event Hook mechanism with respect to the Window Class Names (using SetWinEventHook() API). Mozilla Window have the class name "MozillaWindowClass" and some of the events are: EVENT_OBJECT_NAMECHANGE, EVENT_OBJECT_FOCUS, EVENT_OBJECT_SHOW, EVENT_OBJECT_HIDE...etc.

Follow the steps to reproduce the issue:

1) Open Mozilla browser and play youtube video in first tab. See Step 1 in "Screen.jpg" (URL: https://www.youtube.com/watch?v=8M5x4LZV6g4).

2) Take another tab and browse another URL. See Step 2 in "Screen.jpg" (URL: http://www.goal.com/en-india/).

3) Minimize the Mozilla window and wait for 15 to 30 minutes.

Normally the videos are playing one by one- auto play. First youtube video (https://www.youtube.com/watch?v=8M5x4LZV6g4) having 57 seconds duration and after this video next video will be played, the URL will be https://www.youtube.com/watch?v=ckyWlU45Cww  and it is having 4.29 minutes duration. After this video; next video will be played, URL is https://www.youtube.com/watch?v=fF7MPtJvE5o  and it is having 5.28 minutes duration. Note that the current focus is for second tab and it is having the URL http://www.goal.com/en-india/  and we minimized the Mozilla window.

So there will be some events to be happening during the video (URL) change. But in Mozilla version 43, nothing happened in the video (URL) change with class name "MozillaWindowClass". This is the issue still we are facing with latest Mozilla browser.
Severity: normal → major
OS: Unspecified → Windows
Priority: -- → P1
Hardware: Unspecified → All
Summary: Window events are not getting with "SetWinEventHook()" API → ISimpleDOMDocument object is not providing the the correct values
Sorry there is some mistakes in comments, I can't edit the initial comments so kindly see the below comments for the original issue:

Basically we are capturing each Windows in a machine using Window Event Hook mechanism with respect to the Window Class Names (using SetWinEventHook() API). Mozilla Window have the class name "MozillaWindowClass" and some of the events are: EVENT_OBJECT_NAMECHANGE, EVENT_OBJECT_FOCUS, EVENT_OBJECT_SHOW, EVENT_OBJECT_HIDE...etc.

Follow the steps to reproduce the issue:

1) Open Mozilla browser and play youtube video in first tab. See Step 1 in "Screen.jpg" (URL: https://www.youtube.com/watch?v=8M5x4LZV6g4).

2) Take another tab and browse another URL. See Step 2 in "Screen.jpg" (URL: http://www.goal.com/en-india/).

3) Minimize the Mozilla window and wait for 15 to 30 minutes.

Normally the videos are playing one by one- auto play. First youtube video (https://www.youtube.com/watch?v=8M5x4LZV6g4) having 57 seconds duration and after this video next video will be played, the URL will be https://www.youtube.com/watch?v=ckyWlU45Cww  and it is having 4.29 minutes duration. After this video; next video will be played, URL is https://www.youtube.com/watch?v=fF7MPtJvE5o  and it is having 5.28 minutes duration. Note that the current focus is for second tab and it is having the URL http://www.goal.com/en-india/  and we minimized the Mozilla window.

So there will be some events to be happening during the video (URL) change. Based on these Events we are capturing some objects in each tabs. When the Mozilla window is in minimized state and the focus before minimize is for second tab, then "EVENT_OBJECT_NAMECHANGE" event happens in youtube video URL; we are getting the incorrect URLs (currently focused tab URL; ex: http://www.goal.com/en-india/) from "ISimpleDOMDocument" object. So this is bit confusing one, we need to update each URLs in "ISimpleDOMDocument" object based each tab.
Component: Untriaged → DOM
Product: Firefox → Core
ISimpleDOMDocument is some accessibility interface, not DOM thing even though its name hints about DOM.
Component: DOM → Disability Access APIs
ISimpleDOMDocument::get_URL returns an URL of the DOM document that is attached to (via XPCOM's nsIWebNavigation interface). May I see a code snippet?
We are using "accNavigate()" function with "NAVRELATION_EMBEDS" flag first and then the below code is using for retrieving the URL from "NAVRELATION_EMBEDS" :

ISimpleDOMDocument *pDoc = NULL; 
HRESULT hr = pNode->QueryInterface(IID_ISimpleDOMDocument, (void **)&pDoc); 
if(SUCCEEDED(hr) && (pDoc))
{
	BSTR bstrUrl = NULL;
	hr = pDoc->get_URL(&bstrUrl);
}

Kindly note that we can able to get the correct URL of a focused tab, but the issue is:- we are getting the focused tab URL if there is a URL change in unfocused tab in the Mozilla window.
(In reply to rajeshcode from comment #4)
> We are using "accNavigate()" function with "NAVRELATION_EMBEDS" flag first
> and then the below code is using for retrieving the URL from
> "ISimpleDOMDocument" :
> 
> ISimpleDOMDocument *pDoc = NULL; 
> HRESULT hr = pNode->QueryInterface(IID_ISimpleDOMDocument, (void **)&pDoc); 
> if(SUCCEEDED(hr) && (pDoc))
> {
> 	BSTR bstrUrl = NULL;
> 	hr = pDoc->get_URL(&bstrUrl);
> }
> 
> Kindly note that we can able to get the correct URL of a focused tab, but
> the issue is:- we are getting the focused tab URL if there is a URL change
> in unfocused tab in the Mozilla window.
Any update on this ?
Is it possile to attach a small tescase?
Follow the steps to reproduce the issue:

1) Open Mozilla browser and play youtube video in first tab. See Step 1 in "Screen.jpg" (URL: https://www.youtube.com/watch?v=8M5x4LZV6g4).

2) Take another tab and browse another URL. See Step 2 in "Screen.jpg" (URL: http://www.goal.com/en-india/).

3) Minimize the Mozilla window and wait for 15 to 30 minutes.

Normally the videos are playing one by one- auto play. First youtube video (https://www.youtube.com/watch?v=8M5x4LZV6g4) having 57 seconds duration and after this video next video will be played, the URL will be https://www.youtube.com/watch?v=ckyWlU45Cww  and it is having 4.29 minutes duration. After this video; next video will be played, URL is https://www.youtube.com/watch?v=fF7MPtJvE5o  and it is having 5.28 minutes duration. Note that the current focus is for second tab and it is having the URL http://www.goal.com/en-india/  and we minimized the Mozilla window.

So there will be some events to be happening during the video (URL) change. Based on these Events we are capturing some objects in each tabs. When the Mozilla window is in minimized state and the focus before minimize is for second tab, then "EVENT_OBJECT_NAMECHANGE" event happens in youtube video URL; we are getting the incorrect URLs (currently focused tab URL; ex: http://www.goal.com/en-india/) from "ISimpleDOMDocument" object. So this is bit confusing one, we need to update each URLs in "ISimpleDOMDocument" object based each tab.

Marking this as Resolved > WorksForMe since the last activity on this issue was many years ago, the functionality might be outdated and it might not be relevant anymore. Feel free to re-open if the issue is still reproducible on your end in the latest FF versions.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Resolution: INCOMPLETE → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: