本文整理汇总了C++中HitTestRequest::ignoreClipping方法的典型用法代码示例。如果您正苦于以下问题:C++ HitTestRequest::ignoreClipping方法的具体用法?C++ HitTestRequest::ignoreClipping怎么用?C++ HitTestRequest::ignoreClipping使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HitTestRequest
的用法示例。
在下文中一共展示了HitTestRequest::ignoreClipping方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hitTest
bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& location, HitTestResult& result)
{
TRACE_EVENT0("blink", "RenderView::hitTest");
m_hitTestCount++;
if (!m_frameView->visibleContentRect().contains(location.roundedPoint()))
return false;
// We have to recursively update layout/style here because otherwise, when the hit test recurses
// into a child document, it could trigger a layout on the parent document, which can destroy RenderLayers
// that are higher up in the call stack, leading to crashes.
// Note that Document::updateLayout calls its parent's updateLayout.
// FIXME: It should be the caller's responsibility to ensure an up-to-date layout.
frameView()->updateLayoutAndStyleIfNeededRecursive();
// RenderView should make sure to update layout before entering hit testing
ASSERT(!frame()->view()->layoutPending());
ASSERT(!document().renderView()->needsLayout());
// TODO(ojan): Does any of this intersection stuff make sense for Sky?
LayoutRect hitTestArea = view()->documentRect();
if (!request.ignoreClipping())
hitTestArea.intersect(frame()->view()->visibleContentRect());
bool insideLayer = hitTestLayer(layer(), 0, request, result, hitTestArea, location);
if (!insideLayer) {
// TODO(ojan): Is this code needed for Sky?
// We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down,
// return ourselves. We do this so mouse events continue getting delivered after a drag has
// exited the WebView, and so hit testing over a scrollbar hits the content document.
if (request.active() || request.release()) {
updateHitTestResult(result, location.point());
insideLayer = true;
}
}
return insideLayer;
}