• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ownerDocument函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: prepareRegionDisplayTree

PassRefPtr<HTMLDivElement> TextTrackRegion::getDisplayTree()
{
    if (!m_regionDisplayTree) {
        m_regionDisplayTree = HTMLDivElement::create(ownerDocument());
        prepareRegionDisplayTree();
    }

    return m_regionDisplayTree;
}
开发者ID:windyuuy,项目名称:opera,代码行数:9,代码来源:TextTrackRegion.cpp


示例17: prepareRegionDisplayTree

HTMLDivElement& VTTRegion::getDisplayTree()
{
    if (!m_regionDisplayTree) {
        m_regionDisplayTree = HTMLDivElement::create(*ownerDocument());
        prepareRegionDisplayTree();
    }

    return *m_regionDisplayTree;
}
开发者ID:ikiw,项目名称:webkit,代码行数:9,代码来源:VTTRegion.cpp


示例18: domObject

Node DocumentImpl::constructNode(NodeImpl* object) {
	if (object) {
		Node domObject(object);
		domObject->_setSelf(domObject);
		domObject->_setOwnerDocument(ownerDocument());
		return domObject;
	}
	return Node();
}
开发者ID:jcayzac,项目名称:random-stuff,代码行数:9,代码来源:dom_document.cpp


示例19: xmlFreeDoc

bool XSLStyleSheet::parseString(const String& string)
{
    // Parse in a single chunk into an xmlDocPtr
    const UChar BOM = 0xFEFF;
    const unsigned char BOMHighByte = *reinterpret_cast<const unsigned char*>(&BOM);
    if (!m_stylesheetDocTaken)
        xmlFreeDoc(m_stylesheetDoc);
    m_stylesheetDocTaken = false;

    Console* console = 0;
    if (ownerDocument()->frame())
        console = ownerDocument()->domWindow()->console();

    XMLDocumentParserScope scope(cachedResourceLoader(), XSLTProcessor::genericErrorFunc, XSLTProcessor::parseErrorFunc, console);

    const char* buffer = reinterpret_cast<const char*>(string.characters());
    int size = string.length() * sizeof(UChar);

    xmlParserCtxtPtr ctxt = xmlCreateMemoryParserCtxt(buffer, size);
    if (!ctxt)
        return 0;

    if (m_parentStyleSheet) {
        // The XSL transform may leave the newly-transformed document
        // with references to the symbol dictionaries of the style sheet
        // and any of its children. XML document disposal can corrupt memory
        // if a document uses more than one symbol dictionary, so we
        // ensure that all child stylesheets use the same dictionaries as their
        // parents.
        xmlDictFree(ctxt->dict);
        ctxt->dict = m_parentStyleSheet->m_stylesheetDoc->dict;
        xmlDictReference(ctxt->dict);
    }

    m_stylesheetDoc = xmlCtxtReadMemory(ctxt, buffer, size,
                                        finalURL().string().utf8().data(),
                                        BOMHighByte == 0xFF ? "UTF-16LE" : "UTF-16BE",
                                        XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_NOWARNING | XML_PARSE_NOCDATA);
    xmlFreeParserCtxt(ctxt);

    loadChildSheets();

    return m_stylesheetDoc;
}
开发者ID:kcomkar,项目名称:webkit,代码行数:44,代码来源:XSLStyleSheetLibxslt.cpp


示例20: m_url

DocumentInit::DocumentInit(const KURL& url, Frame* frame, WeakPtr<Document> contextDocument, HTMLImport* import)
    : m_url(url)
    , m_frame(frame)
    , m_parent(parentDocument(frame))
    , m_owner(ownerDocument(frame))
    , m_contextDocument(contextDocument)
    , m_import(import)
    , m_createNewRegistrationContext(false)
{
}
开发者ID:kublaj,项目名称:blink,代码行数:10,代码来源:DocumentInit.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ owner_transfer函数代码示例发布时间:2022-05-30
下一篇:
C++ owner函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap