本文整理汇总了C++中RenderBoxModelObject::borderBoundingBox方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderBoxModelObject::borderBoundingBox方法的具体用法?C++ RenderBoxModelObject::borderBoundingBox怎么用?C++ RenderBoxModelObject::borderBoundingBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderBoxModelObject
的用法示例。
在下文中一共展示了RenderBoxModelObject::borderBoundingBox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isKeyboardFocusable
bool HTMLAnchorElement::isKeyboardFocusable(KeyboardEvent* event) const
{
if (!isLink())
return HTMLElement::isKeyboardFocusable(event);
if (!isFocusable())
return false;
if (!document()->frame())
return false;
if (!document()->frame()->eventHandler()->tabsToLinks(event))
return false;
if (!renderer() || !renderer()->isBoxModelObject())
return false;
// Before calling absoluteRects, check for the common case where the renderer
// is non-empty, since this is a faster check and almost always returns true.
RenderBoxModelObject* box = toRenderBoxModelObject(renderer());
if (!box->borderBoundingBox().isEmpty())
return true;
Vector<IntRect> rects;
FloatPoint absPos = renderer()->localToAbsolute();
renderer()->absoluteRects(rects, absPos.x(), absPos.y());
size_t n = rects.size();
for (size_t i = 0; i < n; ++i)
if (!rects[i].isEmpty())
return true;
return false;
}