Closed Bug 1680611 Opened 3 years ago Closed 2 years ago

Mark nsFocusManager methods as MOZ_CAN_RUN_SCRIPT if necessary

Categories

(Core :: DOM: UI Events & Focus Handling, task, P3)

task

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: saschanaz, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(11 files, 1 obsolete file)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Because it can fire a synchronous focus event.

See Also: → 1539884

I hit this bug.

Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Summary: Mark nsFocusManager::MoveFocus as MOZ_CAN_RUN_SCRIPT → Mark nsFocusManager methods as MOZ_CAN_RUN_SCRIPT if necessary

Instead, returning things with a tiny struct is clearer what are the result and
maybe modified in the caller side.

Depends on D147069

Attachment #9278066 - Attachment is obsolete: true
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/6875ec5cd247
part 1: Mark all `nsFocusManager` methods whose names explain that they may dispatch events as `MOZ_CAN_RUN_SCRIPT` r=smaug
https://hg.mozilla.org/integration/autoland/rev/1842c19f2ccd
part 2: Mark `nsFocusManager::SetFocusedWindowWithCallerType` and its callers in `nsFocusManager` as `MOZ_CAN_RUN_SCRIPT` r=smaug,media-playback-reviewers,chunmin
https://hg.mozilla.org/integration/autoland/rev/5768dbdd45ab
part 3: Mark `nsFocusManager::WindowLowered()` and its callers in `nsFocusManager` as `MOZ_CAN_RUN_SCRIPT` r=smaug
https://hg.mozilla.org/integration/autoland/rev/02e53ff426c9
part 4: Mark `nsFocusManager::WindowHidden()` as `MOZ_CAN_RUN_SCRIPT` r=smaug
https://hg.mozilla.org/integration/autoland/rev/7cfd4c5adbc7
part 5: Get rid of `nsFocusManager::FocusPlugin()` because of unused r=smaug
https://hg.mozilla.org/integration/autoland/rev/50c993d5c294
part 6: Mark `nsFocusManager::MoveCaretToFocus()` and its callers in `nsFocusManager` as `MOZ_CAN_RUN_SCRIPT` r=smaug
https://hg.mozilla.org/integration/autoland/rev/45bccd2ca9dd
part 7: Mark `nsFocusManager::BlurImpl()` and `nsFocusManager::BlurFromOtherProcess()` as `MOZ_CAN_RUN_SCRIPT` r=smaug
https://hg.mozilla.org/integration/autoland/rev/58f913928b11
part 8: Mark `nsFocusManager::Blur` and its callers in `nsFocusManager` as `MOZ_CAN_RUN_SCRIPT` r=smaug
https://hg.mozilla.org/integration/autoland/rev/ce978103b160
part 9: Mark `nsFocusManager::Focus()` and its callers in `nsFocusManager` as `MOZ_CAN_RUN_SCRIPT` r=smaug
https://hg.mozilla.org/integration/autoland/rev/781146dd61d8
part 10: Mark `nsFocusManager::Flush*()` and their callers in `nsFocusManager` r=smaug
https://hg.mozilla.org/integration/autoland/rev/0ab9981db037
part 11: Mark `nsFocusManager::NotifyOfReFocus()` as `MOZ_CAN_RUN_SCRIPT` r=smaug
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: