qorf / quorum-language

The primary repository for the Quorum Programming Language
BSD 3-Clause "New" or "Revised" License
15 stars 6 forks source link

Position shadow DOM elements on the screen #5

Closed mwcampbell closed 2 years ago

mwcampbell commented 2 years ago
  1. The Accessibility base class has a new blueprint action, BoundsChanged, which should be called whenever the position or size of an accessible item changes.
  2. Item2D calls this new callback whenever it changes its position or size.
  3. WebAccessibility sets CSS positioning properties on shadow elements, both when a new element is added and in the BoundsChanged callback.
  4. To ensure that all browsers pay attention to these positioning properties, the shadow DOM elements are now beside the canvas in the DOM tree, not under it.
  5. Specifically, the shadow DOM elements are now under a single root element created by WebAccessibility, which is at the same level as the canvas in the tree. This lets us set several properties on the root, and it also lets us destroy the whole shadow DOM tree on shutdown by deleting just one element.
  6. To allow the canvas and shadow DOM to be at the same level in the tree, Quorum now expects the embedding page to provide a single generic div as a container, rather than providing the canvas itself. Quorum is now responsible for creating the canvas and for setting all attributes on the container that don't depend on the layout of the containing page.