| 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 "core/rendering/RenderBlockFlow.h" | 28 #include "core/rendering/RenderBlockFlow.h" |
| 29 #include "platform/PODFreeListArena.h" | 29 #include "platform/PODFreeListArena.h" |
| 30 #include "platform/scroll/ScrollableArea.h" | 30 #include "platform/scroll/ScrollableArea.h" |
| 31 #include "wtf/OwnPtr.h" | 31 #include "wtf/OwnPtr.h" |
| 32 | 32 |
| 33 namespace WebCore { | 33 namespace WebCore { |
| 34 | 34 |
| 35 class FlowThreadController; | 35 class FlowThreadController; |
| 36 class RenderLayerCompositor; | 36 class RenderLayerCompositor; |
| 37 class RenderQuote; | 37 class RenderQuote; |
| 38 class RenderWidget; | |
| 39 | 38 |
| 40 // The root of the render tree, corresponding to the CSS initial containing bloc
k. | 39 // The root of the render tree, corresponding to the CSS initial containing bloc
k. |
| 41 // It's dimensions match that of the logical viewport (which may be different fr
om | 40 // It's dimensions match that of the logical viewport (which may be different fr
om |
| 42 // the visible viewport in fixed-layout mode), and it is always at position (0,0
) | 41 // the visible viewport in fixed-layout mode), and it is always at position (0,0
) |
| 43 // relative to the document (and so isn't necessarily in view). | 42 // relative to the document (and so isn't necessarily in view). |
| 44 class RenderView FINAL : public RenderBlockFlow { | 43 class RenderView FINAL : public RenderBlockFlow { |
| 45 public: | 44 public: |
| 46 explicit RenderView(Document*); | 45 explicit RenderView(Document*); |
| 47 virtual ~RenderView(); | 46 virtual ~RenderView(); |
| 48 | 47 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRID
E; | 101 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRID
E; |
| 103 | 102 |
| 104 void setMaximalOutlineSize(int o); | 103 void setMaximalOutlineSize(int o); |
| 105 int maximalOutlineSize() const { return m_maximalOutlineSize; } | 104 int maximalOutlineSize() const { return m_maximalOutlineSize; } |
| 106 | 105 |
| 107 void setOldMaximalOutlineSize(int o) { m_oldMaximalOutlineSize = o; } | 106 void setOldMaximalOutlineSize(int o) { m_oldMaximalOutlineSize = o; } |
| 108 int oldMaximalOutlineSize() const { return m_oldMaximalOutlineSize; } | 107 int oldMaximalOutlineSize() const { return m_oldMaximalOutlineSize; } |
| 109 | 108 |
| 110 virtual LayoutRect viewRect() const OVERRIDE; | 109 virtual LayoutRect viewRect() const OVERRIDE; |
| 111 | 110 |
| 112 void updateWidgetPositions(); | |
| 113 void addWidget(RenderWidget*); | |
| 114 void removeWidget(RenderWidget*); | |
| 115 | |
| 116 // layoutDelta is used transiently during layout to store how far an object
has moved from its | 111 // layoutDelta is used transiently during layout to store how far an object
has moved from its |
| 117 // last layout location, in order to repaint correctly. | 112 // last layout location, in order to repaint correctly. |
| 118 // If we're doing a full repaint m_layoutState will be 0, but in that case l
ayoutDelta doesn't matter. | 113 // If we're doing a full repaint m_layoutState will be 0, but in that case l
ayoutDelta doesn't matter. |
| 119 LayoutSize layoutDelta() const | 114 LayoutSize layoutDelta() const |
| 120 { | 115 { |
| 121 return m_layoutState ? m_layoutState->m_layoutDelta : LayoutSize(); | 116 return m_layoutState ? m_layoutState->m_layoutDelta : LayoutSize(); |
| 122 } | 117 } |
| 123 void addLayoutDelta(const LayoutSize& delta) | 118 void addLayoutDelta(const LayoutSize& delta) |
| 124 { | 119 { |
| 125 if (m_layoutState) { | 120 if (m_layoutState) { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 246 |
| 252 void layoutContent(const LayoutState&); | 247 void layoutContent(const LayoutState&); |
| 253 void layoutContentInAutoLogicalHeightRegions(const LayoutState&); | 248 void layoutContentInAutoLogicalHeightRegions(const LayoutState&); |
| 254 #ifndef NDEBUG | 249 #ifndef NDEBUG |
| 255 void checkLayoutState(const LayoutState&); | 250 void checkLayoutState(const LayoutState&); |
| 256 #endif | 251 #endif |
| 257 | 252 |
| 258 void positionDialog(RenderBox*); | 253 void positionDialog(RenderBox*); |
| 259 void positionDialogs(); | 254 void positionDialogs(); |
| 260 | 255 |
| 261 size_t getRetainedWidgets(Vector<RenderWidget*>&); | |
| 262 void releaseWidgets(Vector<RenderWidget*>&); | |
| 263 | |
| 264 void pushLayoutStateForCurrentFlowThread(const RenderObject*); | 256 void pushLayoutStateForCurrentFlowThread(const RenderObject*); |
| 265 void popLayoutStateForCurrentFlowThread(); | 257 void popLayoutStateForCurrentFlowThread(); |
| 266 | 258 |
| 267 friend class LayoutStateMaintainer; | 259 friend class LayoutStateMaintainer; |
| 268 friend class LayoutStateDisabler; | 260 friend class LayoutStateDisabler; |
| 269 | 261 |
| 270 bool shouldUsePrintingLayout() const; | 262 bool shouldUsePrintingLayout() const; |
| 271 | 263 |
| 272 FrameView* m_frameView; | 264 FrameView* m_frameView; |
| 273 | 265 |
| 274 RenderObject* m_selectionStart; | 266 RenderObject* m_selectionStart; |
| 275 RenderObject* m_selectionEnd; | 267 RenderObject* m_selectionEnd; |
| 276 | 268 |
| 277 int m_selectionStartPos; | 269 int m_selectionStartPos; |
| 278 int m_selectionEndPos; | 270 int m_selectionEndPos; |
| 279 | 271 |
| 280 int m_maximalOutlineSize; // Used to apply a fudge factor to dirty-rect chec
ks on blocks/tables. | 272 int m_maximalOutlineSize; // Used to apply a fudge factor to dirty-rect chec
ks on blocks/tables. |
| 281 int m_oldMaximalOutlineSize; // The fudge factor from the previous layout. | 273 int m_oldMaximalOutlineSize; // The fudge factor from the previous layout. |
| 282 | 274 |
| 283 typedef HashSet<RenderWidget*> RenderWidgetSet; | |
| 284 RenderWidgetSet m_widgets; | |
| 285 | |
| 286 LayoutUnit m_pageLogicalHeight; | 275 LayoutUnit m_pageLogicalHeight; |
| 287 bool m_pageLogicalHeightChanged; | 276 bool m_pageLogicalHeightChanged; |
| 288 LayoutState* m_layoutState; | 277 LayoutState* m_layoutState; |
| 289 unsigned m_layoutStateDisableCount; | 278 unsigned m_layoutStateDisableCount; |
| 290 OwnPtr<RenderLayerCompositor> m_compositor; | 279 OwnPtr<RenderLayerCompositor> m_compositor; |
| 291 OwnPtr<FlowThreadController> m_flowThreadController; | 280 OwnPtr<FlowThreadController> m_flowThreadController; |
| 292 RefPtr<IntervalArena> m_intervalArena; | 281 RefPtr<IntervalArena> m_intervalArena; |
| 293 | 282 |
| 294 RenderQuote* m_renderQuoteHead; | 283 RenderQuote* m_renderQuoteHead; |
| 295 unsigned m_renderCounterCount; | 284 unsigned m_renderCounterCount; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 if (m_view) | 365 if (m_view) |
| 377 m_view->enableLayoutState(); | 366 m_view->enableLayoutState(); |
| 378 } | 367 } |
| 379 private: | 368 private: |
| 380 RenderView* m_view; | 369 RenderView* m_view; |
| 381 }; | 370 }; |
| 382 | 371 |
| 383 } // namespace WebCore | 372 } // namespace WebCore |
| 384 | 373 |
| 385 #endif // RenderView_h | 374 #endif // RenderView_h |
| OLD | NEW |