mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
DevTools: Allow modification of attributes (#32888)
* feat: allow modification of attributes Signed-off-by: eri <eri@inventati.org> * fix: tidiness Signed-off-by: eri <eri@inventati.org> * feat: clean walker name generation Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: eri <eri@inventati.org> * fix: missed out parameter Signed-off-by: eri <eri@inventati.org> --------- Signed-off-by: eri <eri@inventati.org> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
4d49b04668
commit
babc844c93
5 changed files with 121 additions and 12 deletions
|
@ -86,14 +86,27 @@ impl Actor for InspectorActor {
|
|||
self.script_chan.send(GetRootNode(pipeline, tx)).unwrap();
|
||||
let root_info = rx.recv().unwrap().ok_or(())?;
|
||||
|
||||
let root = root_info.encode(registry, false, self.script_chan.clone(), pipeline);
|
||||
let name = self
|
||||
.walker
|
||||
.borrow()
|
||||
.clone()
|
||||
.unwrap_or_else(|| registry.new_name("walker"));
|
||||
|
||||
let root = root_info.encode(
|
||||
registry,
|
||||
false,
|
||||
self.script_chan.clone(),
|
||||
pipeline,
|
||||
name.clone(),
|
||||
);
|
||||
|
||||
if self.walker.borrow().is_none() {
|
||||
let walker = WalkerActor {
|
||||
name: registry.new_name("walker"),
|
||||
name,
|
||||
script_chan: self.script_chan.clone(),
|
||||
pipeline,
|
||||
root_node: root.clone(),
|
||||
mutations: RefCell::new(vec![]),
|
||||
};
|
||||
let mut walker_name = self.walker.borrow_mut();
|
||||
*walker_name = Some(walker.name());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue