| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 } | 59 } |
| 60 | 60 |
| 61 RenderNamedFlowThread* ensureRenderFlowThreadWithName(const AtomicString&); | 61 RenderNamedFlowThread* ensureRenderFlowThreadWithName(const AtomicString&); |
| 62 const RenderNamedFlowThreadList* renderNamedFlowThreadList() const { return
m_renderNamedFlowThreadList.get(); } | 62 const RenderNamedFlowThreadList* renderNamedFlowThreadList() const { return
m_renderNamedFlowThreadList.get(); } |
| 63 bool hasRenderNamedFlowThreads() const { return m_renderNamedFlowThreadList
&& !m_renderNamedFlowThreadList->isEmpty(); } | 63 bool hasRenderNamedFlowThreads() const { return m_renderNamedFlowThreadList
&& !m_renderNamedFlowThreadList->isEmpty(); } |
| 64 void layoutRenderNamedFlowThreads(); | 64 void layoutRenderNamedFlowThreads(); |
| 65 void styleDidChange(); | 65 void styleDidChange(); |
| 66 | 66 |
| 67 void registerNamedFlowContentNode(Node*, RenderNamedFlowThread*); | 67 void registerNamedFlowContentNode(Node*, RenderNamedFlowThread*); |
| 68 void unregisterNamedFlowContentNode(Node*); | 68 void unregisterNamedFlowContentNode(Node*); |
| 69 bool isContentNodeRegisteredWithAnyNamedFlow(const Node*) const; |
| 69 | 70 |
| 70 bool hasFlowThreadsWithAutoLogicalHeightRegions() const { return m_flowThrea
dsWithAutoLogicalHeightRegions; } | 71 bool hasFlowThreadsWithAutoLogicalHeightRegions() const { return m_flowThrea
dsWithAutoLogicalHeightRegions; } |
| 71 void incrementFlowThreadsWithAutoLogicalHeightRegions() { ++m_flowThreadsWit
hAutoLogicalHeightRegions; } | 72 void incrementFlowThreadsWithAutoLogicalHeightRegions() { ++m_flowThreadsWit
hAutoLogicalHeightRegions; } |
| 72 void decrementFlowThreadsWithAutoLogicalHeightRegions() { ASSERT(m_flowThrea
dsWithAutoLogicalHeightRegions > 0); --m_flowThreadsWithAutoLogicalHeightRegions
; } | 73 void decrementFlowThreadsWithAutoLogicalHeightRegions() { ASSERT(m_flowThrea
dsWithAutoLogicalHeightRegions > 0); --m_flowThreadsWithAutoLogicalHeightRegions
; } |
| 73 | 74 |
| 74 bool updateFlowThreadsNeedingLayout(); | 75 bool updateFlowThreadsNeedingLayout(); |
| 75 bool updateFlowThreadsNeedingTwoStepLayout(); | 76 bool updateFlowThreadsNeedingTwoStepLayout(); |
| 76 void updateFlowThreadsIntoConstrainedPhase(); | 77 void updateFlowThreadsIntoConstrainedPhase(); |
| 77 | 78 |
| 78 #ifndef NDEBUG | 79 #ifndef NDEBUG |
| 79 bool isAutoLogicalHeightRegionsCountConsistent() const; | 80 bool isAutoLogicalHeightRegionsCountConsistent() const; |
| 80 #endif | 81 #endif |
| 81 | 82 |
| 82 protected: | 83 protected: |
| 83 FlowThreadController(RenderView*); | 84 FlowThreadController(RenderView*); |
| 84 void updateFlowThreadsChainIfNecessary(); | 85 void updateFlowThreadsChainIfNecessary(); |
| 85 void resetFlowThreadsWithAutoHeightRegions(); | 86 void resetFlowThreadsWithAutoHeightRegions(); |
| 86 | 87 |
| 87 private: | 88 private: |
| 88 RenderView* m_view; | 89 RenderView* m_view; |
| 89 RenderFlowThread* m_currentRenderFlowThread; | 90 RenderFlowThread* m_currentRenderFlowThread; |
| 90 bool m_isRenderNamedFlowThreadOrderDirty; | 91 bool m_isRenderNamedFlowThreadOrderDirty; |
| 91 unsigned m_flowThreadsWithAutoLogicalHeightRegions; | 92 unsigned m_flowThreadsWithAutoLogicalHeightRegions; |
| 92 OwnPtr<RenderNamedFlowThreadList> m_renderNamedFlowThreadList; | 93 OwnPtr<RenderNamedFlowThreadList> m_renderNamedFlowThreadList; |
| 93 // maps a content node to its render flow thread. | 94 // maps a content node to its render flow thread. |
| 94 HashMap<Node*, RenderNamedFlowThread*> m_mapNamedFlowContentNodes; | 95 HashMap<const Node*, RenderNamedFlowThread*> m_mapNamedFlowContentNodes; |
| 95 }; | 96 }; |
| 96 | 97 |
| 97 } | 98 } |
| 98 | 99 |
| 99 #endif | 100 #endif |
| OLD | NEW |