File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -890,19 +890,13 @@ function aaObtainFurthestBlock(p, formattingElementEntry) {
890
890
891
891
//Step 13 of the algorithm
892
892
function aaInnerLoop ( p , furthestBlock , formattingElement ) {
893
- var element = null ,
894
- lastElement = furthestBlock ,
893
+ var lastElement = furthestBlock ,
895
894
nextElement = p . openElements . getCommonAncestor ( furthestBlock ) ;
896
895
897
- for ( var i = 0 ; ; i ++ ) {
898
- element = nextElement ;
899
-
896
+ for ( var i = 0 , element = nextElement ; element !== formattingElement ; i ++ , element = nextElement ) {
900
897
//NOTE: store next element for the next loop iteration (it may be deleted from the stack by step 9.5)
901
898
nextElement = p . openElements . getCommonAncestor ( element ) ;
902
899
903
- if ( element === formattingElement )
904
- break ;
905
-
906
900
var elementEntry = p . activeFormattingElements . getElementEntry ( element ) ,
907
901
counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER ,
908
902
shouldRemoveFromOpenElements = ! elementEntry || counterOverflow ;
You can’t perform that action at this time.
0 commit comments