Open Bug 514117 Opened 15 years ago Updated 2 years ago

Bogus code in nsDocAccessible::GetBoundsRect

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

People

(Reporter: roc, Unassigned)

References

Details

http://mxr.mozilla.org/mozilla-central/source/accessible/src/base/nsDocAccessible.cpp#756

This code is quite wrong. viewBounds is always relative to the the view's parent view, but this code is assuming that all viewBounds are in the same coordinate system, which is totally not true.
Thanks Roc!
Roc, how to fix this one?
(In reply to alexander :surkov from comment #2)
> Roc, how to fix this one?

intersecting screen rects?
Record which frame the rectangle is relative to, and each time you want to do an intersection call nsLayoutUtils::TransformFrameRectToAncestor to transform the previous rectangle to the coordinate system of the next rectangle.
Robert, can you think of example to reproduce a bug?
An outer document in a 100x100 container containing an IFRAME at offset 50,50 which is also 100x100. Everything overflow:hidden. This code will return a rectangle (0,0,100,100) when it should return a rectangle that's 50x50 (I'm not sure what the offset should be though).
Jamie, do you know why document accessible is special, i.e. it's rectangle is restricted by visible area but Theany other accessible don't have this? I checked IE, it seems they do the same.
Assignee: nobody → mreschenberg
  • deleted - gonna post this to a new bug because not entirely convinced this is the same problem!
Assignee: mreschenberg → nobody
See Also: → 1732179
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.