1370 } 1371 1372 /* 1373 * Note: This method MUST only be called via its accessor method. 1374 */ 1375 private void doProcessCSS() { 1376 1377 // Nothing to do... 1378 if (cssFlag == CssFlags.CLEAN) return; 1379 1380 // RT-29254 - If DIRTY_BRANCH, pass control to Node#processCSS. This avoids calling NodeHelper.processCSS on 1381 // this node and all of its children when css doesn't need updated, recalculated, or reapplied. 1382 if (cssFlag == CssFlags.DIRTY_BRANCH) { 1383 super.processCSS(); 1384 return; 1385 } 1386 1387 // Let the super implementation handle CSS for this node 1388 ParentHelper.superProcessCSS(this); 1389 1390 // avoid the following call to children.toArray if there are no children 1391 if (children.isEmpty()) return; 1392 1393 // 1394 // RT-33103 1395 // 1396 // It is possible for a child to be removed from children in the middle of 1397 // the following loop. Iterating over the children may result in an IndexOutOfBoundsException. 1398 // So a copy is made and the copy is iterated over. 1399 // 1400 // Note that we don't want the fail-fast feature of an iterator, not to mention the general iterator overhead. 1401 // 1402 final Node[] childArray = children.toArray(new Node[children.size()]); 1403 1404 // For each child, process CSS 1405 for (int i=0; i<childArray.length; i++) { 1406 1407 final Node child = childArray[i]; 1408 1409 // If a child no longer has this as its parent, then it is skipped. | 1370 } 1371 1372 /* 1373 * Note: This method MUST only be called via its accessor method. 1374 */ 1375 private void doProcessCSS() { 1376 1377 // Nothing to do... 1378 if (cssFlag == CssFlags.CLEAN) return; 1379 1380 // RT-29254 - If DIRTY_BRANCH, pass control to Node#processCSS. This avoids calling NodeHelper.processCSS on 1381 // this node and all of its children when css doesn't need updated, recalculated, or reapplied. 1382 if (cssFlag == CssFlags.DIRTY_BRANCH) { 1383 super.processCSS(); 1384 return; 1385 } 1386 1387 // Let the super implementation handle CSS for this node 1388 ParentHelper.superProcessCSS(this); 1389 1390 if (isCssSensitive() == false) { 1391 return; 1392 } 1393 1394 // avoid the following call to children.toArray if there are no children 1395 if (children.isEmpty()) return; 1396 1397 // 1398 // RT-33103 1399 // 1400 // It is possible for a child to be removed from children in the middle of 1401 // the following loop. Iterating over the children may result in an IndexOutOfBoundsException. 1402 // So a copy is made and the copy is iterated over. 1403 // 1404 // Note that we don't want the fail-fast feature of an iterator, not to mention the general iterator overhead. 1405 // 1406 final Node[] childArray = children.toArray(new Node[children.size()]); 1407 1408 // For each child, process CSS 1409 for (int i=0; i<childArray.length; i++) { 1410 1411 final Node child = childArray[i]; 1412 1413 // If a child no longer has this as its parent, then it is skipped. |