本文整理汇总了C++中LayoutTableCell::table方法的典型用法代码示例。如果您正苦于以下问题:C++ LayoutTableCell::table方法的具体用法?C++ LayoutTableCell::table怎么用?C++ LayoutTableCell::table使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayoutTableCell
的用法示例。
在下文中一共展示了LayoutTableCell::table方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: columnIndexRange
void AXTableCell::columnIndexRange(std::pair<unsigned, unsigned>& columnRange)
{
if (!m_layoutObject || !m_layoutObject->isTableCell())
return;
LayoutTableCell* cell = toLayoutTableCell(m_layoutObject);
columnRange.first = cell->table()->colToEffCol(cell->col());
columnRange.second = cell->table()->colToEffCol(cell->col() + cell->colSpan()) - columnRange.first;
}
示例2: rowIndexRange
void AXTableCell::rowIndexRange(std::pair<unsigned, unsigned>& rowRange)
{
if (!m_layoutObject || !m_layoutObject->isTableCell())
return;
LayoutTableCell* layoutCell = toLayoutTableCell(m_layoutObject);
rowRange.first = layoutCell->rowIndex();
rowRange.second = layoutCell->rowSpan();
// since our table might have multiple sections, we have to offset our row appropriately
LayoutTableSection* section = layoutCell->section();
LayoutTable* table = layoutCell->table();
if (!table || !section)
return;
LayoutTableSection* tableSection = table->topSection();
unsigned rowOffset = 0;
while (tableSection) {
if (tableSection == section)
break;
rowOffset += tableSection->numRows();
tableSection = table->sectionBelow(tableSection, SkipEmptySections);
}
rowRange.first += rowOffset;
}
示例3: cellAbove
HTMLTableCellElement* HTMLTableCellElement::cellAbove() const
{
LayoutObject* cellLayoutObject = layoutObject();
if (!cellLayoutObject)
return nullptr;
if (!cellLayoutObject->isTableCell())
return nullptr;
LayoutTableCell* tableCellLayoutObject = toLayoutTableCell(cellLayoutObject);
LayoutTableCell* cellAboveLayoutObject = tableCellLayoutObject->table()->cellAbove(tableCellLayoutObject);
if (!cellAboveLayoutObject)
return nullptr;
return toHTMLTableCellElement(cellAboveLayoutObject->node());
}