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

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

Issue 160903002: Move RenderLayer repainting to repaint-after-layout framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Rebase to master Created 6 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 unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | no next file » | 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 17 matching lines...) Expand all
28 #include "platform/PODFreeListArena.h" 28 #include "platform/PODFreeListArena.h"
29 #include "platform/scroll/ScrollableArea.h" 29 #include "platform/scroll/ScrollableArea.h"
30 #include "wtf/OwnPtr.h" 30 #include "wtf/OwnPtr.h"
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 class FlowThreadController; 34 class FlowThreadController;
35 class RenderLayerCompositor; 35 class RenderLayerCompositor;
36 class RenderQuote; 36 class RenderQuote;
37 37
38 struct OutlineRectInfo {
39 LayoutRect oldOutlineRect;
40 LayoutRect newOutlineRect;
41 };
42 typedef HashMap<RenderObject*, OwnPtr<OutlineRectInfo> > OutlineRects;
43
38 // The root of the render tree, corresponding to the CSS initial containing bloc k. 44 // The root of the render tree, corresponding to the CSS initial containing bloc k.
39 // It's dimensions match that of the logical viewport (which may be different fr om 45 // It's dimensions match that of the logical viewport (which may be different fr om
40 // the visible viewport in fixed-layout mode), and it is always at position (0,0 ) 46 // 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). 47 // relative to the document (and so isn't necessarily in view).
42 class RenderView FINAL : public RenderBlockFlow { 48 class RenderView FINAL : public RenderBlockFlow {
43 public: 49 public:
44 explicit RenderView(Document*); 50 explicit RenderView(Document*);
45 virtual ~RenderView(); 51 virtual ~RenderView();
46 52
47 bool hitTest(const HitTestRequest&, HitTestResult&); 53 bool hitTest(const HitTestRequest&, HitTestResult&);
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 double layoutViewportHeight() const; 198 double layoutViewportHeight() const;
193 199
194 // Suspends the LayoutState optimization. Used under transforms that cannot be represented by 200 // Suspends the LayoutState optimization. Used under transforms that cannot be represented by
195 // LayoutState (common in SVG) and when manipulating the render tree during layout in ways 201 // LayoutState (common in SVG) and when manipulating the render tree during layout in ways
196 // that can trigger repaint of a non-child (e.g. when a list item moves its list marker around). 202 // that can trigger repaint of a non-child (e.g. when a list item moves its list marker around).
197 // Note that even when disabled, LayoutState is still used to store layoutDe lta. 203 // Note that even when disabled, LayoutState is still used to store layoutDe lta.
198 // These functions may only be accessed by LayoutStateMaintainer or LayoutSt ateDisabler. 204 // These functions may only be accessed by LayoutStateMaintainer or LayoutSt ateDisabler.
199 void disableLayoutState() { m_layoutStateDisableCount++; } 205 void disableLayoutState() { m_layoutStateDisableCount++; }
200 void enableLayoutState() { ASSERT(m_layoutStateDisableCount > 0); m_layoutSt ateDisableCount--; } 206 void enableLayoutState() { ASSERT(m_layoutStateDisableCount > 0); m_layoutSt ateDisableCount--; }
201 207
208 OutlineRects& outlineRects() { return m_outlineRects; }
209
202 private: 210 private:
203 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE; 211 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE;
204 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE; 212 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE;
205 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst OVERRIDE; 213 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst OVERRIDE;
206 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const OVERRIDE; 214 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const OVERRIDE;
207 215
208 void initializeLayoutState(LayoutState&); 216 void initializeLayoutState(LayoutState&);
209 217
210 bool shouldRepaint(const LayoutRect&) const; 218 bool shouldRepaint(const LayoutRect&) const;
211 219
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 LayoutUnit m_pageLogicalHeight; 261 LayoutUnit m_pageLogicalHeight;
254 bool m_pageLogicalHeightChanged; 262 bool m_pageLogicalHeightChanged;
255 LayoutState* m_layoutState; 263 LayoutState* m_layoutState;
256 unsigned m_layoutStateDisableCount; 264 unsigned m_layoutStateDisableCount;
257 OwnPtr<RenderLayerCompositor> m_compositor; 265 OwnPtr<RenderLayerCompositor> m_compositor;
258 OwnPtr<FlowThreadController> m_flowThreadController; 266 OwnPtr<FlowThreadController> m_flowThreadController;
259 RefPtr<IntervalArena> m_intervalArena; 267 RefPtr<IntervalArena> m_intervalArena;
260 268
261 RenderQuote* m_renderQuoteHead; 269 RenderQuote* m_renderQuoteHead;
262 unsigned m_renderCounterCount; 270 unsigned m_renderCounterCount;
271
272 OutlineRects m_outlineRects;
263 }; 273 };
264 274
265 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); 275 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView());
266 276
267 // Stack-based class to assist with LayoutState push/pop 277 // Stack-based class to assist with LayoutState push/pop
268 class LayoutStateMaintainer { 278 class LayoutStateMaintainer {
269 WTF_MAKE_NONCOPYABLE(LayoutStateMaintainer); 279 WTF_MAKE_NONCOPYABLE(LayoutStateMaintainer);
270 public: 280 public:
271 // ctor to push now 281 // ctor to push now
272 explicit LayoutStateMaintainer(RenderBox& root, const LayoutSize& offset, La youtUnit pageHeight = 0, bool pageHeightChanged = false, ColumnInfo* colInfo = 0 ) 282 explicit LayoutStateMaintainer(RenderBox& root, const LayoutSize& offset, La youtUnit pageHeight = 0, bool pageHeightChanged = false, ColumnInfo* colInfo = 0 )
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 { 351 {
342 m_view.enableLayoutState(); 352 m_view.enableLayoutState();
343 } 353 }
344 private: 354 private:
345 RenderView& m_view; 355 RenderView& m_view;
346 }; 356 };
347 357
348 } // namespace WebCore 358 } // namespace WebCore
349 359
350 #endif // RenderView_h 360 #endif // RenderView_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698