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


C++ RenderObject::dirtyLinesFromChangedChild方法代码示例

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


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

示例1: updateMarkerLocation

bool RenderListItem::updateMarkerLocation()
{
    ASSERT(m_marker);
    RenderObject* markerParent = m_marker->parent();
    RenderObject* lineBoxParent = getParentOfFirstLineBox(this, m_marker);
    if (!lineBoxParent) {
        // If the marker is currently contained inside an anonymous box, then we
        // are the only item in that anonymous box (since no line box parent was
        // found). It's ok to just leave the marker where it is in this case.
        if (markerParent && markerParent->isAnonymousBlock())
            lineBoxParent = markerParent;
        else
            lineBoxParent = this;
    }

    if (markerParent != lineBoxParent) {
        updateFirstLetter();
        m_marker->remove();
        // FIXME(crbug.com/391009): Investigate whether this call is needed.
        if (markerParent)
            markerParent->dirtyLinesFromChangedChild(m_marker);
        lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent));
        m_marker->updateMarginsAndContent();
        // If markerParent is an anonymous block with no children, destroy it.
        if (markerParent && markerParent->isAnonymousBlock() && !toRenderBlock(markerParent)->firstChild() && !toRenderBlock(markerParent)->continuation())
            markerParent->destroy();
        return true;
    }

    return false;
}
开发者ID:Drakey83,项目名称:steamlink-sdk,代码行数:31,代码来源:RenderListItem.cpp

示例2: updateMarkerLocation

void RenderListItem::updateMarkerLocation()
{
    // Sanity check the location of our marker.
    if (m_marker) {
        RenderObject* markerParent = m_marker->parent();
        RenderObject* lineBoxParent = getParentOfFirstLineBox(this, m_marker);
        if (!lineBoxParent) {
            // If the marker is currently contained inside an anonymous box,
            // then we are the only item in that anonymous box (since no line box
            // parent was found).  It's ok to just leave the marker where it is
            // in this case.
            if (markerParent && markerParent->isAnonymousBlock())
                lineBoxParent = markerParent;
            else
                lineBoxParent = this;
        }

        if (markerParent != lineBoxParent || m_marker->preferredLogicalWidthsDirty()) {
            // Removing and adding the marker can trigger repainting in
            // containers other than ourselves, so we need to disable LayoutState.
            LayoutStateDisabler layoutStateDisabler(view());
            updateFirstLetter();
            m_marker->remove();
            if (markerParent)
                markerParent->dirtyLinesFromChangedChild(m_marker);
            if (!lineBoxParent)
                lineBoxParent = this;
            lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent));
            m_marker->updateMarginsAndContent();
            // If markerParent is an anonymous block that has lost all its children, destroy it.
            if (markerParent && markerParent->isAnonymousBlock() && !markerParent->firstChild() && !toRenderBlock(markerParent)->continuation())
                markerParent->destroy();

            // If the marker is inside we need to redo the preferred width calculations
            // as the size of the item now includes the size of the list marker.
            if (m_marker->isInside())
                containingBlock()->updateLogicalWidth();
        }
    }
}
开发者ID:glenkim-dev,项目名称:blink-crosswalk,代码行数:40,代码来源:RenderListItem.cpp


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