Closed Bug 1317759 Opened 9 years ago Closed 9 years ago

Remove use of LegacyIsCallerChromeOrNativeCode usage in Event::GetScreenCoords

Categories

(Core :: DOM: Events, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This was added in bug 418986 but is pretty bizarre, because some of the callers can be pretty randomly either during script execution or not. I think the right thing to do is to remove this check and instead have the check in the places where we really care: MouseEvent::ScreenX/Y and Touch::ScreenX/Y. Note that the latter is sort of inconsistent right now depending on whether page script was on stack when Touch::InitializePoints got called, so may well be leaking fingerprinting information when we don't want it to be.
The callers of the XPCOM event screenX/Y getters are: 1) nsXULPopupListener::LaunchPopup 2) ChromeTooltipListener::MouseMove 3) nsXULTooltipListener::MouseMove 4) nsXULTooltipListener::CheckTreeBodyMove 5) nsBaseDragService::InvokeDragSessionWithImage 6) nsBaseDragService::InvokeDragSessionWithSelection and I think those all want unsanitized screen coords.
Priority: -- → P2
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment on attachment 8811023 [details] [diff] [review] Remove LegacyIsCallerChromeOrNativeCode use in Event::GetScreenCoords in favor or caller type checks at the entrypoints where we really care about pretending that our screen is client-area sized Ah, the touch part if because of Touch::InitializePoints. ResistFingerprinting() behavior is still odd, but this patch doesn't make it any worse.
Attachment #8811023 - Flags: review?(bugs) → review+
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/3ea1cc459783 Remove LegacyIsCallerChromeOrNativeCode use in Event::GetScreenCoords in favor or caller type checks at the entrypoints where we really care about pretending that our screen is client-area sized. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: