Remove unused PaintInvalidationState::renderer()

This might be left from historical versions. Remove.

Review URL: https://codereview.chromium.org/550363003

git-svn-id: svn://svn.chromium.org/blink/trunk@181580 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f1641557
...@@ -18,9 +18,8 @@ PaintInvalidationState::PaintInvalidationState(const RenderView& renderView) ...@@ -18,9 +18,8 @@ PaintInvalidationState::PaintInvalidationState(const RenderView& renderView)
, m_cachedOffsetsEnabled(true) , m_cachedOffsetsEnabled(true)
, m_forceCheckForPaintInvalidation(false) , m_forceCheckForPaintInvalidation(false)
, m_paintInvalidationContainer(*renderView.containerForPaintInvalidation()) , m_paintInvalidationContainer(*renderView.containerForPaintInvalidation())
, m_renderer(renderView)
{ {
bool establishesPaintInvalidationContainer = &m_renderer == &m_paintInvalidationContainer; bool establishesPaintInvalidationContainer = renderView == m_paintInvalidationContainer;
if (!establishesPaintInvalidationContainer) { if (!establishesPaintInvalidationContainer) {
if (!renderView.supportsPaintInvalidationStateCachedOffsets()) { if (!renderView.supportsPaintInvalidationStateCachedOffsets()) {
m_cachedOffsetsEnabled = false; m_cachedOffsetsEnabled = false;
...@@ -39,11 +38,10 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex ...@@ -39,11 +38,10 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex
, m_cachedOffsetsEnabled(true) , m_cachedOffsetsEnabled(true)
, m_forceCheckForPaintInvalidation(next.m_forceCheckForPaintInvalidation) , m_forceCheckForPaintInvalidation(next.m_forceCheckForPaintInvalidation)
, m_paintInvalidationContainer(paintInvalidationContainer) , m_paintInvalidationContainer(paintInvalidationContainer)
, m_renderer(renderer)
{ {
// FIXME: SVG could probably benefit from a stack-based optimization like html does. crbug.com/391054 // FIXME: SVG could probably benefit from a stack-based optimization like html does. crbug.com/391054
bool establishesPaintInvalidationContainer = &m_renderer == &m_paintInvalidationContainer; bool establishesPaintInvalidationContainer = renderer == m_paintInvalidationContainer;
bool fixed = m_renderer.style()->position() == FixedPosition; bool fixed = renderer.style()->position() == FixedPosition;
if (establishesPaintInvalidationContainer) { if (establishesPaintInvalidationContainer) {
// When we hit a new paint invalidation container, we don't need to // When we hit a new paint invalidation container, we don't need to
...@@ -55,21 +53,21 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex ...@@ -55,21 +53,21 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex
m_cachedOffsetsEnabled = false; m_cachedOffsetsEnabled = false;
} else { } else {
if (fixed) { 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()); m_paintOffset = LayoutSize(fixedOffset.x(), fixedOffset.y());
} else { } 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; m_paintOffset = next.m_paintOffset + offset;
} }
if (m_renderer.isOutOfFlowPositioned() && !fixed) { if (renderer.isOutOfFlowPositioned() && !fixed) {
if (RenderObject* container = m_renderer.container()) { if (RenderObject* container = renderer.container()) {
if (container->style()->hasInFlowPosition() && container->isRenderInline()) if (container->style()->hasInFlowPosition() && container->isRenderInline())
m_paintOffset += toRenderInline(container)->offsetForInFlowPositionedInline(toRenderBox(renderer)); 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(); m_paintOffset += renderer.layer()->offsetForInFlowPosition();
} }
......
...@@ -34,7 +34,6 @@ public: ...@@ -34,7 +34,6 @@ public:
void setForceCheckForPaintInvalidation() { m_forceCheckForPaintInvalidation = true; } void setForceCheckForPaintInvalidation() { m_forceCheckForPaintInvalidation = true; }
const RenderLayerModelObject& paintInvalidationContainer() const { return m_paintInvalidationContainer; } const RenderLayerModelObject& paintInvalidationContainer() const { return m_paintInvalidationContainer; }
const RenderObject& renderer() const { return m_renderer; }
bool canMapToContainer(const RenderLayerModelObject* container) const bool canMapToContainer(const RenderLayerModelObject* container) const
{ {
...@@ -55,8 +54,6 @@ private: ...@@ -55,8 +54,6 @@ private:
LayoutSize m_paintOffset; LayoutSize m_paintOffset;
const RenderLayerModelObject& m_paintInvalidationContainer; const RenderLayerModelObject& m_paintInvalidationContainer;
const RenderObject& m_renderer;
}; };
} // namespace blink } // namespace blink
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment