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


C++ ownerDocument函数代码示例

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


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

示例1: reportMediaQueryWarningIfNeeded

void CSSStyleSheet::setMediaQueries(PassRefPtr<MediaQuerySet> mediaQueries)
{
    m_mediaQueries = mediaQueries;

    // Add warning message to inspector whenever dpi/dpcm values are used for "screen" media.
    reportMediaQueryWarningIfNeeded(ownerDocument(), m_mediaQueries.get());
}
开发者ID:davemichael,项目名称:mojo,代码行数:7,代码来源:CSSStyleSheet.cpp

示例2: poco_check_ptr

Attr* Element::setAttributeNodeNS(Attr* newAttr)
{
	poco_check_ptr (newAttr);

	if (newAttr->ownerDocument() != ownerDocument())
		throw DOMException(DOMException::WRONG_DOCUMENT_ERR);
	if (newAttr->ownerElement())
		throw DOMException(DOMException::INUSE_ATTRIBUTE_ERR);

	Attr* oldAttr = getAttributeNodeNS(newAttr->namespaceURI(), newAttr->localName());
	if (oldAttr) removeAttributeNode(oldAttr);

	Attr* pCur = _pFirstAttr;
	if (pCur)
	{
		while (pCur->_pNext) pCur = static_cast<Attr*>(pCur->_pNext);
		pCur->_pNext = newAttr;
	}
	else _pFirstAttr = newAttr;
	newAttr->_pParent = this;
	newAttr->duplicate();
	if (_pOwner->events())
		dispatchAttrModified(newAttr, MutationEvent::ADDITION, EMPTY_STRING, newAttr->getValue());

	return oldAttr;
}
开发者ID:119,项目名称:vdc,代码行数:26,代码来源:Element.cpp

示例3: ownerDocument

CachedResourceLoader* XSLStyleSheet::cachedResourceLoader()
{
    Document* document = ownerDocument();
    if (!document)
        return 0;
    return document->cachedResourceLoader();
}
开发者ID:kcomkar,项目名称:webkit,代码行数:7,代码来源:XSLStyleSheetLibxslt.cpp

示例4: ownerDocument

void CSSStyleSheet::didMutate()
{
    Document* owner = ownerDocument();
    if (!owner)
        return;
    owner->styleResolverChanged(DeferRecalcStyle);
}
开发者ID:rhythmkay,项目名称:webkit,代码行数:7,代码来源:CSSStyleSheet.cpp

示例5: WTFMove

void CSSStyleSheet::setMediaQueries(Ref<MediaQuerySet>&& mediaQueries)
{
    m_mediaQueries = WTFMove(mediaQueries);
    if (m_mediaCSSOMWrapper && m_mediaQueries)
        m_mediaCSSOMWrapper->reattach(m_mediaQueries.get());
    reportMediaQueryWarningIfNeeded(ownerDocument(), m_mediaQueries.get());
}
开发者ID:eocanha,项目名称:webkit,代码行数:7,代码来源:CSSStyleSheet.cpp

示例6: notifyAttributeChange

void SVGPolyElement::notifyAttributeChange() const
{
    if (m_ignoreAttributeChanges || ownerDocument()->parsing())
        return;

    m_ignoreAttributeChanges = true;
    rebuildRenderer();

    ExceptionCode ec = 0;

    // Spec: Additionally, the 'points' attribute on the original element
    // accessed via the XML DOM (e.g., using the getAttribute() method call)
    // will reflect any changes made to points.
    String _points;
    int len = points()->numberOfItems();
    for (int i = 0; i < len; ++i) {
        FloatPoint p = points()->getItem(i, ec);
        _points += String::format("%.6lg %.6lg ", p.x(), p.y());
    }
    
    RefPtr<Attr> attr = const_cast<SVGPolyElement*>(this)->getAttributeNode(SVGNames::pointsAttr.localName());
    if (attr) {
        ExceptionCode ec = 0;
        attr->setValue(_points, ec);
    }

    m_ignoreAttributeChanges = false;

    SVGStyledElement::notifyAttributeChange();
}
开发者ID:pk-codebox-evo,项目名称:remixos-usb-tool,代码行数:30,代码来源:SVGPolyElement.cpp

示例7: insertRule

ExceptionOr<unsigned> CSSStyleSheet::deprecatedInsertRule(const String& ruleString)
{
    if (auto* document = ownerDocument())
        document->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Calling CSSStyleSheet.insertRule() with one argument is deprecated. Please pass the index argument as well: insertRule(x, 0)."));

    return insertRule(ruleString, 0);
}
开发者ID:eocanha,项目名称:webkit,代码行数:7,代码来源:CSSStyleSheet.cpp

示例8: notifyAttributeChange

void SVGPathElement::notifyAttributeChange() const
{
    if (!ownerDocument()->parsing())
        rebuildRenderer();

    SVGStyledElement::notifyAttributeChange();
}
开发者ID:pk-codebox-evo,项目名称:remixos-usb-tool,代码行数:7,代码来源:SVGPathElement.cpp

示例9: screenEval

