void HTMLTableElement::setNeedsTableStyleRecalc() const
{
    Element* element = ElementTraversal::next(*this, this);
    while (element) {
        element->setNeedsStyleRecalc(LocalStyleChange);
        if (isHTMLTableCellElement(*element))
            element = ElementTraversal::nextSkippingChildren(*element, this);
        else
            element = ElementTraversal::next(*element, this);
    }
}
Пример #2
0
void HTMLTableElement::setNeedsTableStyleRecalc() const {
  Element* element = ElementTraversal::next(*this, this);
  while (element) {
    element->setNeedsStyleRecalc(
        LocalStyleChange,
        StyleChangeReasonForTracing::fromAttribute(rulesAttr));
    if (isHTMLTableCellElement(*element))
      element = ElementTraversal::nextSkippingChildren(*element, this);
    else
      element = ElementTraversal::next(*element, this);
  }
}
Пример #3
0
static inline bool hasGeneratedAnonymousTableCells(const LayoutObject& parent)
{
    // We're checking whether the table part has generated anonymous table
    // part wrappers to hold its contents, so inspecting its first child will suffice.
    LayoutObject* child = parent.slowFirstChild();
    if (!child || !child->isAnonymous())
        return false;
    if (child->isTableCell()) {
        LayoutObject* firstChild = child->slowFirstChild();
        // Ignore the anonymous table cell if it is wrapping a table cell element (e.g. because of <td style="display:block;">).
        return !firstChild || !firstChild->node() || !isHTMLTableCellElement(firstChild->node());
    }
    if (child->isTableSection() || child->isTableRow())
        return hasGeneratedAnonymousTableCells(*child);
    return false;
}
Пример #4
0
static bool isHTMLBlockElement(const Node* node) {
  DCHECK(node);
  return isHTMLTableCellElement(*node) || isNonTableCellHTMLBlockElement(node);
}