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

Side by Side Diff: Source/core/rendering/RenderView.h

Issue 354613002: Add test to track the number of hit tests on various events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge with trunk Created 6 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 | Annotate | Revision Log
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 29 matching lines...) Expand all
40 // the visible viewport in fixed-layout mode), and it is always at position (0,0 ) 40 // the visible viewport in fixed-layout mode), and it is always at position (0,0 )
41 // relative to the document (and so isn't necessarily in view). 41 // relative to the document (and so isn't necessarily in view).
42 class RenderView FINAL : public RenderBlockFlow { 42 class RenderView FINAL : public RenderBlockFlow {
43 public: 43 public:
44 explicit RenderView(Document*); 44 explicit RenderView(Document*);
45 virtual ~RenderView(); 45 virtual ~RenderView();
46 46
47 bool hitTest(const HitTestRequest&, HitTestResult&); 47 bool hitTest(const HitTestRequest&, HitTestResult&);
48 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); 48 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&);
49 49
50 // Returns the count of calls to HitTest since this was last called.
51 // Used by tests that catch unnecessary hit-tests.
52 unsigned hitTestCountDelta();
53
50 virtual const char* renderName() const OVERRIDE { return "RenderView"; } 54 virtual const char* renderName() const OVERRIDE { return "RenderView"; }
51 55
52 virtual bool isRenderView() const OVERRIDE { return true; } 56 virtual bool isRenderView() const OVERRIDE { return true; }
53 57
54 virtual LayerType layerTypeRequired() const OVERRIDE { return NormalLayer; } 58 virtual LayerType layerTypeRequired() const OVERRIDE { return NormalLayer; }
55 59
56 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const OVERRIDE; 60 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const OVERRIDE;
57 61
58 virtual void layout() OVERRIDE; 62 virtual void layout() OVERRIDE;
59 virtual void updateLogicalWidth() OVERRIDE; 63 virtual void updateLogicalWidth() OVERRIDE;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 200
197 LayoutUnit m_pageLogicalHeight; 201 LayoutUnit m_pageLogicalHeight;
198 bool m_pageLogicalHeightChanged; 202 bool m_pageLogicalHeightChanged;
199 LayoutState* m_layoutState; 203 LayoutState* m_layoutState;
200 OwnPtr<RenderLayerCompositor> m_compositor; 204 OwnPtr<RenderLayerCompositor> m_compositor;
201 OwnPtr<FlowThreadController> m_flowThreadController; 205 OwnPtr<FlowThreadController> m_flowThreadController;
202 RefPtr<IntervalArena> m_intervalArena; 206 RefPtr<IntervalArena> m_intervalArena;
203 207
204 RenderQuote* m_renderQuoteHead; 208 RenderQuote* m_renderQuoteHead;
205 unsigned m_renderCounterCount; 209 unsigned m_renderCounterCount;
210
211 unsigned m_hitTestCount;
206 }; 212 };
207 213
208 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); 214 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView());
209 215
210 // Suspends the LayoutState cached offset and clipRect optimization. Used under transforms 216 // Suspends the LayoutState cached offset and clipRect optimization. Used under transforms
211 // that cannot be represented by LayoutState (common in SVG) and when manipulati ng the render 217 // that cannot be represented by LayoutState (common in SVG) and when manipulati ng the render
212 // tree during layout in ways that can trigger repaint of a non-child (e.g. when a list item 218 // tree during layout in ways that can trigger repaint of a non-child (e.g. when a list item
213 // moves its list marker around). Note that even when disabled, LayoutState is s till used to 219 // moves its list marker around). Note that even when disabled, LayoutState is s till used to
214 // store layoutDelta. 220 // store layoutDelta.
215 class ForceHorriblySlowRectMapping { 221 class ForceHorriblySlowRectMapping {
(...skipping 20 matching lines...) Expand all
236 RenderView& m_view; 242 RenderView& m_view;
237 bool m_didDisable; 243 bool m_didDisable;
238 #if ASSERT_ENABLED 244 #if ASSERT_ENABLED
239 LayoutState* m_layoutState; 245 LayoutState* m_layoutState;
240 #endif 246 #endif
241 }; 247 };
242 248
243 } // namespace WebCore 249 } // namespace WebCore
244 250
245 #endif // RenderView_h 251 #endif // RenderView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698