Closed Bug 1690747 Opened 4 years ago Closed 4 years ago

Should also check if blur is allowed in BrowsingContext::Blur()

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P2)

defect

Tracking

()

RESOLVED FIXED
87 Branch
Fission Milestone M7
Tracking Status
firefox87 --- fixed

People

(Reporter: edgar, Assigned: edgar)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.

When binding delegates blur() to BrowsingContext::Blur, the remote side will
skip the check given that there is no js on the stack.

I spent some time trying to find a case that shows the current code could possiblly
cause a unexpected behavior, but unable to. Because the focus state isn't changed
at all even if we run nsGlobalWindowOuter::BlurOuter unconditionally, e.g setting
dom.disable_window_flip to false.

Attachment #9201081 - Attachment description: Bug 1690747 - Should also check blur is allowed in BrowsingContext::Focus(); → Bug 1690747 - Should also check blur is allowed in BrowsingContext::Blur();
Fission Milestone: --- → M7
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ebb61065ad47 Should also check blur is allowed in BrowsingContext::Blur(); r=hsivonen

Backed out for failing mochitests at /test_focus_design_mode.html
Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&selectedTaskRun=CCctQX-1R7Wb32irCKR38Q.0&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel&revision=ebb61065ad47bcb98d80b0b0b0640f645837f53f
Failure log: https://treeherder.mozilla.org/logviewer?job_id=329352116&repo=autoland&lineNumber=2779

[task 2021-02-09T12:52:35.039Z] 12:52:35 INFO - TEST-START | dom/base/test/test_focus_design_mode.html
[task 2021-02-09T12:52:35.040Z] 12:52:35 INFO - Buffered messages logged at 12:52:32
[task 2021-02-09T12:52:35.040Z] 12:52:35 INFO - add_task | Entering test activeElementAfterBluring
[task 2021-02-09T12:52:35.040Z] 12:52:35 INFO - TEST-PASS | dom/base/test/test_focus_design_mode.html | check activeElement
[task 2021-02-09T12:52:35.040Z] 12:52:35 INFO - Buffered messages finished
[task 2021-02-09T12:52:35.040Z] 12:52:35 WARNING - TEST-UNEXPECTED-FAIL | dom/base/test/test_focus_design_mode.html | check activeElement after bluring - got "innerlog:windowfocus,activeElement:HTML,activeElement:BODY,", expected "innerlog:windowfocus,activeElement:HTML,activeElement:HTML,"
[task 2021-02-09T12:52:35.041Z] 12:52:35 INFO - SimpleTest.is@SimpleTest/SimpleTest.js:500:14
[task 2021-02-09T12:52:35.041Z] 12:52:35 INFO - activeElementAfterBluring@dom/base/test/test_focus_design_mode.html:52:5
[task 2021-02-09T12:52:35.041Z] 12:52:35 INFO - add_task | Leaving test activeElementAfterBluring
[task 2021-02-09T12:52:35.041Z] 12:52:35 INFO - TEST-OK | dom/base/test/test_focus_design_mode.html | took 163ms

Flags: needinfo?(echen)
Backout by apavel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/27cad0f0770c Backed out changeset ebb61065ad47 for failing mochitests at test_focus_design_mode.html on a CLOSED TREE
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5d644dc9bc63 Should also check blur is allowed in BrowsingContext::Blur(); r=hsivonen
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Summary: Should also check if blur is allowed in BrowsingContext::Focus() → Should also check if blur is allowed in BrowsingContext::Blur()
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: