Bug 1520277 Comment 6 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I suspect we get incorrect parent frame when using iframe, so the rect is not correct. And then this bug happens if the iframe is positioned on the bottom-right of the screen.

For example (by putting iframe.html and fix_pos.html in the same directory), the rect of scrollable parent frame is (0, 0, 18000, 9000) [1], which is the coordinate inside the iframe. The transformed rect is (25140, 25200, 6060, 6000) [1], which is the coordinate of the entire page, so there is no intersection if we use iframe. Either the fixed position frame is incorrect, or we use the incorrect way to get the transformed rect. Not sure for now.

Hiro, do you have any idea to fix the rect we get from nsLayoutUtils::TransformFrameRectToAncestor? Or the scrollable parent frame is not correct in this case? May need your feedback.

[1] The format of the rect is (x, y, width, height)
This bug happens if the iframe is positioned on the bottom-right of the screen.

For example (by putting iframe.html and fix_pos.html in the same directory), the rect of scrollable parent frame is (0, 0, 18000, 9000) [1], which is the coordinate inside the iframe. The transformed rect is (25140, 25200, 6060, 6000) [1], which is the coordinate of the entire page, so there is no intersection if we use iframe. Either the fixed position frame is incorrect, or we use the incorrect way to get the transformed rect. Not sure for now.

Hiro, do you have any idea to fix the rect we get from nsLayoutUtils::TransformFrameRectToAncestor? Or the scrollable parent frame is not correct in this case? May need your feedback.

[1] The format of the rect is (x, y, width, height)

Back to Bug 1520277 Comment 6