| Index: Source/core/layout/ClipRectsCache.h
|
| diff --git a/Source/core/layout/ClipRectsCache.h b/Source/core/layout/ClipRectsCache.h
|
| index 9415dbc1107daba338f81557f63e5f1772db5c26..a3a6089d20e49ce69a7e9f271aab5fc37e52bb80 100644
|
| --- a/Source/core/layout/ClipRectsCache.h
|
| +++ b/Source/core/layout/ClipRectsCache.h
|
| @@ -15,14 +15,12 @@ namespace blink {
|
|
|
| class DeprecatedPaintLayer;
|
|
|
| -// TODO: Because this is mostly empty, this should be moved to a better place
|
| enum ClipRectsCacheSlot {
|
| // Relative to the ancestor treated as the root (e.g. transformed layer). Used for hit testing.
|
| RootRelativeClipRects,
|
| RootRelativeClipRectsIgnoringViewportClip,
|
|
|
| // Relative to the LayoutView's layer. Used for compositing overlap testing.
|
| - // Computed during the compositing update step (see CompositingInputsUpdater::update).
|
| AbsoluteClipRects,
|
|
|
| // Relative to painting ancestor. Used for painting.
|
| @@ -33,6 +31,37 @@ enum ClipRectsCacheSlot {
|
| UncachedClipRects,
|
| };
|
|
|
| +class ClipRectsCache {
|
| + WTF_MAKE_FAST_ALLOCATED(ClipRectsCache);
|
| +public:
|
| + struct Entry {
|
| + Entry()
|
| + : root(nullptr)
|
| +#if ENABLE(ASSERT)
|
| + , scrollbarRelevancy(IgnoreOverlayScrollbarSize)
|
| +#endif
|
| + {
|
| + }
|
| + const DeprecatedPaintLayer* root;
|
| + RefPtr<ClipRects> clipRects;
|
| +#if ENABLE(ASSERT)
|
| + OverlayScrollbarSizeRelevancy scrollbarRelevancy;
|
| +#endif
|
| + };
|
| + Entry& get(ClipRectsCacheSlot slot)
|
| + {
|
| + ASSERT(slot < NumberOfClipRectsCacheSlots);
|
| + return m_entries[slot];
|
| + }
|
| + void clear(ClipRectsCacheSlot slot)
|
| + {
|
| + ASSERT(slot < NumberOfClipRectsCacheSlots);
|
| + m_entries[slot] = Entry();
|
| + }
|
| +private:
|
| + Entry m_entries[NumberOfClipRectsCacheSlots];
|
| +};
|
| +
|
| } // namespace blink
|
|
|
| #endif // ClipRectsCache_h
|
|
|