本文整理汇总了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;
}
示例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;
}