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


C++ FrameTree::firstChild方法代码示例

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


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

示例1: retrieveCachedResource

// SAMSUNG CHANGE : CopyImage >>
// Copy Image Issue on Nested Frame
CachedResource *retrieveCachedResource(Frame* frame,  String imageUrl)
{
	if (NULL == frame || imageUrl.isEmpty())
		return NULL;

	FrameTree *frameTree = frame->tree();
	if (!frameTree)
		return frame->document()->cachedResourceLoader()->cachedResource(imageUrl);
	
	WebCore::Frame *childFrame = frameTree->firstChild();
	Document *childFrameDocument = NULL;
	CachedResource* cachedResource = NULL;
	while (childFrame)
	{
		childFrameDocument = 	childFrame->document();
		if (childFrameDocument)
		{
			cachedResource = childFrameDocument->cachedResourceLoader()->cachedResource(imageUrl);
			if (cachedResource)
				break;
		}
		cachedResource = retrieveCachedResource(childFrame, imageUrl);
		if (cachedResource)
			break;
		childFrame = childFrame->tree()->nextSibling();
	}

	if (cachedResource)
		return cachedResource;
	else
		return frame->document()->cachedResourceLoader()->cachedResource(imageUrl);
}
开发者ID:johnwpoliver,项目名称:Samsung-GT-P3113-AOSP-CM-Kernel-and-Ramdisk,代码行数:34,代码来源:PasteBoardAndroid.cpp

示例2: parentFrame

/*!
  Returns a list of all frames that are direct children of this frame.

  \sa parentFrame()
*/
QList<QWebFrame*> QWebFrame::childFrames() const
{
    QList<QWebFrame*> rc;
    if (d->frame) {
        FrameTree *tree = d->frame->tree();
        for (Frame *child = tree->firstChild(); child; child = child->tree()->nextSibling()) {
            FrameLoader *loader = child->loader();
            FrameLoaderClientQt *client = static_cast<FrameLoaderClientQt*>(loader->client());
            if (client)
                rc.append(client->webFrame());
        }

    }
    return rc;
}
开发者ID:UIKit0,项目名称:WebkitAIR,代码行数:20,代码来源:qwebframe.cpp

示例3:

std::vector<WebFrame*>* WebFrame::children()
{
    m_rc.clear();
    if (Frame* frame = core(this)) {
        FrameTree *tree = frame->tree();
        for (Frame *child = tree->firstChild(); child; child = child->tree()->nextSibling()) {
            FrameLoader *loader = child->loader();
            WebFrameLoaderClient *client = static_cast<WebFrameLoaderClient*>(loader->client());
            if (client)
                m_rc.push_back(client->webFrame());
        }

    }
    return &m_rc;
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:15,代码来源:WebFrame.cpp


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