Open
Bug 634553
Opened 14 years ago
Updated 3 years ago
GetWidget() API is not supported by nsIViewManager in FF3.6. This is creating issue for calculating screen rectangle of controls within IFrame.
Categories
(Core :: Layout, defect)
Tracking
()
UNCONFIRMED
People
(Reporter: monijosh, Unassigned)
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Build Identifier: 3.6.13
In our product, We calculate the rectangle of HTML controls within IFRAMEs.We are using getWidget() to get the correspoding widget to IFrame and then use WidgetToScreen(widget,documentRect, screenRect) to convert the controls's rectangle to screen rectangle.
In FF3.6 , as getWidget() has been deprecated. we are using getRootWidget() but thats giving widget for root window, not for IFRAME.
How can we get the widget corresponding to IFRAME or what should be the appraoch to calculate screen rectangle of IFRAME and controls in it.
Reproducible: Always
| Reporter | ||
Updated•14 years ago
|
Version: unspecified → 3.6 Branch
Comment 1•14 years ago
|
||
Moving to Core.
I'm unsure if this should be Core::Layout or Core::Accessibility. Picking one at random.
Component: Developer Tools → Layout
Product: Firefox → Core
QA Contact: developer.tools → layout
Version: 3.6 Branch → 1.9.2 Branch
Comment 2•14 years ago
|
||
> How can we get the widget corresponding to IFRAME
There isn't one, in general. So you can't.
> what should be the appraoch to calculate screen rectangle of IFRAME
The concept might not even make sense, for what it's worth (the iframe could be being rendered into an offscreen buffer, etc).
| Reporter | ||
Comment 3•14 years ago
|
||
Hi Boris,
Thanks for the quick reply.
Well let me explain the scenario here for why I want the screen rectangle of IFRAME.
We have a control lets say a Html Link control inside a IFRAME.
Now our product requires its screen rectangle, to perform some onscreen clicks on this Html link.
If Accessiblility option is left aside then I follow this approach to calculate the screen rectangle of this link.
First get the offsetsof the link. Then get the offsetParents of it recursively until no more parent found and keep adding their offsets to Link's offset co-ordinates.
Now when no more parent is found, I get the corresponding widget for this document and use that to convert the rectangle to screen co-ordinates.
While following this approach, In FF3.5 is used to give widget corresponding to the document inside the IFRAME, thus the conversion of points within IFRMAE to screen was correct.
Now the getWidget API is not working, so I have no way to convert the co-ordinates to screen co-ordinates.GetOffsetPArents also provide parents till the doucment inside IFRAME is reached.
If I use GetRootWidget it gives a widget corresponding to outermoset Document, but I want something at the level of document inside the IFRAME.
If you have any other way to calculate it then let me know.
In the case of the control on which I am working, the Accessible node is coming null so I cannot use direct getBounds() method for it.
Updated•14 years ago
|
Summary: GetWidget() API is not supported by nsIViewManager in FF3.6. This is creaing issue for calculating screen rectangle of controls within IFrame. → GetWidget() API is not supported by nsIViewManager in FF3.6. This is creating issue for calculating screen rectangle of controls within IFrame.
Comment 4•14 years ago
|
||
If all you need is the screen rect of something then there are other ways.
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•