Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Unified Diff: Source/core/layout/LayerClipper.cpp

Issue 952273006: Make the constructor of a LayoutRect from an IntRect explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/layout/Layer.cpp ('k') | Source/core/layout/LayerScrollableArea.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayerClipper.cpp
diff --git a/Source/core/layout/LayerClipper.cpp b/Source/core/layout/LayerClipper.cpp
index 6983b8c7f233c0dfad6fecdf2aab336d814f6645..ab9c9a251f849c2d18d8d2b2c65f0509979ed4b5 100644
--- a/Source/core/layout/LayerClipper.cpp
+++ b/Source/core/layout/LayerClipper.cpp
@@ -184,8 +184,8 @@ LayoutRect LayerClipper::childrenClipRect() const
ClipRect backgroundRect, foregroundRect, outlineRect;
// Need to use uncached clip rects, because the value of 'dontClipToOverflow' may be different from the painting path (<rdar://problem/11844909>).
ClipRectsContext context(clippingRootLayer, UncachedClipRects);
- calculateRects(context, m_renderer.view()->unscaledDocumentRect(), layerBounds, backgroundRect, foregroundRect, outlineRect);
- return clippingRootLayer->renderer()->localToAbsoluteQuad(FloatQuad(foregroundRect.rect())).enclosingBoundingBox();
+ calculateRects(context, LayoutRect(m_renderer.view()->unscaledDocumentRect()), layerBounds, backgroundRect, foregroundRect, outlineRect);
+ return LayoutRect(clippingRootLayer->renderer()->localToAbsoluteQuad(FloatQuad(foregroundRect.rect())).enclosingBoundingBox());
}
LayoutRect LayerClipper::localClipRect() const
@@ -195,7 +195,7 @@ LayoutRect LayerClipper::localClipRect() const
LayoutRect layerBounds;
ClipRect backgroundRect, foregroundRect, outlineRect;
ClipRectsContext context(clippingRootLayer, PaintingClipRects);
- calculateRects(context, LayoutRect::infiniteIntRect(), layerBounds, backgroundRect, foregroundRect, outlineRect);
+ calculateRects(context, LayoutRect(LayoutRect::infiniteIntRect()), layerBounds, backgroundRect, foregroundRect, outlineRect);
LayoutRect clipRect = backgroundRect.rect();
if (clipRect == LayoutRect::infiniteIntRect())
@@ -276,7 +276,7 @@ void LayerClipper::calculateClipRects(const ClipRectsContext& context, ClipRects
bool rootLayerScrolls = m_renderer.document().settings() && m_renderer.document().settings()->rootLayerScrolls();
if (!m_renderer.layer()->parent() && !rootLayerScrolls) {
// The root layer's clip rect is always infinite.
- clipRects.reset(LayoutRect::infiniteIntRect());
+ clipRects.reset(LayoutRect(LayoutRect::infiniteIntRect()));
return;
}
@@ -295,7 +295,7 @@ void LayerClipper::calculateClipRects(const ClipRectsContext& context, ClipRects
parentLayer->clipper().calculateClipRects(context, clipRects);
}
} else {
- clipRects.reset(LayoutRect::infiniteIntRect());
+ clipRects.reset(LayoutRect(LayoutRect::infiniteIntRect()));
}
adjustClipRectsForChildren(m_renderer, clipRects);
@@ -326,14 +326,14 @@ ClipRect LayerClipper::backgroundClipRect(const ClipRectsContext& context) const
RefPtr<ClipRects> parentClipRects = ClipRects::create();
if (m_renderer.layer() == context.rootLayer)
- parentClipRects->reset(LayoutRect::infiniteIntRect());
+ parentClipRects->reset(LayoutRect(LayoutRect::infiniteIntRect()));
else
m_renderer.layer()->parent()->clipper().getOrCalculateClipRects(context, *parentClipRects);
ClipRect result = backgroundClipRectForPosition(*parentClipRects, m_renderer.style()->position());
// Note: infinite clipRects should not be scrolled here, otherwise they will accidentally no longer be considered infinite.
- if (parentClipRects->fixed() && context.rootLayer->renderer() == m_renderer.view() && result != LayoutRect::infiniteIntRect())
+ if (parentClipRects->fixed() && context.rootLayer->renderer() == m_renderer.view() && result != LayoutRect(LayoutRect::infiniteIntRect()))
result.move(m_renderer.view()->frameView()->scrollOffsetForViewportConstrainedObjects());
return result;
« no previous file with comments | « Source/core/layout/Layer.cpp ('k') | Source/core/layout/LayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698