mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 16:34:21 +00:00
Merge "ImmutableRange: Optimize parent check in computePosition()"
This commit is contained in:
commit
97ea822142
|
@ -434,10 +434,9 @@ class ImmutableRange {
|
|||
|
||||
if ( $ancestor ) {
|
||||
$child = $boundaryPointB[0];
|
||||
$childNodes = iterator_to_array( $boundaryPointA[0]->childNodes );
|
||||
|
||||
while ( $child ) {
|
||||
if ( in_array( $child, $childNodes, true ) ) {
|
||||
if ( $child->parentNode === $boundaryPointA[0] ) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue