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