Mercurial > pub > Impl
comparison Lib/IMPL/DOM/Node.pm @ 36:1828103371d0
DOM in works
| author | Sergey | 
|---|---|
| date | Fri, 20 Nov 2009 16:48:08 +0300 | 
| parents | a8086f85a571 | 
| children | c2e7f7c96bcd | 
   comparison
  equal
  deleted
  inserted
  replaced
| 35:f25d021780b3 | 36:1828103371d0 | 
|---|---|
| 207 | 207 | 
| 208 if ( my $newRoot = $this->{$parentNode} ? $this->{$parentNode}->rootNode : undef) { | 208 if ( my $newRoot = $this->{$parentNode} ? $this->{$parentNode}->rootNode : undef) { | 
| 209 if ($this->{$rootNode} ? $this->{$rootNode} != $newRoot : 1 ) { | 209 if ($this->{$rootNode} ? $this->{$rootNode} != $newRoot : 1 ) { | 
| 210 $this->{$rootNode} = $newRoot; | 210 $this->{$rootNode} = $newRoot; | 
| 211 weaken($this->{$rootNode}); | 211 weaken($this->{$rootNode}); | 
| 212 if ($this->{$childNodes}) { | |
| 213 $_->_updateRootRefs foreach @{$this->{$childNodes}}; | |
| 214 } | |
| 215 } | 212 } | 
| 216 } elsif($this->{$rootNode}) { | 213 } elsif($this->{$rootNode}) { | 
| 217 delete $this->{$rootNode}; | 214 delete $this->{$rootNode}; | 
| 218 if ($this->{$childNodes}) { | 215 } | 
| 219 $_->_updateRootRefs foreach @{$this->{$childNodes}}; | 216 | 
| 220 } | 217 if ($this->{$childNodes}) { | 
| 218 $_->_updateRootRefs foreach @{$this->{$childNodes}}; | |
| 221 } | 219 } | 
| 222 } | 220 } | 
| 223 | 221 | 
| 224 sub _setParent { | 222 sub _setParent { | 
| 225 my ($this,$node) = @_; | 223 my ($this,$node) = @_; | 
