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


C++ ContainerNode::hasTagName方法代码示例

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


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

示例1: gradientElement

SVGGradientElement* RenderSVGGradientStop::gradientElement() const
{
    ContainerNode* parentNode = node()->parentNode();
    if (parentNode->hasTagName(linearGradientTag) || parentNode->hasTagName(radialGradientTag))
        return static_cast<SVGGradientElement*>(parentNode);
    return 0;
}
开发者ID:Anthony-Biget,项目名称:openjfx,代码行数:7,代码来源:RenderSVGGradientStop.cpp

示例2: rendererIsNeeded

bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style)
{
    if (!m_wasDemoted)
        return HTMLElement::rendererIsNeeded(style);

    ContainerNode* node = parentNode();
    RenderObject* parentRenderer = node->renderer();
    // FIXME: Shouldn't we also check for table caption (see |formIsTablePart| below).
    // FIXME: This check is not correct for Shadow DOM.
    bool parentIsTableElementPart = (parentRenderer->isTable() && isHTMLTableElement(node))
        || (parentRenderer->isTableRow() && node->hasTagName(trTag))
        || (parentRenderer->isTableSection() && node->hasTagName(tbodyTag))
        || (parentRenderer->isRenderTableCol() && node->hasTagName(colTag))
        || (parentRenderer->isTableCell() && node->hasTagName(trTag));

    if (!parentIsTableElementPart)
        return true;

    EDisplay display = style.display();
    bool formIsTablePart = display == TABLE || display == INLINE_TABLE || display == TABLE_ROW_GROUP
        || display == TABLE_HEADER_GROUP || display == TABLE_FOOTER_GROUP || display == TABLE_ROW
        || display == TABLE_COLUMN_GROUP || display == TABLE_COLUMN || display == TABLE_CELL
        || display == TABLE_CAPTION;

    return formIsTablePart;
}
开发者ID:,项目名称:,代码行数:26,代码来源:

示例3: ownerSelectElement

HTMLSelectElement* HTMLOptionElement::ownerSelectElement() const
{
    ContainerNode* select = parentNode();
    while (select && !(select->hasTagName(selectTag) || select->hasTagName(keygenTag)))
        select = select->parentNode();

    if (!select)
        return 0;

    return static_cast<HTMLSelectElement*>(select);
}
开发者ID:,项目名称:,代码行数:11,代码来源:

示例4: updateFieldSetAndLegendAncestor

void HTMLFormControlElement::updateFieldSetAndLegendAncestor() const
{
    m_fieldSetAncestor = 0;
    m_legendAncestor = 0;
    for (ContainerNode* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) {
        if (!m_legendAncestor && ancestor->hasTagName(legendTag))
            m_legendAncestor = static_cast<HTMLLegendElement*>(ancestor);
        if (ancestor->hasTagName(fieldsetTag)) {
            m_fieldSetAncestor = static_cast<HTMLFieldSetElement*>(ancestor);
            break;
        }
    }
    m_fieldSetAncestorValid = true;
}
开发者ID:Spencerx,项目名称:webkit,代码行数:14,代码来源:HTMLFormControlElement.cpp

示例5: viewportElement

SVGElement* SVGElement::viewportElement() const
{
    // This function needs shadow tree support - as RenderSVGContainer uses this function
    // to determine the "overflow" property. <use> on <symbol> wouldn't work otherwhise.
    ContainerNode* n = parentOrShadowHostNode();
    while (n) {
        if (n->hasTagName(SVGNames::svgTag) || isSVGImageElement(n) || n->hasTagName(SVGNames::symbolTag))
            return toSVGElement(n);

        n = n->parentOrShadowHostNode();
    }

    return 0;
}
开发者ID:ZeusbaseWeb,项目名称:webkit,代码行数:14,代码来源:SVGElement.cpp

示例6: updateAncestorDisabledState

void HTMLFormControlElement::updateAncestorDisabledState() const
{
    HTMLFieldSetElement* fieldSetAncestor = 0;
    ContainerNode* legendAncestor = 0;
    for (ContainerNode* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) {
        if (!legendAncestor && ancestor->hasTagName(legendTag))
            legendAncestor = ancestor;
        if (ancestor->hasTagName(fieldsetTag)) {
            fieldSetAncestor = toHTMLFieldSetElement(ancestor);
            break;
        }
    }
    m_ancestorDisabledState = (fieldSetAncestor && fieldSetAncestor->isDisabledFormControl() && !(legendAncestor && legendAncestor == fieldSetAncestor->legend())) ? AncestorDisabledStateDisabled : AncestorDisabledStateEnabled;
}
开发者ID:vinayurala,项目名称:CSE608,代码行数:14,代码来源:HTMLFormControlElement.cpp

示例7: childrenChanged

void SVGFontFaceFormatElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
    SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);

    if (!parentNode() || !parentNode()->hasTagName(font_face_uriTag))
        return;
    
    ContainerNode* ancestor = parentNode()->parentNode();
    if (!ancestor || !ancestor->hasTagName(font_face_srcTag))
        return;
    
    ancestor = ancestor->parentNode();
    if (ancestor && ancestor->hasTagName(font_faceTag))
        static_cast<SVGFontFaceElement*>(ancestor)->rebuildFontFace();
}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:15,代码来源:SVGFontFaceFormatElement.cpp