void SVGStyleElement::childrenChanged()
{
    SVGElement::childrenChanged();

    if(m_sheet)
        m_sheet = 0;

    m_loading = false;
    MediaQueryEvaluator screenEval("screen", true);
    MediaQueryEvaluator printEval("print", true);   
    RefPtr<MediaList> mediaList = new MediaList((CSSStyleSheet*)0, media());
    if ((type().isEmpty() || type() == "text/css") && (screenEval.eval(mediaList.get()) || printEval.eval(mediaList.get()))) {
        ownerDocument()->addPendingSheet();

        m_loading = true;
 
        m_sheet = new CSSStyleSheet(this);
        m_sheet->parseString(textContent()); // SVG css is always parsed in strict mode
        
        m_sheet->setMedia(mediaList.get());
        m_loading = false;
    }

    if(!isLoading() && m_sheet)
        document()->stylesheetLoaded();
}
开发者ID:oroisec,项目名称:ios,代码行数:26,代码来源:SVGStyleElement.cpp

示例10: createWebVTTNodeTree

PassRefPtr<DocumentFragment> TextTrackCue::getCueAsHTML()
{
    createWebVTTNodeTree();
    RefPtr<DocumentFragment> clonedFragment = DocumentFragment::create(ownerDocument());
    copyWebVTTNodeToDOMTree(m_webVTTNodeTree.get(), clonedFragment.get());
    return clonedFragment.release();
}
开发者ID:fmalita,项目名称:webkit,代码行数:7,代码来源:TextTrackCue.cpp

示例11: ownerDocument

ResourceFetcher* XSLStyleSheet::fetcher()
{
    Document* document = ownerDocument();
    if (!document)
        return 0;
    return document->fetcher();
}
开发者ID:glenkim-dev,项目名称:blink-crosswalk,代码行数:7,代码来源:XSLStyleSheetLibxslt.cpp

示例12: document

void SVGFEImageElement::requestImageResource()
{
    if (m_cachedImage) {
        m_cachedImage->removeClient(this);
        m_cachedImage = 0;
    }

    Element* hrefElement = SVGURIReference::targetElementFromIRIString(href(), document());
    if (hrefElement && hrefElement->isSVGElement() && hrefElement->renderer())
        return;

    ResourceRequest request(ownerDocument()->completeURL(href()));
    m_cachedImage = ownerDocument()->cachedResourceLoader()->requestImage(request);

    if (m_cachedImage)
        m_cachedImage->addClient(this);
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:17,代码来源:SVGFEImageElement.cpp

示例13: request

void SVGFEImageElement::requestImageResource()
{
    ResourceRequest request(ownerDocument()->completeURL(href()));
    m_cachedImage = document()->cachedResourceLoader()->requestImage(request);

    if (m_cachedImage)
        m_cachedImage->addClient(this);
}
开发者ID:dzhshf,项目名称:WebKit,代码行数:8,代码来源:SVGFEImageElement.cpp

示例14: while

LinearGradientAttributes SVGLinearGradientElement::collectGradientProperties() const
{
    LinearGradientAttributes attributes;
    HashSet<const SVGGradientElement*> processedGradients;

    bool isLinear = true;
    const SVGGradientElement* current = this;

    while (current) {
        if (!attributes.hasSpreadMethod() && current->hasAttribute(SVGNames::spreadMethodAttr))
            attributes.setSpreadMethod((GradientSpreadMethod) current->spreadMethod());

        if (!attributes.hasBoundingBoxMode() && current->hasAttribute(SVGNames::gradientUnitsAttr))
            attributes.setBoundingBoxMode(current->gradientUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);

        if (!attributes.hasGradientTransform() && current->hasAttribute(SVGNames::gradientTransformAttr))
            attributes.setGradientTransform(current->gradientTransform()->consolidate().matrix());

        if (!attributes.hasStops()) {
            const Vector<SVGGradientStop>& stops(current->buildStops());
            if (!stops.isEmpty())
                attributes.setStops(stops);
        }

        if (isLinear) {
            const SVGLinearGradientElement* linear = static_cast<const SVGLinearGradientElement*>(current);

            if (!attributes.hasX1() && current->hasAttribute(SVGNames::x1Attr))
                attributes.setX1(linear->x1());

            if (!attributes.hasY1() && current->hasAttribute(SVGNames::y1Attr))
                attributes.setY1(linear->y1());

            if (!attributes.hasX2() && current->hasAttribute(SVGNames::x2Attr))
                attributes.setX2(linear->x2());

            if (!attributes.hasY2() && current->hasAttribute(SVGNames::y2Attr))
                attributes.setY2(linear->y2());
        }

        processedGradients.add(current);

        // Respect xlink:href, take attributes from referenced element
        Node* refNode = ownerDocument()->getElementById(SVGURIReference::getTarget(current->href()));
        if (refNode && (refNode->hasTagName(SVGNames::linearGradientTag) || refNode->hasTagName(SVGNames::radialGradientTag))) {
            current = static_cast<const SVGGradientElement*>(const_cast<const Node*>(refNode));

            // Cycle detection
            if (processedGradients.contains(current))
                return LinearGradientAttributes();

            isLinear = current->gradientType() == LinearGradientPaintServer;
        } else
            current = 0;
    }

    return attributes;
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:58,代码来源:SVGLinearGradientElement.cpp

示例15: ownerDocument

void SVGTRefElement::updateReferencedText()
{
    Element* targetElement = ownerDocument()->getElementById(SVGURIReference::getTarget(href()));
    SVGElement* target = svg_dynamic_cast(targetElement);
    if (target) {
        ExceptionCode ignore = 0;
        setTextContent(target->textContent(), ignore);
    }
}
开发者ID:rgfernandes,项目名称:qtextended,代码行数:9,代码来源:SVGTRefElement.cpp


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