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

Unified Diff: Source/core/rendering/PaintInvalidationState.cpp

Issue 550363003: Remove unused PaintInvalidationState::renderer() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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/rendering/PaintInvalidationState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/PaintInvalidationState.cpp
diff --git a/Source/core/rendering/PaintInvalidationState.cpp b/Source/core/rendering/PaintInvalidationState.cpp
index c5287961dc82d802a75f15b8ae830c2023f9a918..0cf83570ef9f92bcf6a1a5b3037c203eac431d87 100644
--- a/Source/core/rendering/PaintInvalidationState.cpp
+++ b/Source/core/rendering/PaintInvalidationState.cpp
@@ -18,9 +18,8 @@ PaintInvalidationState::PaintInvalidationState(const RenderView& renderView)
, m_cachedOffsetsEnabled(true)
, m_forceCheckForPaintInvalidation(false)
, m_paintInvalidationContainer(*renderView.containerForPaintInvalidation())
- , m_renderer(renderView)
{
- bool establishesPaintInvalidationContainer = &m_renderer == &m_paintInvalidationContainer;
+ bool establishesPaintInvalidationContainer = renderView == m_paintInvalidationContainer;
if (!establishesPaintInvalidationContainer) {
if (!renderView.supportsPaintInvalidationStateCachedOffsets()) {
m_cachedOffsetsEnabled = false;
@@ -39,11 +38,10 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex
, m_cachedOffsetsEnabled(true)
, m_forceCheckForPaintInvalidation(next.m_forceCheckForPaintInvalidation)
, m_paintInvalidationContainer(paintInvalidationContainer)
- , m_renderer(renderer)
{
// FIXME: SVG could probably benefit from a stack-based optimization like html does. crbug.com/391054
- bool establishesPaintInvalidationContainer = &m_renderer == &m_paintInvalidationContainer;
- bool fixed = m_renderer.style()->position() == FixedPosition;
+ bool establishesPaintInvalidationContainer = renderer == m_paintInvalidationContainer;
+ bool fixed = renderer.style()->position() == FixedPosition;
if (establishesPaintInvalidationContainer) {
// When we hit a new paint invalidation container, we don't need to
@@ -55,21 +53,21 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex
m_cachedOffsetsEnabled = false;
} else {
if (fixed) {
- FloatPoint fixedOffset = m_renderer.localToContainerPoint(FloatPoint(), &m_paintInvalidationContainer, TraverseDocumentBoundaries);
+ FloatPoint fixedOffset = renderer.localToContainerPoint(FloatPoint(), &m_paintInvalidationContainer, TraverseDocumentBoundaries);
m_paintOffset = LayoutSize(fixedOffset.x(), fixedOffset.y());
} else {
- LayoutSize offset = m_renderer.isBox() && !m_renderer.isTableRow() ? toRenderBox(renderer).locationOffset() : LayoutSize();
+ LayoutSize offset = renderer.isBox() && !renderer.isTableRow() ? toRenderBox(renderer).locationOffset() : LayoutSize();
m_paintOffset = next.m_paintOffset + offset;
}
- if (m_renderer.isOutOfFlowPositioned() && !fixed) {
- if (RenderObject* container = m_renderer.container()) {
+ if (renderer.isOutOfFlowPositioned() && !fixed) {
+ if (RenderObject* container = renderer.container()) {
if (container->style()->hasInFlowPosition() && container->isRenderInline())
m_paintOffset += toRenderInline(container)->offsetForInFlowPositionedInline(toRenderBox(renderer));
}
}
- if (m_renderer.style()->hasInFlowPosition() && renderer.hasLayer())
+ if (renderer.style()->hasInFlowPosition() && renderer.hasLayer())
m_paintOffset += renderer.layer()->offsetForInFlowPosition();
}
« no previous file with comments | « Source/core/rendering/PaintInvalidationState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698