示例8: childrenChanged

void SVGFontFaceFormatElement::childrenChanged(const ChildChange& change)
{
    SVGElement::childrenChanged(change);

    if (!parentNode() || !parentNode()->hasTagName(font_face_uriTag))
        return;
    
    ContainerNode* ancestor = parentNode()->parentNode();
    if (!ancestor || !ancestor->hasTagName(font_face_srcTag))
        return;
    
    ancestor = ancestor->parentNode();
    if (ancestor && ancestor->hasTagName(font_faceTag))
        toSVGFontFaceElement(ancestor)->rebuildFontFace();
}
开发者ID:,项目名称:,代码行数:15,代码来源:

示例9: rendererIsNeeded

bool HTMLEmbedElement::rendererIsNeeded(const RenderStyle& style)
{
    if (isImageType())
        return HTMLPlugInImageElement::rendererIsNeeded(style);

    // If my parent is an <object> and is not set to use fallback content, I
    // should be ignored and not get a renderer.
    ContainerNode* p = parentNode();
    if (p && p->hasTagName(objectTag)) {
        if (!p->renderer())
            return false;
        if (!toHTMLObjectElement(p)->useFallbackContent()) {
            ASSERT(!p->renderer()->isEmbeddedObject());
            return false;
        }
    }

#if ENABLE(DASHBOARD_SUPPORT)
    // Workaround for <rdar://problem/6642221>.
    if (document().frame()->settings().usesDashboardBackwardCompatibilityMode())
        return true;
#endif

    return HTMLPlugInImageElement::rendererIsNeeded(style);
}
开发者ID:ewmailing,项目名称:webkit,代码行数:25,代码来源:HTMLEmbedElement.cpp

示例10: svgAttributeChanged

void SVGFELightElement::svgAttributeChanged(const QualifiedName& attrName)
{
    SVGElement::svgAttributeChanged(attrName);

    if (attrName == SVGNames::azimuthAttr
        || attrName == SVGNames::elevationAttr
        || attrName == SVGNames::xAttr
        || attrName == SVGNames::yAttr
        || attrName == SVGNames::zAttr
        || attrName == SVGNames::pointsAtXAttr
        || attrName == SVGNames::pointsAtYAttr
        || attrName == SVGNames::pointsAtZAttr
        || attrName == SVGNames::specularExponentAttr
        || attrName == SVGNames::limitingConeAngleAttr) {
        ContainerNode* parent = parentNode();
        if (!parent)
            return;

        RenderObject* renderer = parent->renderer();
        if (!renderer || !renderer->isSVGResourceFilterPrimitive())
            return;

        if (parent->hasTagName(SVGNames::feDiffuseLightingTag)) {
            SVGFEDiffuseLightingElement* diffuseLighting = static_cast<SVGFEDiffuseLightingElement*>(parent);
            diffuseLighting->lightElementAttributeChanged(this, attrName);
            return;
        }
        // Handler for SpecularLighting has not implemented yet.
        RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
    }
}
开发者ID:,项目名称:,代码行数:31,代码来源:

示例11: findParentTable

HTMLTableElement* HTMLTablePartElement::findParentTable() const
{
    ContainerNode* parent = parentNode();
    while (parent && !parent->hasTagName(tableTag))
        parent = parent->parentNode();
    return static_cast<HTMLTableElement*>(parent);
}
开发者ID:dog-god,项目名称:iptv,代码行数:7,代码来源:HTMLTablePartElement.cpp

示例12: findParentTable

HTMLTableElement* HTMLTablePartElement::findParentTable() const
{
    ContainerNode* parent = NodeRenderingTraversal::parent(this);
    while (parent && !parent->hasTagName(tableTag))
        parent = NodeRenderingTraversal::parent(parent);
    return toHTMLTableElement(parent);
}
开发者ID:glenkim-dev,项目名称:blink-crosswalk,代码行数:7,代码来源:HTMLTablePartElement.cpp

示例13: enclosingList

HTMLElement* enclosingList(Node* node)
{
    if (!node)
        return 0;
        
    Node* root = highestEditableRoot(firstPositionInOrBeforeNode(node));
    
    for (ContainerNode* n = node->parentNode(); n; n = n->parentNode()) {
        if (n->hasTagName(ulTag) || n->hasTagName(olTag))
            return toHTMLElement(n);
        if (n == root)
            return 0;
    }
    
    return 0;
}
开发者ID:johnwpoliver,项目名称:Samsung-GT-P3113-AOSP-CM-Kernel-and-Ramdisk,代码行数:16,代码来源:htmlediting.cpp

示例14: textIndentedToRespectGroupLabel

String HTMLOptionElement::textIndentedToRespectGroupLabel() const
{
    ContainerNode* parent = parentNode();
    if (parent && parent->hasTagName(optgroupTag))
        return "    " + text();
    return text();
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例15: recalcSelectOptions

void HTMLOptGroupElement::recalcSelectOptions()
{
    ContainerNode* select = parentNode();
    while (select && !select->hasTagName(selectTag))
        select = select->parentNode();
    if (select)
        toHTMLSelectElement(select)->setRecalcListItems();
}
开发者ID:fmalita,项目名称:webkit,代码行数:8,代码来源:HTMLOptGroupElement.cpp


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