本文整理汇总了C++中LayoutView::frameView方法的典型用法代码示例。如果您正苦于以下问题:C++ LayoutView::frameView方法的具体用法?C++ LayoutView::frameView怎么用?C++ LayoutView::frameView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayoutView
的用法示例。
在下文中一共展示了LayoutView::frameView方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: applyClipRects
static void applyClipRects(const ClipRectsContext& context, const LayoutObject& layoutObject, LayoutPoint offset, ClipRects& clipRects)
{
ASSERT(layoutObject.hasOverflowClip() || layoutObject.hasClip() || layoutObject.style()->containsPaint());
LayoutView* view = layoutObject.view();
ASSERT(view);
if (clipRects.fixed() && context.rootLayer->layoutObject() == view)
offset -= toIntSize(view->frameView()->scrollPosition());
if (layoutObject.hasOverflowClip() || layoutObject.style()->containsPaint()) {
ClipRect newOverflowClip = toLayoutBox(layoutObject).overflowClipRect(offset, context.scrollbarRelevancy);
newOverflowClip.setHasRadius(layoutObject.style()->hasBorderRadius());
clipRects.setOverflowClipRect(intersection(newOverflowClip, clipRects.overflowClipRect()));
if (layoutObject.isPositioned())
clipRects.setPosClipRect(intersection(newOverflowClip, clipRects.posClipRect()));
if (layoutObject.isLayoutView())
clipRects.setFixedClipRect(intersection(newOverflowClip, clipRects.fixedClipRect()));
if (layoutObject.style()->containsPaint()) {
clipRects.setPosClipRect(intersection(newOverflowClip, clipRects.posClipRect()));
clipRects.setFixedClipRect(intersection(newOverflowClip, clipRects.fixedClipRect()));
}
}
if (layoutObject.hasClip()) {
LayoutRect newClip = toLayoutBox(layoutObject).clipRect(offset);
clipRects.setPosClipRect(intersection(newClip, clipRects.posClipRect()).setIsClippedByClipCss());
clipRects.setOverflowClipRect(intersection(newClip, clipRects.overflowClipRect()).setIsClippedByClipCss());
clipRects.setFixedClipRect(intersection(newClip, clipRects.fixedClipRect()).setIsClippedByClipCss());
}
}
示例2: backgroundClipRect
ClipRect PaintLayerClipper::backgroundClipRect(
const ClipRectsContext& context) const {
if (m_geometryMapper) {
ClipRect backgroundClipRect = clipRectWithGeometryMapper(context, false);
#ifdef CHECK_CLIP_RECTS
ClipRect testBackgroundClipRect =
PaintLayerClipper(m_layer, false).backgroundClipRect(context);
CHECK_RECTS_EQ(testBackgroundClipRect, backgroundClipRect);
#endif
return backgroundClipRect;
}
DCHECK(m_layer.parent());
LayoutView* layoutView = m_layer.layoutObject()->view();
DCHECK(layoutView);
RefPtr<ClipRects> parentClipRects = ClipRects::create();
if (&m_layer == context.rootLayer)
parentClipRects->reset(LayoutRect(LayoutRect::infiniteIntRect()));
else
m_layer.parent()->clipper().getOrCalculateClipRects(context,
*parentClipRects);
ClipRect result = backgroundClipRectForPosition(
*parentClipRects, m_layer.layoutObject()->styleRef().position());
// Note: infinite clipRects should not be scrolled here, otherwise they will
// accidentally no longer be considered infinite.
if (parentClipRects->fixed() &&
context.rootLayer->layoutObject() == layoutView &&
result != LayoutRect(LayoutRect::infiniteIntRect()))
result.move(LayoutSize(layoutView->frameView()->scrollOffset()));
return result;
}
示例3: updateAcceleratedCompositingSettings
PaintLayerCompositor::PaintLayerCompositor(LayoutView& layoutView)
: m_layoutView(layoutView)
, m_compositingReasonFinder(layoutView)
, m_pendingUpdateType(CompositingUpdateNone)
, m_hasAcceleratedCompositing(true)
, m_compositing(false)
, m_rootShouldAlwaysCompositeDirty(true)
, m_needsUpdateFixedBackground(false)
, m_isTrackingPaintInvalidations(layoutView.frameView()->isTrackingPaintInvalidations())
, m_inOverlayFullscreenVideo(false)
, m_needsUpdateDescendantDependentFlags(false)
, m_rootLayerAttachment(RootLayerUnattached)
{
updateAcceleratedCompositingSettings();
}
示例4: applyClipRects
static void applyClipRects(const ClipRectsContext& context,
const LayoutBoxModelObject& layoutObject,
LayoutPoint offset,
ClipRects& clipRects) {
DCHECK(layoutObject.hasClipRelatedProperty() ||
(layoutObject.isSVGRoot() &&
toLayoutSVGRoot(&layoutObject)->shouldApplyViewportClip()));
LayoutView* view = layoutObject.view();
DCHECK(view);
if (clipRects.fixed() && context.rootLayer->layoutObject() == view)
offset -= LayoutSize(view->frameView()->scrollOffset());
if (layoutObject.hasOverflowClip() ||
(layoutObject.isSVGRoot() &&
toLayoutSVGRoot(&layoutObject)->shouldApplyViewportClip()) ||
(layoutObject.styleRef().containsPaint() && layoutObject.isBox())) {
ClipRect newOverflowClip =
toLayoutBox(layoutObject)
.overflowClipRect(offset, context.overlayScrollbarClipBehavior);
newOverflowClip.setHasRadius(layoutObject.styleRef().hasBorderRadius());
clipRects.setOverflowClipRect(
intersection(newOverflowClip, clipRects.overflowClipRect()));
if (layoutObject.isPositioned())
clipRects.setPosClipRect(
intersection(newOverflowClip, clipRects.posClipRect()));
if (layoutObject.isLayoutView())
clipRects.setFixedClipRect(
intersection(newOverflowClip, clipRects.fixedClipRect()));
if (layoutObject.styleRef().containsPaint()) {
clipRects.setPosClipRect(
intersection(newOverflowClip, clipRects.posClipRect()));
clipRects.setFixedClipRect(
intersection(newOverflowClip, clipRects.fixedClipRect()));
}
}
if (layoutObject.hasClip()) {
LayoutRect newClip = toLayoutBox(layoutObject).clipRect(offset);
clipRects.setPosClipRect(
intersection(newClip, clipRects.posClipRect()).setIsClippedByClipCss());
clipRects.setOverflowClipRect(
intersection(newClip, clipRects.overflowClipRect())
.setIsClippedByClipCss());
clipRects.setFixedClipRect(intersection(newClip, clipRects.fixedClipRect())
.setIsClippedByClipCss());
}
}