本文整理汇总了C++中RenderTable::cellBelow方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderTable::cellBelow方法的具体用法?C++ RenderTable::cellBelow怎么用?C++ RenderTable::cellBelow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderTable
的用法示例。
在下文中一共展示了RenderTable::cellBelow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: collapsedAfterBorder
CollapsedBorderValue RenderTableCell::collapsedAfterBorder() const
{
RenderTable* table = this->table();
// For after border, we need to check, in order of precedence:
// (1) Our after border.
int before = CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderBeforeColor, table->style()->direction(), table->style()->writingMode());
int after = CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderAfterColor, table->style()->direction(), table->style()->writingMode());
CollapsedBorderValue result = CollapsedBorderValue(&style()->borderAfter(), style()->visitedDependentColor(after), BCELL);
RenderTableCell* nextCell = table->cellBelow(this);
if (nextCell) {
// (2) An after cell's before border.
result = chooseBorder(result, CollapsedBorderValue(&nextCell->style()->borderBefore(), nextCell->style()->visitedDependentColor(before), BCELL));
if (!result.exists())
return result;
}
// (3) Our row's after border. (FIXME: Deal with rowspan!)
result = chooseBorder(result, CollapsedBorderValue(&parent()->style()->borderAfter(), parent()->style()->visitedDependentColor(after), BROW));
if (!result.exists())
return result;
// (4) The next row's before border.
if (nextCell) {
result = chooseBorder(result, CollapsedBorderValue(&nextCell->parent()->style()->borderBefore(), nextCell->parent()->style()->visitedDependentColor(before), BROW));
if (!result.exists())
return result;
}
// Now check row groups.
RenderTableSection* currSection = section();
if (row() + rowSpan() >= currSection->numRows()) {
// (5) Our row group's after border.
result = chooseBorder(result, CollapsedBorderValue(&currSection->style()->borderAfter(), currSection->style()->visitedDependentColor(after), BROWGROUP));
if (!result.exists())
return result;
// (6) Following row group's before border.
currSection = table->sectionBelow(currSection);
if (currSection) {
result = chooseBorder(result, CollapsedBorderValue(&currSection->style()->borderBefore(), currSection->style()->visitedDependentColor(before), BROWGROUP));
if (!result.exists())
return result;
}
}
if (!currSection) {
// (8) Our column and column group's after borders.
RenderTableCol* colElt = table->colElement(col());
if (colElt) {
result = chooseBorder(result, CollapsedBorderValue(&colElt->style()->borderAfter(), colElt->style()->visitedDependentColor(after), BCOL));
if (!result.exists()) return result;
if (colElt->parent()->isTableCol()) {
result = chooseBorder(result, CollapsedBorderValue(&colElt->parent()->style()->borderAfter(), colElt->parent()->style()->visitedDependentColor(after), BCOLGROUP));
if (!result.exists())
return result;
}
}
// (9) The table's after border.
result = chooseBorder(result, CollapsedBorderValue(&table->style()->borderAfter(), table->style()->visitedDependentColor(after), BTABLE));
if (!result.exists())
return result;
}
return result;
}