ISimpleDOMDocument object is not providing the the correct values

UNCONFIRMED
Unassigned

Status

()

Core
Disability Access APIs
P5
major
UNCONFIRMED
3 years ago
9 months ago

People

(Reporter: Rajesh VR, Unassigned)

Tracking

43 Branch
All
Windows
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Created attachment 8698894 [details]
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.
(Reporter)

Updated

3 years ago
Severity: normal → major
OS: Unspecified → Windows
Priority: -- → P1
Hardware: Unspecified → All
(Reporter)

Updated

3 years ago
Summary: Window events are not getting with "SetWinEventHook()" API → ISimpleDOMDocument object is not providing the the correct values
(Reporter)

Comment 1

3 years ago
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.

Updated

3 years ago
Component: Untriaged → DOM
Product: Firefox → Core

Comment 2

3 years ago
ISimpleDOMDocument is some accessibility interface, not DOM thing even though its name hints about DOM.
Component: DOM → Disability Access APIs

Comment 3

3 years ago
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?
(Reporter)

Comment 4

3 years ago
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.
(Reporter)

Comment 5

3 years ago
(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.
(Reporter)

Comment 6

3 years ago
Any update on this ?

Comment 7

3 years ago
Is it possile to attach a small tescase?
(Reporter)

Comment 8

3 years ago
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.
Priority: P1 → P5
You need to log in before you can comment on or make changes to this bug.