static void ForEachCellInTable(CssBox table, Action <CssBox> cellAction) { foreach (var c1 in table.GetChildBoxIter()) { foreach (var c2 in c1.GetChildBoxIter()) { if (c2.CssDisplay == CssDisplay.TableCell) { cellAction(c2); } else { foreach (var c3 in c2.GetChildBoxIter()) { cellAction(c3); } } } } }