本文整理汇总了C++中RenderBoxModelObject::borderAndPaddingLogicalHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderBoxModelObject::borderAndPaddingLogicalHeight方法的具体用法?C++ RenderBoxModelObject::borderAndPaddingLogicalHeight怎么用?C++ RenderBoxModelObject::borderAndPaddingLogicalHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderBoxModelObject
的用法示例。
在下文中一共展示了RenderBoxModelObject::borderAndPaddingLogicalHeight方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: logicalHeight
int InlineBox::logicalHeight() const
{
//SISO_HTMLComposer Start
int result = 0;
int lineHeightAdjust = root()->isLineHeightAdjust()? root()->lineHeightAdjustValue() : 0;
//SISO_HTMLComposer End
#if ENABLE(SVG)
if (hasVirtualLogicalHeight())
return virtualLogicalHeight();
#endif
//SISO_HTMLComposer Start
if (renderer()->isText()) {
result = m_isText ? renderer()->style(m_firstLine)->fontMetrics().height() : 0;
result += lineHeightAdjust;
return result;
}
if (renderer()->isBox() && parent()) {
result = isHorizontal() ? toRenderBox(m_renderer)->height() : toRenderBox(m_renderer)->width();
result += lineHeightAdjust;
return result;
}
//SISO_HTMLComposer End
ASSERT(isInlineFlowBox());
RenderBoxModelObject* flowObject = boxModelObject();
const FontMetrics& fontMetrics = renderer()->style(m_firstLine)->fontMetrics();
result = fontMetrics.height();
if (parent())
result += flowObject->borderAndPaddingLogicalHeight();
//SISO_HTMLComposer Start
result += lineHeightAdjust;
//SISO_HTMLComposer End
return result;
}
示例2: logicalHeight
float InlineBox::logicalHeight() const
{
if (hasVirtualLogicalHeight())
return virtualLogicalHeight();
if (renderer()->isText())
return m_bitfields.isText() ? renderer()->style(isFirstLineStyle())->fontMetrics().height() : 0;
if (renderer()->isBox() && parent())
return isHorizontal() ? toRenderBox(m_renderer)->height() : toRenderBox(m_renderer)->width();
ASSERT(isInlineFlowBox());
RenderBoxModelObject* flowObject = boxModelObject();
const FontMetrics& fontMetrics = renderer()->style(isFirstLineStyle())->fontMetrics();
float result = fontMetrics.height();
if (parent())
result += flowObject->borderAndPaddingLogicalHeight();
return result;
}
示例3: logicalHeight
float InlineBox::logicalHeight() const
{
if (hasVirtualLogicalHeight())
return virtualLogicalHeight();
const RenderStyle& lineStyle = this->lineStyle();
if (renderer().isTextOrLineBreak())
return behavesLikeText() ? lineStyle.fontMetrics().height() : 0;
if (renderer().isBox() && parent())
return isHorizontal() ? toRenderBox(renderer()).height() : toRenderBox(renderer()).width();
ASSERT(isInlineFlowBox());
RenderBoxModelObject* flowObject = boxModelObject();
const FontMetrics& fontMetrics = lineStyle.fontMetrics();
float result = fontMetrics.height();
if (parent())
result += flowObject->borderAndPaddingLogicalHeight();
return result;
}
示例4: logicalHeight
int InlineBox::logicalHeight() const
{
#if ENABLE(SVG)
if (hasVirtualLogicalHeight())
return virtualLogicalHeight();
#endif
if (renderer()->isText())
return m_isText ? renderer()->style(m_firstLine)->fontMetrics().height() : 0;
if (renderer()->isBox() && parent())
return isHorizontal() ? toRenderBox(m_renderer)->height() : toRenderBox(m_renderer)->width();
ASSERT(isInlineFlowBox());
RenderBoxModelObject* flowObject = boxModelObject();
const FontMetrics& fontMetrics = renderer()->style(m_firstLine)->fontMetrics();
int result = fontMetrics.height();
if (parent())
result += flowObject->borderAndPaddingLogicalHeight();
return result;
}