Commit 5c8c79c
perf: add CSS containment to injected margin panel (#367)
Adding `contain: layout style` to `.fmc-margin-panel` isolates the
panel's layout and style recalculations from the rest of the Fidelity
Angular host document.
Fidelity's Angular SPA generates frequent DOM mutations throughout the
trade ticket UI. Without containment, each mutation potentially triggers
a full-page layout or style recalculation that includes the panel subtree,
even when the panel itself hasn't changed. With `contain: layout style`,
the browser knows that:
- Changes inside the panel don't affect layout outside it (layout)
- CSS counters/quotes inside the panel don't escape to the document (style)
`paint` is intentionally excluded from the contain value so that focus
rings and scrollbar chrome are not clipped to the panel's box bounds,
which matters for the focusable debug log element.
`contain` has been supported since Chrome 52, well within the extension's
`minimum_chrome_version: 111` requirement.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 52bff75 commit 5c8c79c
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
0 commit comments