Merge "ImmutableRange: Optimize parent check in computePosition()"

This commit is contained in:
jenkins-bot 2020-10-21 13:20:15 +00:00 committed by Gerrit Code Review
commit 97ea822142

View file

@ -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;
}