Lines Matching full:openelements
169 currentNode = self.tree.openElements[-1] if self.tree.openElements else None
179 if (len(self.tree.openElements) == 0 or
380 for node in self.tree.openElements[::-1]:
383 if node == self.tree.openElements[0]:
468 self.tree.insertComment(token, self.tree.openElements[-1])
488 if attr not in self.tree.openElements[0].attributes:
489 self.tree.openElements[0].attributes[attr] = value
690 self.tree.headPointer = self.tree.openElements[-1]
744 self.tree.openElements.pop()
749 self.tree.openElements.pop()
786 node = self.parser.tree.openElements.pop()
845 self.tree.openElements.append(self.tree.headPointer)
847 for node in self.tree.openElements[::-1]:
849 self.tree.openElements.remove(node)
960 element = self.tree.openElements[-1]
979 for node in self.tree.openElements[::-1]:
991 self.tree.openElements[-1].name in ("pre", "listing", "textarea")
992 and not self.tree.openElements[-1].hasContent()):
1019 if (len(self.tree.openElements) == 1
1020 or self.tree.openElements[1].name != "body"):
1025 if attr not in self.tree.openElements[1].attributes:
1026 self.tree.openElements[1].attributes[attr] = value
1030 if (len(self.tree.openElements) == 1 or self.tree.openElements[1].name != "body"):
1035 if self.tree.openElements[1].parent:
1036 self.tree.openElements[1].parent.removeChild(self.tree.openElements[1])
1037 while self.tree.openElements[-1].name != "html":
1038 self.tree.openElements.pop()
1061 self.tree.formPointer = self.tree.openElements[-1]
1070 for node in reversed(self.tree.openElements):
1094 if self.tree.openElements[-1].name in headingElements:
1096 self.tree.openElements.pop()
1105 if afeAElement in self.tree.openElements:
1106 self.tree.openElements.remove(afeAElement)
1161 self.tree.openElements.pop()
1175 self.tree.openElements.pop()
1182 self.tree.openElements.pop()
1240 if self.tree.openElements[-1].name == "option":
1262 if self.tree.openElements[-1].name != "ruby":
1275 self.tree.openElements.pop()
1287 self.tree.openElements.pop()
1310 if self.tree.openElements[-1].name != "p":
1312 node = self.tree.openElements.pop()
1314 node = self.tree.openElements.pop()
1320 elif self.tree.openElements[-1].name != "body":
1321 for node in self.tree.openElements[2:]:
1347 if self.tree.openElements[-1].name != token["name"]:
1350 node = self.tree.openElements.pop()
1352 node = self.tree.openElements.pop()
1362 if self.tree.openElements[-1] != node:
1365 self.tree.openElements.remove(node)
1376 if self.tree.openElements[-1].name != token["name"]:
1380 node = self.tree.openElements.pop()
1382 node = self.tree.openElements.pop()
1389 if self.tree.openElements[-1].name != token["name"]:
1394 item = self.tree.openElements.pop()
1396 item = self.tree.openElements.pop()
1424 (formattingElement in self.tree.openElements and
1436 elif formattingElement not in self.tree.openElements:
1455 if formattingElement != self.tree.openElements[-1]:
1464 afeIndex = self.tree.openElements.index(formattingElement)
1466 for element in self.tree.openElements[afeIndex:]:
1480 element = self.tree.openElements.pop()
1482 element = self.tree.openElements.pop()
1487 commonAncestor = self.tree.openElements[afeIndex - 1]
1500 openElements.index(node)
1505 node = self.tree.openElements[index]
1507 self.tree.openElements.remove(node)
1520 self.tree.openElements[
1521 self.tree.openElements.index(node)] = clone
1558 self.tree.openElements.remove(formattingElement)
1559 self.tree.openElements.insert(
1560 self.tree.openElements.index(furthestBlock) + 1, clone)
1565 if self.tree.openElements[-1].name != token["name"]:
1569 element = self.tree.openElements.pop()
1571 element = self.tree.openElements.pop()
1579 self.tree.openElements.pop()
1582 for node in self.tree.openElements[::-1]:
1585 if self.tree.openElements[-1].name != token["name"]:
1587 while self.tree.openElements.pop() != node:
1609 {"name": self.tree.openElements[-1].name})
1610 self.tree.openElements.pop()
1618 node = self.tree.openElements.pop()
1625 self.tree.openElements.pop()
1656 while self.tree.openElements[-1].name not in ("table", "html"):
1658 # {"name": self.tree.openElements[-1].name})
1659 self.tree.openElements.pop()
1664 if self.tree.openElements[-1].name != "html":
1729 self.tree.openElements.pop()
1737 self.tree.formPointer = self.tree.openElements[-1]
1738 self.tree.openElements.pop()
1750 if self.tree.openElements[-1].name != "table":
1753 "expectedName": self.tree.openElements[-1].name})
1754 while self.tree.openElements[-1].name != "table":
1755 self.tree.openElements.pop()
1756 self.tree.openElements.pop()
1862 if self.tree.openElements[-1].name != "caption":
1865 "expectedName": self.tree.openElements[-1].name})
1866 while self.tree.openElements[-1].name != "caption":
1867 self.tree.openElements.pop()
1868 self.tree.openElements.pop()
1908 return self.tree.openElements[-1].name == "html"
1911 if self.tree.openElements[-1].name == "html":
1928 self.tree.openElements.pop()
1942 self.tree.openElements.pop()
1977 while self.tree.openElements[-1].name not in ("tbody", "tfoot",
1980 # {"name": self.tree.openElements[-1].name})
1981 self.tree.openElements.pop()
1982 if self.tree.openElements[-1].name == "html":
2013 impliedTagToken(self.tree.openElements[-1].name))
2026 self.tree.openElements.pop()
2038 impliedTagToken(self.tree.openElements[-1].name))
2075 while self.tree.openElements[-1].name not in ("tr", "html"):
2077 {"name": self.tree.openElements[-1].name})
2078 self.tree.openElements.pop()
2112 self.tree.openElements.pop()
2189 if self.tree.openElements[-1].name != token["name"]:
2193 node = self.tree.openElements.pop()
2197 self.tree.openElements.pop()
2240 if self.tree.openElements[-1].name != "html":
2252 if self.tree.openElements[-1].name == "option":
2253 self.tree.openElements.pop()
2257 if self.tree.openElements[-1].name == "option":
2258 self.tree.openElements.pop()
2259 if self.tree.openElements[-1].name == "optgroup":
2260 self.tree.openElements.pop()
2283 if self.tree.openElements[-1].name == "option":
2284 self.tree.openElements.pop()
2291 if (self.tree.openElements[-1].name == "option" and
2292 self.tree.openElements[-2].name == "optgroup"):
2293 self.tree.openElements.pop()
2295 if self.tree.openElements[-1].name == "optgroup":
2296 self.tree.openElements.pop()
2304 node = self.tree.openElements.pop()
2306 node = self.tree.openElements.pop()
2419 currentNode = self.tree.openElements[-1]
2425 while (self.tree.openElements[-1].namespace !=
2427 not self.parser.isHTMLIntegrationPoint(self.tree.openElements[-1]) and
2428 not self.parser.isMathMLTextIntegrationPoint(self.tree.openElements[-1])):
2429 self.tree.openElements.pop()
2442 self.tree.openElements.pop()
2446 nodeIndex = len(self.tree.openElements) - 1
2447 node = self.tree.openElements[-1]
2457 while self.tree.openElements.pop() != node:
2458 assert self.tree.openElements
2463 node = self.tree.openElements[nodeIndex]
2490 self.tree.insertComment(token, self.tree.openElements[0])
2537 if self.tree.openElements[-1].name != "html":
2550 self.tree.openElements.pop()
2560 if self.tree.openElements[-1].name == "html":
2564 self.tree.openElements.pop()
2566 self.tree.openElements[-1].name != "frameset"):