本文整理汇总了C++中HTMLPlugInElement::displayState方法的典型用法代码示例。如果您正苦于以下问题:C++ HTMLPlugInElement::displayState方法的具体用法?C++ HTMLPlugInElement::displayState怎么用?C++ HTMLPlugInElement::displayState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLPlugInElement
的用法示例。
在下文中一共展示了HTMLPlugInElement::displayState方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addPlugInsFromNodeListMatchingOriginHash
static void addPlugInsFromNodeListMatchingOriginHash(HTMLPlugInImageElementList& plugInList, PassRefPtr<NodeList> collection, unsigned originHash)
{
for (unsigned i = 0, length = collection->length(); i < length; i++) {
Node* node = collection->item(i);
if (node->isPluginElement()) {
HTMLPlugInElement* plugInElement = toHTMLPlugInElement(node);
if (plugInElement->isPlugInImageElement() && plugInElement->displayState() <= HTMLPlugInElement::DisplayingSnapshot && plugInElement->plugInOriginHash() == originHash)
plugInList.append(toHTMLPlugInImageElement(node));
}
}
}
示例2: addPlugInsFromNodeListMatchingPlugInOrigin
static void addPlugInsFromNodeListMatchingPlugInOrigin(HTMLPlugInImageElementList& plugInList, PassRefPtr<NodeList> collection, const String& plugInOrigin, const String& mimeType)
{
for (unsigned i = 0, length = collection->length(); i < length; i++) {
Node* node = collection->item(i);
if (node->isPluginElement()) {
HTMLPlugInElement* plugInElement = toHTMLPlugInElement(node);
if (plugInElement->isPlugInImageElement() && plugInElement->displayState() <= HTMLPlugInElement::DisplayingSnapshot) {
HTMLPlugInImageElement* plugInImageElement = toHTMLPlugInImageElement(node);
const KURL& loadedURL = plugInImageElement->loadedUrl();
String otherMimeType = plugInImageElement->loadedMimeType();
if (plugInOrigin == loadedURL.host() && mimeType == otherMimeType)
plugInList.append(plugInImageElement);
}
}
}
}
示例3: paintContents
void RenderEmbeddedObject::paintContents(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
if (!element() || !element()->isPluginElement())
return;
HTMLPlugInElement* plugInElement = toHTMLPlugInElement(element());
if (plugInElement->displayState() > HTMLPlugInElement::DisplayingSnapshot) {
RenderPart::paintContents(paintInfo, paintOffset);
if (!plugInElement->isRestartedPlugin())
return;
}
if (!plugInElement->isPlugInImageElement())
return;
Image* snapshot = toHTMLPlugInImageElement(plugInElement)->snapshotImage();
if (snapshot)
paintSnapshotImage(paintInfo, paintOffset, snapshot);
}