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 |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |