| 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*, 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 double layoutViewportHeight() const; | 208 double layoutViewportHeight() const; |
| 203 | 209 |
| 204 // Suspends the LayoutState optimization. Used under transforms that cannot
be represented by | 210 // Suspends the LayoutState optimization. Used under transforms that cannot
be represented by |
| 205 // LayoutState (common in SVG) and when manipulating the render tree during
layout in ways | 211 // LayoutState (common in SVG) and when manipulating the render tree during
layout in ways |
| 206 // that can trigger repaint of a non-child (e.g. when a list item moves its
list marker around). | 212 // that can trigger repaint of a non-child (e.g. when a list item moves its
list marker around). |
| 207 // Note that even when disabled, LayoutState is still used to store layoutDe
lta. | 213 // Note that even when disabled, LayoutState is still used to store layoutDe
lta. |
| 208 // These functions may only be accessed by LayoutStateMaintainer or LayoutSt
ateDisabler. | 214 // These functions may only be accessed by LayoutStateMaintainer or LayoutSt
ateDisabler. |
| 209 void disableLayoutState() { m_layoutStateDisableCount++; } | 215 void disableLayoutState() { m_layoutStateDisableCount++; } |
| 210 void enableLayoutState() { ASSERT(m_layoutStateDisableCount > 0); m_layoutSt
ateDisableCount--; } | 216 void enableLayoutState() { ASSERT(m_layoutStateDisableCount > 0); m_layoutSt
ateDisableCount--; } |
| 211 | 217 |
| 218 OutlineRects* outlineRects() { return &m_outlineRects; } |
| 219 |
| 212 private: | 220 private: |
| 213 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const OVERRIDE; | 221 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const OVERRIDE; |
| 214 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE; | 222 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE; |
| 215 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst OVERRIDE; | 223 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst OVERRIDE; |
| 216 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const OVERRIDE; | 224 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const OVERRIDE; |
| 217 | 225 |
| 218 void initializeLayoutState(LayoutState&); | 226 void initializeLayoutState(LayoutState&); |
| 219 | 227 |
| 220 bool shouldRepaint(const LayoutRect&) const; | 228 bool shouldRepaint(const LayoutRect&) const; |
| 221 | 229 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 LayoutUnit m_pageLogicalHeight; | 274 LayoutUnit m_pageLogicalHeight; |
| 267 bool m_pageLogicalHeightChanged; | 275 bool m_pageLogicalHeightChanged; |
| 268 LayoutState* m_layoutState; | 276 LayoutState* m_layoutState; |
| 269 unsigned m_layoutStateDisableCount; | 277 unsigned m_layoutStateDisableCount; |
| 270 OwnPtr<RenderLayerCompositor> m_compositor; | 278 OwnPtr<RenderLayerCompositor> m_compositor; |
| 271 OwnPtr<FlowThreadController> m_flowThreadController; | 279 OwnPtr<FlowThreadController> m_flowThreadController; |
| 272 RefPtr<IntervalArena> m_intervalArena; | 280 RefPtr<IntervalArena> m_intervalArena; |
| 273 | 281 |
| 274 RenderQuote* m_renderQuoteHead; | 282 RenderQuote* m_renderQuoteHead; |
| 275 unsigned m_renderCounterCount; | 283 unsigned m_renderCounterCount; |
| 284 |
| 285 OutlineRects m_outlineRects; |
| 276 }; | 286 }; |
| 277 | 287 |
| 278 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); | 288 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); |
| 279 | 289 |
| 280 // Stack-based class to assist with LayoutState push/pop | 290 // Stack-based class to assist with LayoutState push/pop |
| 281 class LayoutStateMaintainer { | 291 class LayoutStateMaintainer { |
| 282 WTF_MAKE_NONCOPYABLE(LayoutStateMaintainer); | 292 WTF_MAKE_NONCOPYABLE(LayoutStateMaintainer); |
| 283 public: | 293 public: |
| 284 // ctor to push now | 294 // ctor to push now |
| 285 explicit LayoutStateMaintainer(RenderBox& root, const LayoutSize& offset, La
youtUnit pageHeight = 0, bool pageHeightChanged = false, ColumnInfo* colInfo = 0
) | 295 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... |
| 354 { | 364 { |
| 355 m_view.enableLayoutState(); | 365 m_view.enableLayoutState(); |
| 356 } | 366 } |
| 357 private: | 367 private: |
| 358 RenderView& m_view; | 368 RenderView& m_view; |
| 359 }; | 369 }; |
| 360 | 370 |
| 361 } // namespace WebCore | 371 } // namespace WebCore |
| 362 | 372 |
| 363 #endif // RenderView_h | 373 #endif // RenderView_h |
| OLD | NEW |