您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ toRenderBlock函数代码示例

51自学网 2021-06-03 08:53:27
  C++
这篇教程C++ toRenderBlock函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中toRenderBlock函数的典型用法代码示例。如果您正苦于以下问题:C++ toRenderBlock函数的具体用法?C++ toRenderBlock怎么用?C++ toRenderBlock使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: ASSERT

void RenderRubyBase::mergeBlockChildren(RenderRubyBase* toBase, RenderObject* fromBeforeChild){    // This function removes all children that are before fromBeforeChild and appends them to toBase.    ASSERT(!childrenInline());    ASSERT(toBase);    ASSERT(!toBase->childrenInline());    // Quick check whether we have anything to do, to simplify the following code.    if (fromBeforeChild != firstChild())        return;    // If an anonymous block would be put next to another such block, then merge those.    RenderObject* firstChildHere = firstChild();    RenderObject* lastChildThere = toBase->lastChild();    if (firstChildHere && firstChildHere->isAnonymousBlock() && firstChildHere->childrenInline()             && lastChildThere && lastChildThere->isAnonymousBlock() && lastChildThere->childrenInline()) {                    RenderBlock* anonBlockHere = toRenderBlock(firstChildHere);        RenderBlock* anonBlockThere = toRenderBlock(lastChildThere);        anonBlockHere->moveAllChildrenTo(anonBlockThere, anonBlockThere->children());        anonBlockHere->deleteLineBoxTree();        anonBlockHere->destroy();    }    // Move all remaining children normally.    moveChildrenTo(toBase, firstChild(), fromBeforeChild);}
开发者ID:azrul2202,项目名称:WebKit-Smartphone,代码行数:25,


示例2: isRubyAfterBlock

static inline bool isRubyAfterBlock(const RenderObject* object){    return isAnonymousRubyInlineBlock(object)        && !object->nextSibling()        && toRenderBlock(object)->firstChild()        && toRenderBlock(object)->firstChild()->style()->styleType() == AFTER;}
开发者ID:335969568,项目名称:Blink-1,代码行数:7,


示例3: isRubyBeforeBlock

static inline bool isRubyBeforeBlock(const RenderObject* object){    return isAnonymousRubyInlineBlock(object)        && !object->previousSibling()        && toRenderBlock(object)->firstChild()        && toRenderBlock(object)->firstChild()->style()->styleType() == BEFORE;}
开发者ID:335969568,项目名称:Blink-1,代码行数:7,


示例4: toRenderBlock

void RenderRubyBase::moveBlockChildren(RenderRubyBase* toBase, RenderObject* fromBeforeChild){    if (toBase->childrenInline()) {        // First check whether we move only wrapped inline objects.        if (hasOnlyWrappedInlineChildren(fromBeforeChild)) {            // The reason why the base is in block flow must be after beforeChild.            // We therefore can extract the inline objects and move them to toBase.            for (RenderObject* child = firstChild(); child != fromBeforeChild; child = firstChild()) {                if (child->isAnonymousBlock()) {                    RenderBlock* anonBlock = toRenderBlock(child);                    ASSERT(anonBlock->childrenInline());                    ASSERT(!anonBlock->inlineElementContinuation());                    anonBlock->moveAllChildrenTo(toBase, toBase->children());                    anonBlock->deleteLineBoxTree();                    anonBlock->destroy();                } else {                    ASSERT(child->isFloatingOrPositioned());                    moveChildTo(toBase, child);                }            }        } else {            // Moving block children -> have to set toBase as block flow            toBase->makeChildrenNonInline();            // Move children, potentially collapsing anonymous block wrappers.            mergeBlockChildren(toBase, fromBeforeChild);            // Now we need to check if the leftover children are all inline.            // If so, make this base inline again.            if (hasOnlyWrappedInlineChildren()) {                RenderObject* next = 0;                for (RenderObject* child = firstChild(); child; child = next) {                    next = child->nextSibling();                    if (child->isFloatingOrPositioned())                        continue;                    ASSERT(child->isAnonymousBlock());                    RenderBlock* anonBlock = toRenderBlock(child);                    ASSERT(anonBlock->childrenInline());                    ASSERT(!anonBlock->inlineElementContinuation());                    // Move inline children out of anonymous block.                    anonBlock->moveAllChildrenTo(this, anonBlock);                    anonBlock->deleteLineBoxTree();                    anonBlock->destroy();                }                setChildrenInline(true);            }        }    } else        mergeBlockChildren(toBase, fromBeforeChild);}
开发者ID:azrul2202,项目名称:WebKit-Smartphone,代码行数:50,


示例5: container

void RenderBoxModelObject::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformState& transformState) const{    RenderObject* o = container();    if (!o)        return;    if (o->isRenderFlowThread())        transformState.move(o->columnOffset(LayoutPoint(transformState.mappedPoint())));    o->mapAbsoluteToLocalPoint(mode, transformState);    LayoutSize containerOffset = offsetFromContainer(o, LayoutPoint());    if (!style()->hasOutOfFlowPosition() && o->hasColumns()) {        RenderBlock* block = toRenderBlock(o);        LayoutPoint point(roundedLayoutPoint(transformState.mappedPoint()));        point -= containerOffset;        block->adjustForColumnRect(containerOffset, point);    }    bool preserve3D = mode & UseTransforms && (o->style()->preserves3D() || style()->preserves3D());    if (mode & UseTransforms && shouldUseTransformFromContainer(o)) {        TransformationMatrix t;        getTransformFromContainer(o, containerOffset, t);        transformState.applyTransform(t, preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform);    } else        transformState.move(containerOffset.width(), containerOffset.height(), preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform);}
开发者ID:335969568,项目名称:Blink-1,代码行数:28,


示例6: flowBoxForRenderer

static inline InlineFlowBox* flowBoxForRenderer(RenderObject* renderer){    if (!renderer)        return 0;    if (renderer->isRenderBlock()) {        // If we're given a block element, it has to be a RenderSVGText.        ASSERT(renderer->isSVGText());        RenderBlock* renderBlock = toRenderBlock(renderer);        // RenderSVGText only ever contains a single line box.        InlineFlowBox* flowBox = renderBlock->firstLineBox();        ASSERT(flowBox == renderBlock->lastLineBox());        return flowBox;    }    if (renderer->isRenderInline()) {        // We're given a RenderSVGInline or objects that derive from it (RenderSVGTSpan / RenderSVGTextPath)        RenderInline* renderInline = toRenderInline(renderer);        // RenderSVGInline only ever contains a single line box.        InlineFlowBox* flowBox = renderInline->firstLineBox();        ASSERT(flowBox == renderInline->lastLineBox());        return flowBox;    }    ASSERT_NOT_REACHED();    return 0;}
开发者ID:huningxin,项目名称:blink-crosswalk,代码行数:29,


示例7: ASSERT

VisiblePosition RenderRegion::positionForPoint(const LayoutPoint& point){    ASSERT(m_flowThread);    if (!isValid() || !m_flowThread->firstChild()) // checking for empty region blocks.        return RenderBlock::positionForPoint(point);    return toRenderBlock(m_flowThread->firstChild())->positionForPoint(mapRegionPointIntoFlowThreadCoordinates(point));}
开发者ID:CannedFish,项目名称:webkitgtk,代码行数:8,


示例8: toRenderBlock

RenderBlock* RenderTextFragment::blockForAccompanyingFirstLetter() const{    if (!m_firstLetter)        return 0;    for (RenderObject* block = m_firstLetter->parent(); block; block = block->parent()) {        if (block->style()->hasPseudoStyle(FIRST_LETTER) && block->canHaveChildren() && block->isRenderBlock())            return toRenderBlock(block);    }    return 0;}
开发者ID:webOS-ports,项目名称:webkit,代码行数:10,


示例9: firstChild

void RenderFullScreen::unwrapRenderer(bool& requiresRenderTreeRebuild){    requiresRenderTreeRebuild = false;    if (parent()) {        auto* child = firstChild();        // Things can get very complicated with anonymous block generation.        // We can restore correctly without rebuild in simple cases only.        // FIXME: We should have a mechanism for removing a block without reconstructing the tree.        if (child != lastChild())            requiresRenderTreeRebuild = true;        else if (child && child->isAnonymousBlock()) {            auto& anonymousBlock = toRenderBlock(*child);            if (anonymousBlock.firstChild() != anonymousBlock.lastChild())                requiresRenderTreeRebuild = true;        }        while ((child = firstChild())) {            if (child->isAnonymousBlock() && !requiresRenderTreeRebuild) {                if (auto* nonAnonymousChild = toRenderBlock(*child).firstChild())                    child = nonAnonymousChild;                else {                    child->removeFromParent();                    child->destroy();                    continue;                }            }            // We have to clear the override size, because as a flexbox, we            // may have set one on the child, and we don't want to leave that            // lying around on the child.            if (child->isBox())                toRenderBox(child)->clearOverrideSize();            child->removeFromParent();            parent()->addChild(child, this);            parent()->setNeedsLayoutAndPrefWidthsRecalc();        }    }    if (placeholder())        placeholder()->removeFromParent();    removeFromParent();    document().setFullScreenRenderer(0);}
开发者ID:aosm,项目名称:WebCore,代码行数:41,


示例10: caretRendersInsideNode

RenderBlock* CaretBase::caretRenderer(Node* node){    if (!node)        return 0;    RenderObject* renderer = node->renderer();    if (!renderer)        return 0;    // if caretNode is a block and caret is inside it then caret should be painted by that block    bool paintedByBlock = renderer->isRenderBlock() && caretRendersInsideNode(node);    return paintedByBlock ? toRenderBlock(renderer) : renderer->containingBlock();}
开发者ID:Miaque,项目名称:mojo,代码行数:13,


示例11: accumulateInFlowPositionOffsets

static LayoutSize accumulateInFlowPositionOffsets(const RenderObject* child){    if (!child->isAnonymousBlock() || !child->isRelPositioned())        return LayoutSize();    LayoutSize offset;    RenderObject* p = toRenderBlock(child)->inlineElementContinuation();    while (p && p->isRenderInline()) {        if (p->isRelPositioned()) {            RenderInline* renderInline = toRenderInline(p);            offset += renderInline->offsetForInFlowPosition();        }        p = p->parent();    }    return offset;}
开发者ID:335969568,项目名称:Blink-1,代码行数:15,


示例12: ASSERT

void RenderBoxModelObject::moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child, RenderObject* beforeChild, bool fullRemoveInsert){    // We assume that callers have cleared their positioned objects list for child moves (!fullRemoveInsert) so the    // positioned renderer maps don't become stale. It would be too slow to do the map lookup on each call.    ASSERT(!fullRemoveInsert || !isRenderBlock() || !toRenderBlock(this)->hasPositionedObjects());    ASSERT(this == child->parent());    ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());    if (fullRemoveInsert && (toBoxModelObject->isRenderBlock() || toBoxModelObject->isRenderInline())) {        // Takes care of adding the new child correctly if toBlock and fromBlock        // have different kind of children (block vs inline).        toBoxModelObject->addChild(virtualChildren()->removeChildNode(this, child), beforeChild);    } else        toBoxModelObject->virtualChildren()->insertChildNode(toBoxModelObject, virtualChildren()->removeChildNode(this, child, fullRemoveInsert), beforeChild, fullRemoveInsert);}
开发者ID:335969568,项目名称:Blink-1,代码行数:15,


示例13: innerTextElement

String HTMLTextFormControlElement::valueWithHardLineBreaks() const{    // FIXME: It's not acceptable to ignore the HardWrap setting when there is no renderer.    // While we have no evidence this has ever been a practical problem, it would be best to fix it some day.    HTMLElement* innerText = innerTextElement();    if (!innerText || !isTextFormControl())        return value();    RenderBlock* renderer = toRenderBlock(innerText->renderer());    if (!renderer)        return value();    Node* breakNode;    unsigned breakOffset;    RootInlineBox* line = renderer->firstRootBox();    if (!line)        return value();    getNextSoftBreak(line, breakNode, breakOffset);    StringBuilder result;    for (Node* node = innerText->firstChild(); node; node = NodeTraversal::next(node, innerText)) {        if (node->hasTagName(brTag))            result.append(newlineCharacter);        else if (node->isTextNode()) {            String data = toText(node)->data();            unsigned length = data.length();            unsigned position = 0;            while (breakNode == node && breakOffset <= length) {                if (breakOffset > position) {                    result.append(data.characters() + position, breakOffset - position);                    position = breakOffset;                    result.append(newlineCharacter);                }                getNextSoftBreak(line, breakNode, breakOffset);            }            result.append(data.characters() + position, length - position);        }        while (breakNode == node)            getNextSoftBreak(line, breakNode, breakOffset);    }    return finishText(result);}
开发者ID:awong-chromium,项目名称:webkit,代码行数:43,


示例14: toRenderBlock

void RenderBoxModelObject::moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* startChild, RenderObject* endChild, RenderObject* beforeChild, bool fullRemoveInsert){    // This condition is rarely hit since this function is usually called on    // anonymous blocks which can no longer carry positioned objects (see r120761)    // or when fullRemoveInsert is false.    if (fullRemoveInsert && isRenderBlock()) {        RenderBlock* block = toRenderBlock(this);        block->removePositionedObjects(0);        if (block->isRenderBlockFlow())            toRenderBlockFlow(block)->removeFloatingObjects();    }    ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());    for (RenderObject* child = startChild; child && child != endChild; ) {        // Save our next sibling as moveChildTo will clear it.        RenderObject* nextSibling = child->nextSibling();        moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);        child = nextSibling;    }}
开发者ID:335969568,项目名称:Blink-1,代码行数:20,


示例15: rootInlineBoxForTextContentElement

static inline SVGRootInlineBox* rootInlineBoxForTextContentElement(const SVGTextContentElement* element){    RenderObject* object = element->renderer();        if (!object || !object->isSVGText() || object->isText())        return 0;    RenderBlock* svgText = toRenderBlock(object);    // Find root inline box    SVGRootInlineBox* rootBox = static_cast<SVGRootInlineBox*>(svgText->firstRootBox());    if (!rootBox) {        // Layout is not sync yet!        element->document()->updateLayoutIgnorePendingStylesheets();        rootBox = static_cast<SVGRootInlineBox*>(svgText->firstRootBox());    }    ASSERT(rootBox);    return rootBox;}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:20,


示例16: toRenderBlock

RenderBlock* RootInlineBox::block() const{    return toRenderBlock(renderer());}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:4,


示例17: columnSetAtBlockOffset

LayoutPoint RenderFlowThread::adjustedPositionRelativeToOffsetParent(const RenderBoxModelObject& boxModelObject, const LayoutPoint& startPoint){    LayoutPoint referencePoint = startPoint;    // FIXME: This needs to be adapted for different writing modes inside the flow thread.    RenderMultiColumnSet* startColumnSet = columnSetAtBlockOffset(referencePoint.y());    if (startColumnSet) {        // Take into account the offset coordinates of the columnSet.        RenderObject* currObject = startColumnSet;        RenderObject* currOffsetParentRenderer;        Element* currOffsetParentElement;        while ((currOffsetParentElement = currObject->offsetParent()) && (currOffsetParentRenderer = currOffsetParentElement->renderer())) {            if (currObject->isBoxModelObject())                referencePoint.move(toRenderBoxModelObject(currObject)->offsetLeft(), toRenderBoxModelObject(currObject)->offsetTop());            // Since we're looking for the offset relative to the body, we must also            // take into consideration the borders of the columnSet's offsetParent.            if (currOffsetParentRenderer->isBox() && !currOffsetParentRenderer->isBody())                referencePoint.move(toRenderBox(currOffsetParentRenderer)->borderLeft(), toRenderBox(currOffsetParentRenderer)->borderTop());            currObject = currOffsetParentRenderer;        }        // We need to check if any of this box's containing blocks start in a different columnSet        // and if so, drop the object's top position (which was computed relative to its containing block        // and is no longer valid) and recompute it using the columnSet in which it flows as reference.        bool wasComputedRelativeToOtherRegion = false;        const RenderBlock* objContainingBlock = boxModelObject.containingBlock();        while (objContainingBlock) {            // Check if this object is in a different columnSet.            RenderMultiColumnSet* parentStartRegion = 0;            RenderMultiColumnSet* parentEndRegion = 0;            getRegionRangeForBox(objContainingBlock, parentStartRegion, parentEndRegion);            if (parentStartRegion && parentStartRegion != startColumnSet) {                wasComputedRelativeToOtherRegion = true;                break;            }            objContainingBlock = objContainingBlock->containingBlock();        }        if (wasComputedRelativeToOtherRegion) {            // Get the logical top coordinate of the current object.            LayoutUnit top = 0;            if (boxModelObject.isRenderBlock()) {                top = toRenderBlock(&boxModelObject)->offsetFromLogicalTopOfFirstPage();            } else {                if (boxModelObject.containingBlock())                    top = boxModelObject.containingBlock()->offsetFromLogicalTopOfFirstPage();                if (boxModelObject.isBox())                    top += toRenderBox(&boxModelObject)->topLeftLocation().y();                else if (boxModelObject.isRenderInline())                    top -= toRenderInline(&boxModelObject)->borderTop();            }            // Get the logical top of the columnSet this object starts in            // and compute the object's top, relative to the columnSet's top.            LayoutUnit regionLogicalTop = startColumnSet->pageLogicalTopForOffset(top);            LayoutUnit topRelativeToRegion = top - regionLogicalTop;            referencePoint.setY(startColumnSet->offsetTop() + topRelativeToRegion);            // Since the top has been overriden, check if the            // relative positioning must be reconsidered.            if (boxModelObject.isRelPositioned())                referencePoint.move(0, boxModelObject.relativePositionOffset().height());        }        // Since we're looking for the offset relative to the body, we must also        // take into consideration the borders of the columnSet.        referencePoint.move(startColumnSet->borderLeft(), startColumnSet->borderTop());    }    return referencePoint;}
开发者ID:smil-in-javascript,项目名称:blink,代码行数:74,


示例18: adjustedScrollOffset

void RenderLayerScrollableArea::updateAfterLayout(){    m_scrollDimensionsDirty = true;    IntSize originalScrollOffset = adjustedScrollOffset();    computeScrollDimensions();    // Layout may cause us to be at an invalid scroll position. In this case we need    // to pull our scroll offsets back to the max (or push them up to the min).    IntSize clampedScrollOffset = clampScrollOffset(adjustedScrollOffset());    if (clampedScrollOffset != adjustedScrollOffset())        scrollToOffset(clampedScrollOffset);    if (originalScrollOffset != adjustedScrollOffset())        scrollToOffsetWithoutAnimation(-scrollOrigin() + adjustedScrollOffset());    bool hasHorizontalOverflow = this->hasHorizontalOverflow();    bool hasVerticalOverflow = this->hasVerticalOverflow();    {        // Hits in compositing/overflow/automatically-opt-into-composited-scrolling-after-style-change.html.        DisableCompositingQueryAsserts disabler;        // overflow:scroll should just enable/disable.        if (box().style()->overflowX() == OSCROLL)            horizontalScrollbar()->setEnabled(hasHorizontalOverflow);        if (box().style()->overflowY() == OSCROLL)            verticalScrollbar()->setEnabled(hasVerticalOverflow);    }    // overflow:auto may need to lay out again if scrollbars got added/removed.    bool autoHorizontalScrollBarChanged = box().hasAutoHorizontalScrollbar() && (hasHorizontalScrollbar() != hasHorizontalOverflow);    bool autoVerticalScrollBarChanged = box().hasAutoVerticalScrollbar() && (hasVerticalScrollbar() != hasVerticalOverflow);    if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged) {        if (box().hasAutoHorizontalScrollbar())            setHasHorizontalScrollbar(hasHorizontalOverflow);        if (box().hasAutoVerticalScrollbar())            setHasVerticalScrollbar(hasVerticalOverflow);        layer()->updateSelfPaintingLayer();        if (box().style()->overflowX() == OAUTO || box().style()->overflowY() == OAUTO) {            if (!m_inOverflowRelayout) {                // Our proprietary overflow: overlay value doesn't trigger a layout.                m_inOverflowRelayout = true;                SubtreeLayoutScope layoutScope(box());                layoutScope.setNeedsLayout(&box());                if (box().isRenderBlock()) {                    RenderBlock& block = toRenderBlock(box());                    block.scrollbarsChanged(autoHorizontalScrollBarChanged, autoVerticalScrollBarChanged);                    block.layoutBlock(true);                } else {                    box().layout();                }                m_inOverflowRelayout = false;            }        }    }    {        // Hits in compositing/overflow/automatically-opt-into-composited-scrolling-after-style-change.html.        DisableCompositingQueryAsserts disabler;        // Set up the range (and page step/line step).        if (Scrollbar* horizontalScrollbar = this->horizontalScrollbar()) {            int clientWidth = box().pixelSnappedClientWidth();            horizontalScrollbar->setProportion(clientWidth, overflowRect().width());        }        if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) {            int clientHeight = box().pixelSnappedClientHeight();            verticalScrollbar->setProportion(clientHeight, overflowRect().height());        }    }    bool hasOverflow = hasScrollableHorizontalOverflow() || hasScrollableVerticalOverflow();    updateScrollableAreaSet(hasOverflow);    if (hasOverflow) {        DisableCompositingQueryAsserts disabler;        positionOverflowControls(IntSize());    }}
开发者ID:viettrungluu-cr,项目名称:mojo,代码行数:83,


示例19: ASSERT

// This method returns the maximum page size of a region with auto-height. This is the initial// height value for auto-height regions in the first layout phase of the parent named flow.LayoutUnit RenderNamedFlowFragment::maxPageLogicalHeight() const{    ASSERT(m_flowThread);    ASSERT(hasAutoLogicalHeight() && m_flowThread->inMeasureContentLayoutPhase());    ASSERT(isAnonymous());    ASSERT(parent());    const RenderStyle& styleToUse = parent()->style();    return styleToUse.logicalMaxHeight().isUndefined() ? RenderFlowThread::maxLogicalHeight() : toRenderBlock(parent())->computeReplacedLogicalHeightUsing(styleToUse.logicalMaxHeight());}
开发者ID:MYSHLIFE,项目名称:webkit,代码行数:12,


示例20: write

void write(TextStream& ts, const RenderObject& o, int indent, RenderAsTextBehavior behavior){#if ENABLE(SVG)    if (o.isSVGPath()) {        write(ts, *toRenderSVGPath(&o), indent);        return;    }    if (o.isSVGGradientStop()) {        writeSVGGradientStop(ts, *toRenderSVGGradientStop(&o), indent);        return;    }    if (o.isSVGResourceContainer()) {        writeSVGResourceContainer(ts, o, indent);        return;    }    if (o.isSVGContainer()) {        writeSVGContainer(ts, o, indent);        return;    }    if (o.isSVGRoot()) {        write(ts, *toRenderSVGRoot(&o), indent);        return;    }    if (o.isSVGText()) {        writeSVGText(ts, *toRenderBlock(&o), indent);        return;    }    if (o.isSVGInlineText()) {        writeSVGInlineText(ts, *toRenderText(&o), indent);        return;    }    if (o.isSVGImage()) {        writeSVGImage(ts, *toRenderSVGImage(&o), indent);        return;    }#endif    writeIndent(ts, indent);    RenderTreeAsText::writeRenderObject(ts, o, behavior);    ts << "/n";    if (o.isText() && !o.isBR()) {        const RenderText& text = *toRenderText(&o);        for (InlineTextBox* box = text.firstTextBox(); box; box = box->nextTextBox()) {            writeIndent(ts, indent + 1);            writeTextRun(ts, text, *box);        }    }    for (RenderObject* child = o.firstChild(); child; child = child->nextSibling()) {        if (child->hasLayer())            continue;        write(ts, *child, indent + 1, behavior);    }    if (o.isWidget()) {        Widget* widget = toRenderWidget(&o)->widget();        if (widget && widget->isFrameView()) {            FrameView* view = static_cast<FrameView*>(widget);            RenderView* root = view->frame()->contentRenderer();            if (root) {                view->layout();                RenderLayer* l = root->layer();                if (l)                    writeLayers(ts, l, l, IntRect(l->x(), l->y(), l->width(), l->height()), indent + 1, behavior);            }        }    }}
开发者ID:DreamOnTheGo,项目名称:src,代码行数:70,



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


C++ toRenderBoxModelObject函数代码示例
C++ toRadians函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。