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


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

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


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

示例1: absoluteQuads

void RenderInline::absoluteQuads(Vector<FloatQuad>& quads, bool topLevel)
{
    for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
        FloatRect localRect(curr->xPos(), curr->yPos(), curr->width(), curr->height());
        quads.append(localToAbsoluteQuad(localRect));
    }
    
    for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
        if (!curr->isText())
            curr->absoluteQuads(quads, false);
    }

    if (continuation() && topLevel)
        continuation()->absoluteQuads(quads, topLevel);
}
开发者ID:songhaonangit,项目名称:patch-hosting-for-android-x86-support,代码行数:15,代码来源:RenderInline.cpp

示例2: collectAbsoluteLineBoxQuads

void RenderContainer::collectAbsoluteLineBoxQuads(Vector<FloatQuad>& quads, unsigned start, unsigned end, bool /*useSelectionHeight*/)
{
    if (!children()->firstChild() && (isInline() || isAnonymousBlock())) {
        absoluteQuads(quads);
        return;
    }

    if (!children()->firstChild())
        return;

    unsigned offset = start;
    for (RenderObject* child = childAt(start); child && offset < end; child = child->nextSibling(), ++offset) {
        if (child->isText() || child->isInline() || child->isAnonymousBlock())
            child->absoluteQuads(quads);
    }
}
开发者ID:marshall,项目名称:webkit_titanium,代码行数:16,代码来源:RenderContainer.cpp

示例3: computeQuads

void LinkHighlight::computeQuads(Node* node, Vector<FloatQuad>& outQuads) const
{
    if (!node || !node->renderer())
        return;

    RenderObject* renderer = node->renderer();

    // For inline elements, absoluteQuads will return a line box based on the line-height
    // and font metrics, which is technically incorrect as replaced elements like images
    // should use their intristic height and expand the linebox  as needed. To get an
    // appropriately sized highlight we descend into the children and have them add their
    // boxes.
    if (renderer->isRenderInline()) {
        for (Node* child = node->firstChild(); child; child = child->nextSibling())
            computeQuads(child, outQuads);
    } else {
        renderer->absoluteQuads(outQuads);
    }

}
开发者ID:junmin-zhu,项目名称:blink,代码行数:20,代码来源:LinkHighlight.cpp

示例4: computeQuads

void LinkHighlight::computeQuads(const Node& node, Vector<FloatQuad>& outQuads) const
{
    if (!node.renderer())
        return;

    RenderObject* renderer = node.renderer();

    // For inline elements, absoluteQuads will return a line box based on the line-height
    // and font metrics, which is technically incorrect as replaced elements like images
    // should use their intristic height and expand the linebox  as needed. To get an
    // appropriately sized highlight we descend into the children and have them add their
    // boxes.
    if (renderer->isRenderInline()) {
        for (Node* child = NodeRenderingTraversal::firstChild(&node); child; child = NodeRenderingTraversal::nextSibling(child))
            computeQuads(*child, outQuads);
    } else {
        // FIXME: this does not need to be absolute, just in the paint invalidation container's space.
        renderer->absoluteQuads(outQuads);
    }
}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:20,代码来源:LinkHighlight.cpp

示例5: buildHighlightRects

void AndroidHitTestResult::buildHighlightRects()
{
    m_highlightRects.clear();
    Node* node = m_hitTestResult.URLElement();
    if (!node || !node->renderer())
        node = m_hitTestResult.innerNode();
    if (!node || !node->renderer())
        return;
    if (!WebViewCore::nodeIsClickableOrFocusable(node))
        return;
    Frame* frame = node->document()->frame();
    IntPoint frameOffset = m_webViewCore->convertGlobalContentToFrameContent(IntPoint(), frame);
    RenderObject* renderer = node->renderer();
    Vector<FloatQuad> quads;
    if (renderer->isInline())
        renderer->absoluteFocusRingQuads(quads);
    if (!quads.size())
        renderer->absoluteQuads(quads); // No fancy rings, grab a bounding box
    for (size_t i = 0; i < quads.size(); i++) {
        IntRect boundingBox = quads[i].enclosingBoundingBox();
        boundingBox.move(-frameOffset.x(), -frameOffset.y());
        m_highlightRects.append(boundingBox);
    }
}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:24,代码来源:AndroidHitTestResult.cpp


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