зеркало из https://github.com/mozilla/gecko-dev.git
5c99381151
The ReflowTracker was based on the assumption that there was only ever going to be one target to be observed. With Fission, this is no longer true. Turning the ReflowTracker into something that is multi-target aware seemed more complex than really worth it. After all, all it was doing is getting a ReflowFront and listening for events on it. The only 3 things that needed it are the grid inspector, flex inspector and box model widget. They all needed it for the same reason: updating the data displayed in the UI when the size/geometry/box-model regions of the selected node changed. So, it seems simpler to let the inspector instantiate the right ReflowFront when it needs it (upon a new node selection). There's only one node selected at any given time in the inspector, so it's simple to just listen for reflow in that node's target, and dispatch events to the grid, flex and box-model tools so they can update themselves. Note that once a new node is selected, we do the `getFront("Reflow")` again since that node can be in a different target than the previous one. If it is, however, in the same target, then `getFront` will return the same instance which is nice. Differential Revision: https://phabricator.services.mozilla.com/D55987 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
client | ||
docs | ||
platform | ||
server | ||
shared | ||
startup | ||
.eslintrc.js | ||
.eslintrc.mochitests.js | ||
.eslintrc.xpcshell.js | ||
CODE_OF_CONDUCT.md | ||
moz.build | ||
templates.mozbuild | ||
tsconfig.json |