当前位置: 首页>>代码示例>>C++>>正文


C++ RenderTable::normalChildNeedsLayout方法代码示例

本文整理汇总了C++中RenderTable::normalChildNeedsLayout方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderTable::normalChildNeedsLayout方法的具体用法?C++ RenderTable::normalChildNeedsLayout怎么用?C++ RenderTable::normalChildNeedsLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RenderTable的用法示例。


在下文中一共展示了RenderTable::normalChildNeedsLayout方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: styleDidChange

void RenderTableRow::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
    ASSERT(style()->display() == TABLE_ROW);

    RenderBox::styleDidChange(diff, oldStyle);
    propagateStyleToAnonymousChildren();

    if (section() && oldStyle && style()->logicalHeight() != oldStyle->logicalHeight())
        section()->rowLogicalHeightChanged(rowIndex());

    // If border was changed, notify table.
    if (parent()) {
        RenderTable* table = this->table();
        if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style()->border())
            table->invalidateCollapsedBorders();
        
        if (table && oldStyle && diff == StyleDifferenceLayout && needsLayout() && table->collapseBorders() && borderWidthChanged(oldStyle, style())) {
            // If the border width changes on a row, we need to make sure the cells in the row know to lay out again.
            // This only happens when borders are collapsed, since they end up affecting the border sides of the cell
            // itself.
            for (RenderBox* childBox = firstChildBox(); childBox; childBox = childBox->nextSiblingBox()) {
                if (!childBox->isTableCell())
                    continue;
                childBox->setChildNeedsLayout(true, MarkOnlyThis);
            }
        }
    }
}
开发者ID:windyuuy,项目名称:opera,代码行数:28,代码来源:RenderTableRow.cpp

示例2: styleDidChange

void RenderTableCol::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
    RenderBox::styleDidChange(diff, oldStyle);

    // If border was changed, notify table.
    if (parent()) {
        RenderTable* table = this->table();
        if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style().border())
            table->invalidateCollapsedBorders();
        else if (oldStyle->width() != style().width()) {
            table->recalcSectionsIfNeeded();
            for (auto& section : childrenOfType<RenderTableSection>(*table)) {
                unsigned nEffCols = table->numEffCols();
                for (unsigned j = 0; j < nEffCols; j++) {
                    unsigned rowCount = section.numRows();
                    for (unsigned i = 0; i < rowCount; i++) {
                        RenderTableCell* cell = section.primaryCellAt(i, j);
                        if (!cell)
                            continue;
                        cell->setPreferredLogicalWidthsDirty(true);
                    }
                }
            }
        }
    }
}
开发者ID:houzhenggang,项目名称:webkit,代码行数:26,代码来源:RenderTableCol.cpp

示例3: styleDidChange

void RenderTableCol::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
    RenderBox::styleDidChange(diff, oldStyle);

    // If border was changed, notify table.
    if (parent()) {
        RenderTable* table = this->table();
        if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style()->border())
            table->invalidateCollapsedBorders();
    }
}
开发者ID:Spencerx,项目名称:webkit,代码行数:11,代码来源:RenderTableCol.cpp

示例4: styleDidChange

void RenderTableRow::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
    RenderBox::styleDidChange(diff, oldStyle);
    propagateStyleToAnonymousChildren();

    if (parent())
        updateBeforeAndAfterContent();

    // If border was changed, notify table.
    if (parent()) {
        RenderTable* table = this->table();
        if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style()->border())
            table->invalidateCollapsedBorders();
    }
}
开发者ID:1833183060,项目名称:wke,代码行数:15,代码来源:RenderTableRow.cpp

示例5: styleDidChange

void RenderTableRow::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
    ASSERT(style()->display() == TABLE_ROW);

    RenderBox::styleDidChange(diff, oldStyle);
    propagateStyleToAnonymousChildren();

    if (section() && oldStyle && style()->logicalHeight() != oldStyle->logicalHeight())
        section()->rowLogicalHeightChanged(rowIndex());

    // If border was changed, notify table.
    if (parent()) {
        RenderTable* table = this->table();
        if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style()->border())
            table->invalidateCollapsedBorders();
    }
}
开发者ID:,项目名称:,代码行数:17,代码来源:


注:本文中的RenderTable::normalChildNeedsLayout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。