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

Side by Side Diff: Source/core/layout/LayoutView.h

Issue 1185923002: Oilpan: fix build after r197063, move HitTestCache to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add TODO for HitTestResult's trait override Created 5 years, 6 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
« no previous file with comments | « Source/core/layout/HitTestResult.h ('k') | Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 explicit LayoutView(Document*); 51 explicit LayoutView(Document*);
52 virtual ~LayoutView(); 52 virtual ~LayoutView();
53 void willBeDestroyed() override; 53 void willBeDestroyed() override;
54 54
55 bool hitTest(HitTestResult&); 55 bool hitTest(HitTestResult&);
56 56
57 // Returns the total count of calls to HitTest, for testing. 57 // Returns the total count of calls to HitTest, for testing.
58 unsigned hitTestCount() const { return m_hitTestCount; } 58 unsigned hitTestCount() const { return m_hitTestCount; }
59 unsigned hitTestCacheHits() const { return m_hitTestCacheHits; } 59 unsigned hitTestCacheHits() const { return m_hitTestCacheHits; }
60 60
61 void clearHitTestCache() { m_hitTestCache.clear(); } 61 void clearHitTestCache() { m_hitTestCache->clear(); }
62 62
63 virtual const char* name() const override { return "LayoutView"; } 63 virtual const char* name() const override { return "LayoutView"; }
64 64
65 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectLayoutView || LayoutBlockFlow::isOfType(type); } 65 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectLayoutView || LayoutBlockFlow::isOfType(type); }
66 66
67 virtual DeprecatedPaintLayerType layerTypeRequired() const override { return NormalDeprecatedPaintLayer; } 67 virtual DeprecatedPaintLayerType layerTypeRequired() const override { return NormalDeprecatedPaintLayer; }
68 68
69 virtual bool isChildAllowed(LayoutObject*, const ComputedStyle&) const overr ide; 69 virtual bool isChildAllowed(LayoutObject*, const ComputedStyle&) const overr ide;
70 70
71 virtual void layout() override; 71 virtual void layout() override;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 bool m_pageLogicalHeightChanged; 211 bool m_pageLogicalHeightChanged;
212 LayoutState* m_layoutState; 212 LayoutState* m_layoutState;
213 OwnPtr<DeprecatedPaintLayerCompositor> m_compositor; 213 OwnPtr<DeprecatedPaintLayerCompositor> m_compositor;
214 RefPtr<IntervalArena> m_intervalArena; 214 RefPtr<IntervalArena> m_intervalArena;
215 215
216 LayoutQuote* m_layoutQuoteHead; 216 LayoutQuote* m_layoutQuoteHead;
217 unsigned m_layoutCounterCount; 217 unsigned m_layoutCounterCount;
218 218
219 unsigned m_hitTestCount; 219 unsigned m_hitTestCount;
220 unsigned m_hitTestCacheHits; 220 unsigned m_hitTestCacheHits;
221 HitTestCache m_hitTestCache; 221 OwnPtrWillBePersistent<HitTestCache> m_hitTestCache;
222 222
223 OwnPtrWillBePersistent<PendingSelection> m_pendingSelection; 223 OwnPtrWillBePersistent<PendingSelection> m_pendingSelection;
224 }; 224 };
225 225
226 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); 226 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView());
227 227
228 // Suspends the LayoutState cached offset and clipRect optimization. Used under transforms 228 // Suspends the LayoutState cached offset and clipRect optimization. Used under transforms
229 // that cannot be represented by LayoutState (common in SVG) and when manipulati ng the layout 229 // that cannot be represented by LayoutState (common in SVG) and when manipulati ng the layout
230 // tree during layout in ways that can trigger paint invalidation of a non-child (e.g. when a list item 230 // tree during layout in ways that can trigger paint invalidation of a non-child (e.g. when a list item
231 // moves its list marker around). Note that even when disabled, LayoutState is s till used to 231 // moves its list marker around). Note that even when disabled, LayoutState is s till used to
(...skipping 15 matching lines...) Expand all
247 m_paintInvalidationState->m_cachedOffsetsEnabled = true; 247 m_paintInvalidationState->m_cachedOffsetsEnabled = true;
248 } 248 }
249 private: 249 private:
250 const PaintInvalidationState* m_paintInvalidationState; 250 const PaintInvalidationState* m_paintInvalidationState;
251 bool m_didDisable; 251 bool m_didDisable;
252 }; 252 };
253 253
254 } // namespace blink 254 } // namespace blink
255 255
256 #endif // LayoutView_h 256 #endif // LayoutView_h
OLDNEW
« no previous file with comments | « Source/core/layout/HitTestResult.h ('k') | Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698