Make the document blocked by the topmost element in the top layer

NEW
Assigned to

Status

()

Core
DOM: Core & HTML
2 years ago
a year ago

People

(Reporter: xidorn, Assigned: ntim)

Tracking

(Blocks: 2 bugs)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox43 affected)

Details

We have resolved that, if there is anything in the top layer, we should mark the document blocked by the topmost element in the top layer.

This behavior hasn't been speced yet, but it would be speced in the HTML spec and have a pointer from the Fullscreen API spec. [1]

The HTML spec has defined a "blocked by modal dialog" concept [2], which would be extended to also cover fullscreen.


[1] https://github.com/whatwg/fullscreen/issues/15
[2] https://html.spec.whatwg.org/multipage/interaction.html#blocked-by-a-modal-dialog
(Assignee)

Updated

a year ago
Assignee: nobody → ntim.bugs
(Assignee)

Updated

a year ago
Blocks: 1322939
(Assignee)

Comment 1

a year ago
Just noting down here the broad outline of the work I need to do:
- Implement pending dialog stack
 -> ViewportFrame.cpp

- Create a getter for the active modal dialog
 -> nsIDocument

- Implement inert subtrees
 -> :-moz-inert pseudo-selector (chrome-only) with a bunch of CSS:
*|*:-moz-inert {
    pointer-events: none;
    -moz-user-focus: none;
    -moz-user-input: disabled;
    -moz-user-modify: read-only;
    -moz-user-select: none;
}
 -> Might need some extra code for keyboard focus

- Wire everything up together
 -> :-moz-modal-dialog pseudo-selector (chrome-only) with a bunch of css:
dialog:-moz-modal-dialog {
  -moz-top-layer: top !important;
}

dialog:-moz-modal-dialog::backdrop {
  background: rgba(0,0,0,0.1);
  ...
}
You need to log in before you can comment on or make changes to this bug.