Closed Bug 1725893 Opened 3 years ago Closed 3 years ago

Replace nsLayoutUtils::GetCrossDocParentFrame in nsIFrame::GetScreenRectInAppUnits with nsLayoutUtils::GetCrossDocParentFrameInProcess

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

Details

Attachments

(1 file)

here.

The function ends up calling nsIWidget::WidgetToScreenOffset(), so from the perspective of auditing GetCrossDocParentFrame calls it should be okay to replace it with the in-process version, GetCrossDocParentFrameInProcess.

That said, it doesn't look to me that this GetScreenRectInAppUnits work on situation where desktop zoom is applied. For example, this GetSize() call needs to be scaled by the zoom value, I believe. I will see whether the function works with desktop zooming and if it didn't work I will open a new bug for the issue.

(In reply to Hiroyuki Ikezoe (:hiro) from comment #0)

The function ends up calling nsIWidget::WidgetToScreenOffset(), so from the perspective of auditing GetCrossDocParentFrame calls it should be okay to replace it with the in-process version, GetCrossDocParentFrameInProcess.

WidgetToScreenOffset for a puppet widget looks like it calls WidgetToTopLevelWidgetTransform. That seems wrong? But I guess not directly this bug.

Flags: needinfo?(hikezoe.birchill)

(In reply to Timothy Nikkel (:tnikkel) from comment #2)

(In reply to Hiroyuki Ikezoe (:hiro) from comment #0)

The function ends up calling nsIWidget::WidgetToScreenOffset(), so from the perspective of auditing GetCrossDocParentFrame calls it should be okay to replace it with the in-process version, GetCrossDocParentFrameInProcess.

WidgetToScreenOffset for a puppet widget looks like it calls WidgetToTopLevelWidgetTransform. That seems wrong? But I guess not directly this bug.

Yes, that's wrong. The part will result wrong (x, y) values in the case where the given iframe is not the root frame. The new bug I am going to file will cover both the wrong(x, y) value case and the wrong size value case. I am writing a mochitest to demonstrate the issue.

Flags: needinfo?(hikezoe.birchill)

Well, the mochitest may be slightly a different case, not sure at this moment, the test hasn't work as expected yet. :)

Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ccfc6133c6f7
Replace GetCrossDocParentFrame with GetCrossDocParentFrameInProcess in nsIFrame::GetScreenRectInAppUnits. r=tnikkel
See Also: → 1725900
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: