OLD | NEW |
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 Loading... |
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 | |
44 // The root of the render tree, corresponding to the CSS initial containing bloc
k. | 38 // The root of the render tree, corresponding to the CSS initial containing bloc
k. |
45 // It's dimensions match that of the logical viewport (which may be different fr
om | 39 // It's dimensions match that of the logical viewport (which may be different fr
om |
46 // 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
) |
47 // relative to the document (and so isn't necessarily in view). | 41 // relative to the document (and so isn't necessarily in view). |
48 class RenderView FINAL : public RenderBlockFlow { | 42 class RenderView FINAL : public RenderBlockFlow { |
49 public: | 43 public: |
50 explicit RenderView(Document*); | 44 explicit RenderView(Document*); |
51 virtual ~RenderView(); | 45 virtual ~RenderView(); |
52 | 46 |
53 bool hitTest(const HitTestRequest&, HitTestResult&); | 47 bool hitTest(const HitTestRequest&, HitTestResult&); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 double layoutViewportHeight() const; | 188 double layoutViewportHeight() const; |
195 | 189 |
196 // Suspends the LayoutState optimization. Used under transforms that cannot
be represented by | 190 // Suspends the LayoutState optimization. Used under transforms that cannot
be represented by |
197 // LayoutState (common in SVG) and when manipulating the render tree during
layout in ways | 191 // LayoutState (common in SVG) and when manipulating the render tree during
layout in ways |
198 // that can trigger repaint of a non-child (e.g. when a list item moves its
list marker around). | 192 // that can trigger repaint of a non-child (e.g. when a list item moves its
list marker around). |
199 // Note that even when disabled, LayoutState is still used to store layoutDe
lta. | 193 // Note that even when disabled, LayoutState is still used to store layoutDe
lta. |
200 // These functions may only be accessed by LayoutStateMaintainer or LayoutSt
ateDisabler. | 194 // These functions may only be accessed by LayoutStateMaintainer or LayoutSt
ateDisabler. |
201 void disableLayoutState() { m_layoutStateDisableCount++; } | 195 void disableLayoutState() { m_layoutStateDisableCount++; } |
202 void enableLayoutState() { ASSERT(m_layoutStateDisableCount > 0); m_layoutSt
ateDisableCount--; } | 196 void enableLayoutState() { ASSERT(m_layoutStateDisableCount > 0); m_layoutSt
ateDisableCount--; } |
203 | 197 |
204 OutlineRects& outlineRects() { return m_outlineRects; } | |
205 | |
206 private: | 198 private: |
207 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const OVERRIDE; | 199 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const OVERRIDE; |
208 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE; | 200 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE; |
209 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst OVERRIDE; | 201 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst OVERRIDE; |
210 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const OVERRIDE; | 202 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const OVERRIDE; |
211 | 203 |
212 bool shouldRepaint(const LayoutRect&) const; | 204 bool shouldRepaint(const LayoutRect&) const; |
213 | 205 |
214 bool rootFillsViewportBackground(RenderBox* rootBox) const; | 206 bool rootFillsViewportBackground(RenderBox* rootBox) const; |
215 | 207 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 LayoutUnit m_pageLogicalHeight; | 248 LayoutUnit m_pageLogicalHeight; |
257 bool m_pageLogicalHeightChanged; | 249 bool m_pageLogicalHeightChanged; |
258 LayoutState* m_layoutState; | 250 LayoutState* m_layoutState; |
259 unsigned m_layoutStateDisableCount; | 251 unsigned m_layoutStateDisableCount; |
260 OwnPtr<RenderLayerCompositor> m_compositor; | 252 OwnPtr<RenderLayerCompositor> m_compositor; |
261 OwnPtr<FlowThreadController> m_flowThreadController; | 253 OwnPtr<FlowThreadController> m_flowThreadController; |
262 RefPtr<IntervalArena> m_intervalArena; | 254 RefPtr<IntervalArena> m_intervalArena; |
263 | 255 |
264 RenderQuote* m_renderQuoteHead; | 256 RenderQuote* m_renderQuoteHead; |
265 unsigned m_renderCounterCount; | 257 unsigned m_renderCounterCount; |
266 | |
267 OutlineRects m_outlineRects; | |
268 }; | 258 }; |
269 | 259 |
270 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); | 260 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); |
271 | 261 |
272 class RootLayoutStateScope { | 262 class RootLayoutStateScope { |
273 public: | 263 public: |
274 explicit RootLayoutStateScope(RenderView& view) | 264 explicit RootLayoutStateScope(RenderView& view) |
275 : m_view(view) | 265 : m_view(view) |
276 , m_rootLayoutState(view.pageLogicalHeight(), view.pageLogicalHeightChan
ged()) | 266 , m_rootLayoutState(view.pageLogicalHeight(), view.pageLogicalHeightChan
ged()) |
277 { | 267 { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 { | 356 { |
367 m_view.enableLayoutState(); | 357 m_view.enableLayoutState(); |
368 } | 358 } |
369 private: | 359 private: |
370 RenderView& m_view; | 360 RenderView& m_view; |
371 }; | 361 }; |
372 | 362 |
373 } // namespace WebCore | 363 } // namespace WebCore |
374 | 364 |
375 #endif // RenderView_h | 365 #endif // RenderView_h |
OLD | NEW |