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

Side by Side Diff: Source/core/layout/PaintInvalidationState.cpp

Issue 945803004: Merge back LayoutLayerModelObject into RenderBoxModelObject (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/layout/PaintInvalidationState.h" 6 #include "core/layout/PaintInvalidationState.h"
7 7
8 #include "core/layout/Layer.h" 8 #include "core/layout/Layer.h"
9 #include "core/layout/svg/LayoutSVGModelObject.h" 9 #include "core/layout/svg/LayoutSVGModelObject.h"
10 #include "core/layout/svg/LayoutSVGRoot.h" 10 #include "core/layout/svg/LayoutSVGRoot.h"
(...skipping 16 matching lines...) Expand all
27 return; 27 return;
28 } 28 }
29 FloatPoint point = renderView.localToContainerPoint(FloatPoint(), &m_pai ntInvalidationContainer, TraverseDocumentBoundaries); 29 FloatPoint point = renderView.localToContainerPoint(FloatPoint(), &m_pai ntInvalidationContainer, TraverseDocumentBoundaries);
30 m_paintOffset = LayoutSize(point.x(), point.y()); 30 m_paintOffset = LayoutSize(point.x(), point.y());
31 } 31 }
32 m_clipRect = renderView.viewRect(); 32 m_clipRect = renderView.viewRect();
33 m_clipRect.move(m_paintOffset); 33 m_clipRect.move(m_paintOffset);
34 m_clipped = true; 34 m_clipped = true;
35 } 35 }
36 36
37 PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex t, LayoutLayerModelObject& renderer, const LayoutLayerModelObject& paintInvalida tionContainer) 37 PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex t, RenderBoxModelObject& renderer, const RenderBoxModelObject& paintInvalidation Container)
38 : m_clipped(false) 38 : m_clipped(false)
39 , m_cachedOffsetsEnabled(true) 39 , m_cachedOffsetsEnabled(true)
40 , m_forceCheckForPaintInvalidation(next.m_forceCheckForPaintInvalidation) 40 , m_forceCheckForPaintInvalidation(next.m_forceCheckForPaintInvalidation)
41 , m_paintInvalidationContainer(paintInvalidationContainer) 41 , m_paintInvalidationContainer(paintInvalidationContainer)
42 { 42 {
43 // FIXME: SVG could probably benefit from a stack-based optimization like ht ml does. crbug.com/391054 43 // FIXME: SVG could probably benefit from a stack-based optimization like ht ml does. crbug.com/391054
44 bool establishesPaintInvalidationContainer = renderer == m_paintInvalidation Container; 44 bool establishesPaintInvalidationContainer = renderer == m_paintInvalidation Container;
45 bool fixed = renderer.style()->position() == FixedPosition; 45 bool fixed = renderer.style()->position() == FixedPosition;
46 46
47 if (!renderer.supportsPaintInvalidationStateCachedOffsets() || !next.m_cache dOffsetsEnabled) 47 if (!renderer.supportsPaintInvalidationStateCachedOffsets() || !next.m_cache dOffsetsEnabled)
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // to be always invalidated in-time. 125 // to be always invalidated in-time.
126 if (box.usesCompositedScrolling()) 126 if (box.usesCompositedScrolling())
127 ASSERT(!m_clipped); // The box should establish paint invalidation conta iner, so no m_clipped inherited. 127 ASSERT(!m_clipped); // The box should establish paint invalidation conta iner, so no m_clipped inherited.
128 else 128 else
129 addClipRectRelativeToPaintOffset(LayoutSize(box.layer()->size())); 129 addClipRectRelativeToPaintOffset(LayoutSize(box.layer()->size()));
130 130
131 m_paintOffset -= box.scrolledContentOffset(); 131 m_paintOffset -= box.scrolledContentOffset();
132 } 132 }
133 133
134 } // namespace blink 134 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698