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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.h

Issue 1804963005: Avoid paintInvalidationContainer parameter of invalidatePaintIfNeeded() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/core/layout/LayoutView.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.h b/third_party/WebKit/Source/core/layout/LayoutView.h
index 256cc0076ce324b52a2f453c8965d04bbd69e685..af4a7dd9b99b4f8dfaab14be0bd7e3ee81759754 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.h
+++ b/third_party/WebKit/Source/core/layout/LayoutView.h
@@ -188,7 +188,7 @@ public:
void pushLayoutState(LayoutState& layoutState) { m_layoutState = &layoutState; }
void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState->next(); }
- void invalidateTreeIfNeeded(PaintInvalidationState&) final;
+ void invalidateTreeIfNeeded(const PaintInvalidationState&) final;
LayoutRect visualOverflowRect() const override;
@@ -285,32 +285,6 @@ private:
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView());
-// Suspends the PaintInvalidationState cached offset and clipRect optimization. Used under transforms
-// that cannot be represented by PaintInvalidationState (common in SVG) and when paint invalidation
-// containers don't follow the common tree-walk algorithm (e.g. when an absolute positioned descendant
-// is nested under a relatively positioned inline-block child).
-class ForceHorriblySlowRectMapping {
- STACK_ALLOCATED();
- WTF_MAKE_NONCOPYABLE(ForceHorriblySlowRectMapping);
-public:
- ForceHorriblySlowRectMapping(const PaintInvalidationState* paintInvalidationState)
- : m_paintInvalidationState(paintInvalidationState)
- , m_didDisable(m_paintInvalidationState && m_paintInvalidationState->cachedOffsetsEnabled())
- {
- if (m_paintInvalidationState)
- m_paintInvalidationState->m_cachedOffsetsEnabled = false;
- }
-
- ~ForceHorriblySlowRectMapping()
- {
- if (m_didDisable)
- m_paintInvalidationState->m_cachedOffsetsEnabled = true;
- }
-private:
- const PaintInvalidationState* m_paintInvalidationState;
- bool m_didDisable;
-};
-
} // namespace blink
#endif // LayoutView_h
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698