| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #ifndef SKY_ENGINE_CORE_RENDERING_LAYOUTSTATE_H_ | 26 #ifndef SKY_ENGINE_CORE_RENDERING_LAYOUTSTATE_H_ |
| 27 #define SKY_ENGINE_CORE_RENDERING_LAYOUTSTATE_H_ | 27 #define SKY_ENGINE_CORE_RENDERING_LAYOUTSTATE_H_ |
| 28 | 28 |
| 29 #include "sky/engine/platform/geometry/LayoutRect.h" | 29 #include "sky/engine/platform/geometry/LayoutRect.h" |
| 30 #include "sky/engine/wtf/HashMap.h" | 30 #include "sky/engine/wtf/HashMap.h" |
| 31 #include "sky/engine/wtf/Noncopyable.h" | 31 #include "sky/engine/wtf/Noncopyable.h" |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 class ForceHorriblySlowRectMapping; | |
| 36 class RenderBox; | 35 class RenderBox; |
| 37 class RenderObject; | 36 class RenderObject; |
| 38 class RenderInline; | 37 class RenderInline; |
| 39 class RenderView; | 38 class RenderView; |
| 40 | 39 |
| 41 class LayoutState { | 40 class LayoutState { |
| 42 WTF_MAKE_NONCOPYABLE(LayoutState); | 41 WTF_MAKE_NONCOPYABLE(LayoutState); |
| 43 public: | 42 public: |
| 44 // Constructor for root LayoutState created by RenderView | 43 // Constructor for root LayoutState created by RenderView |
| 45 explicit LayoutState(RenderView&); | 44 explicit LayoutState(RenderView&); |
| 46 // Constructor for sub-tree Layout and RenderTableSections | 45 // Constructor for sub-tree Layout and RenderTableSections |
| 47 explicit LayoutState(RenderObject& root); | 46 explicit LayoutState(RenderObject& root); |
| 48 | 47 |
| 49 LayoutState(RenderBox&, const LayoutSize& offset, bool containingBlockLogica
lWidthChanged = false); | 48 LayoutState(RenderBox&, const LayoutSize& offset, bool containingBlockLogica
lWidthChanged = false); |
| 50 LayoutState(RenderInline&); | 49 LayoutState(RenderInline&); |
| 51 | 50 |
| 52 ~LayoutState(); | 51 ~LayoutState(); |
| 53 | 52 |
| 54 const LayoutSize& layoutOffset() const { return m_layoutOffset; } | 53 const LayoutSize& layoutOffset() const { return m_layoutOffset; } |
| 55 bool containingBlockLogicalWidthChanged() const { return m_containingBlockLo
gicalWidthChanged; } | 54 bool containingBlockLogicalWidthChanged() const { return m_containingBlockLo
gicalWidthChanged; } |
| 56 | 55 |
| 57 LayoutState* next() const { return m_next; } | 56 LayoutState* next() const { return m_next; } |
| 58 | 57 |
| 59 RenderObject& renderer() const { return m_renderer; } | 58 RenderObject& renderer() const { return m_renderer; } |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 friend class ForceHorriblySlowRectMapping; | |
| 63 | |
| 64 bool m_containingBlockLogicalWidthChanged : 1; | 61 bool m_containingBlockLogicalWidthChanged : 1; |
| 65 | 62 |
| 66 LayoutState* m_next; | 63 LayoutState* m_next; |
| 67 | 64 |
| 68 // x/y offset from container. Does not include relative positioning or scrol
l offsets. | 65 // x/y offset from container. Does not include relative positioning or scrol
l offsets. |
| 69 LayoutSize m_layoutOffset; | 66 LayoutSize m_layoutOffset; |
| 70 | 67 |
| 71 RenderObject& m_renderer; | 68 RenderObject& m_renderer; |
| 72 }; | 69 }; |
| 73 | 70 |
| 74 } // namespace blink | 71 } // namespace blink |
| 75 | 72 |
| 76 #endif // SKY_ENGINE_CORE_RENDERING_LAYOUTSTATE_H_ | 73 #endif // SKY_ENGINE_CORE_RENDERING_LAYOUTSTATE_H_ |
| OLD | NEW |