本文整理汇总了C++中RenderEmbeddedObject::horizontalBorderAndPaddingExtent方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderEmbeddedObject::horizontalBorderAndPaddingExtent方法的具体用法?C++ RenderEmbeddedObject::horizontalBorderAndPaddingExtent怎么用?C++ RenderEmbeddedObject::horizontalBorderAndPaddingExtent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderEmbeddedObject
的用法示例。
在下文中一共展示了RenderEmbeddedObject::horizontalBorderAndPaddingExtent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateWidget
void HTMLAppletElement::updateWidget(PluginCreationOption pluginCreationOption)
{
setNeedsWidgetUpdate(false);
// FIXME: This should ASSERT isFinishedParsingChildren() instead.
if (!isFinishedParsingChildren())
return;
#if PLATFORM(IOS)
UNUSED_PARAM(pluginCreationOption);
#else
// FIXME: It's sadness that we have this special case here.
// See http://trac.webkit.org/changeset/25128 and
// plugins/netscape-plugin-setwindow-size.html
if (pluginCreationOption == CreateOnlyNonNetscapePlugins) {
// Ensure updateWidget() is called again during layout to create the Netscape plug-in.
setNeedsWidgetUpdate(true);
return;
}
RenderEmbeddedObject* renderer = renderEmbeddedObject();
LayoutUnit contentWidth = renderer->style().width().isFixed() ? LayoutUnit(renderer->style().width().value()) :
renderer->width() - renderer->horizontalBorderAndPaddingExtent();
LayoutUnit contentHeight = renderer->style().height().isFixed() ? LayoutUnit(renderer->style().height().value()) :
renderer->height() - renderer->verticalBorderAndPaddingExtent();
Vector<String> paramNames;
Vector<String> paramValues;
paramNames.append("code");
paramValues.append(fastGetAttribute(codeAttr).string());
const AtomicString& codeBase = fastGetAttribute(codebaseAttr);
if (!codeBase.isNull()) {
paramNames.append(ASCIILiteral("codeBase"));
paramValues.append(codeBase.string());
}
const AtomicString& name = document().isHTMLDocument() ? getNameAttribute() : getIdAttribute();
if (!name.isNull()) {
paramNames.append("name");
paramValues.append(name.string());
}
const AtomicString& archive = fastGetAttribute(archiveAttr);
if (!archive.isNull()) {
paramNames.append(ASCIILiteral("archive"));
paramValues.append(archive.string());
}
paramNames.append(ASCIILiteral("baseURL"));
paramValues.append(document().baseURL().string());
const AtomicString& mayScript = fastGetAttribute(mayscriptAttr);
if (!mayScript.isNull()) {
paramNames.append(ASCIILiteral("mayScript"));
paramValues.append(mayScript.string());
}
for (auto& param : childrenOfType<HTMLParamElement>(*this)) {
if (param.name().isEmpty())
continue;
paramNames.append(param.name());
paramValues.append(param.value());
}
Frame* frame = document().frame();
ASSERT(frame);
renderer->setWidget(frame->loader().subframeLoader().createJavaAppletWidget(roundedIntSize(LayoutSize(contentWidth, contentHeight)), *this, paramNames, paramValues));
#endif // !PLATFORM(IOS)
}