本文整理汇总了C++中RenderTable::isInline方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderTable::isInline方法的具体用法?C++ RenderTable::isInline怎么用?C++ RenderTable::isInline使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderTable
的用法示例。
在下文中一共展示了RenderTable::isInline方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: shouldEmitNewlinesBeforeAndAfterNode
static bool shouldEmitNewlinesBeforeAndAfterNode(Node* node)
{
// Block flow (versus inline flow) is represented by having
// a newline both before and after the element.
RenderObject* r = node->renderer();
if (!r) {
return (node->hasTagName(blockquoteTag)
|| node->hasTagName(ddTag)
|| node->hasTagName(divTag)
|| node->hasTagName(dlTag)
|| node->hasTagName(dtTag)
|| node->hasTagName(h1Tag)
|| node->hasTagName(h2Tag)
|| node->hasTagName(h3Tag)
|| node->hasTagName(h4Tag)
|| node->hasTagName(h5Tag)
|| node->hasTagName(h6Tag)
|| node->hasTagName(hrTag)
|| node->hasTagName(liTag)
|| node->hasTagName(listingTag)
|| node->hasTagName(olTag)
|| node->hasTagName(pTag)
|| node->hasTagName(preTag)
|| node->hasTagName(trTag)
|| node->hasTagName(ulTag));
}
// Need to make an exception for table cells, because they are blocks, but we
// want them tab-delimited rather than having newlines before and after.
if (isTableCell(node))
return false;
// Need to make an exception for table row elements, because they are neither
// "inline" or "RenderBlock", but we want newlines for them.
if (r->isTableRow()) {
RenderTable* t = static_cast<RenderTableRow*>(r)->table();
if (t && !t->isInline())
return true;
}
return !r->isInline() && r->isRenderBlock() && !r->isFloatingOrPositioned() && !r->isBody();
}