mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Bug 1571653: Reshow as parent grid if the grid which we hid is a parent of a subgrid highlighting. r=gl
Differential Revision: https://phabricator.services.mozilla.com/D41700 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
7658b3e68d
commit
401719fc2b
@ -672,9 +672,13 @@ class HighlightersOverlay {
|
||||
// Since the subgrid and its parent grid container were previously both highlighted
|
||||
// and the parent grid container (the given node) has just been hidden, show a
|
||||
// translucent highlight of the parent grid container.
|
||||
for (const parentGridNode of this.subgridToParentMap.values()) {
|
||||
if (parentGridNode === node) {
|
||||
await this.showParentGridHighlighter(parentGridNode);
|
||||
for (const highlightedNode of this.gridHighlighters.keys()) {
|
||||
const parentGridNode = await this.walker.getParentGridNode(
|
||||
highlightedNode
|
||||
);
|
||||
if (node === parentGridNode) {
|
||||
this.subgridToParentMap.set(highlightedNode, node);
|
||||
await this.showParentGridHighlighter(node);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -713,8 +717,10 @@ class HighlightersOverlay {
|
||||
}
|
||||
|
||||
const highlighter = this.parentGridHighlighters.get(node);
|
||||
await highlighter.hide();
|
||||
this.extraGridHighlighterPool.push(highlighter);
|
||||
if (highlighter) {
|
||||
await highlighter.hide();
|
||||
this.extraGridHighlighterPool.push(highlighter);
|
||||
}
|
||||
this.state.grids.delete(node);
|
||||
this.parentGridHighlighters.delete(node);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user