| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 RenderFlowThread* m_renderFlowThread; | 119 RenderFlowThread* m_renderFlowThread; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 void RenderFlowThread::validateRegions() | 122 void RenderFlowThread::validateRegions() |
| 123 { | 123 { |
| 124 if (m_regionsInvalidated) { | 124 if (m_regionsInvalidated) { |
| 125 m_regionsInvalidated = false; | 125 m_regionsInvalidated = false; |
| 126 m_regionsHaveUniformLogicalHeight = true; | 126 m_regionsHaveUniformLogicalHeight = true; |
| 127 | 127 |
| 128 if (hasRegions()) { | 128 if (hasRegions()) { |
| 129 LayoutUnit previousRegionLogicalWidth = 0; | |
| 130 LayoutUnit previousRegionLogicalHeight = 0; | 129 LayoutUnit previousRegionLogicalHeight = 0; |
| 131 bool firstRegionVisited = false; | 130 bool firstRegionVisited = false; |
| 132 | 131 |
| 133 for (RenderRegionList::iterator iter = m_regionList.begin(); iter !=
m_regionList.end(); ++iter) { | 132 for (RenderRegionList::iterator iter = m_regionList.begin(); iter !=
m_regionList.end(); ++iter) { |
| 134 RenderRegion* region = *iter; | 133 RenderRegion* region = *iter; |
| 135 LayoutUnit regionLogicalWidth = region->pageLogicalWidth(); | |
| 136 LayoutUnit regionLogicalHeight = region->pageLogicalHeight(); | 134 LayoutUnit regionLogicalHeight = region->pageLogicalHeight(); |
| 137 | 135 |
| 138 if (!firstRegionVisited) { | 136 if (!firstRegionVisited) { |
| 139 firstRegionVisited = true; | 137 firstRegionVisited = true; |
| 140 } else { | 138 } else { |
| 141 if (m_regionsHaveUniformLogicalHeight && previousRegionLogic
alHeight != regionLogicalHeight) | 139 if (m_regionsHaveUniformLogicalHeight && previousRegionLogic
alHeight != regionLogicalHeight) |
| 142 m_regionsHaveUniformLogicalHeight = false; | 140 m_regionsHaveUniformLogicalHeight = false; |
| 143 } | 141 } |
| 144 | 142 |
| 145 previousRegionLogicalWidth = regionLogicalWidth; | 143 previousRegionLogicalHeight = regionLogicalHeight; |
| 146 } | 144 } |
| 147 } | 145 } |
| 148 } | 146 } |
| 149 | 147 |
| 150 updateLogicalWidth(); // Called to get the maximum logical width for the reg
ion. | 148 updateLogicalWidth(); // Called to get the maximum logical width for the reg
ion. |
| 151 updateRegionsFlowThreadPortionRect(); | 149 updateRegionsFlowThreadPortionRect(); |
| 152 } | 150 } |
| 153 | 151 |
| 154 void RenderFlowThread::layout() | 152 void RenderFlowThread::layout() |
| 155 { | 153 { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 { | 668 { |
| 671 if (!m_renderFlowThread) | 669 if (!m_renderFlowThread) |
| 672 return; | 670 return; |
| 673 RenderView* view = m_renderFlowThread->view(); | 671 RenderView* view = m_renderFlowThread->view(); |
| 674 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl
owThread); | 672 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl
owThread); |
| 675 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo
wThread); | 673 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo
wThread); |
| 676 } | 674 } |
| 677 | 675 |
| 678 | 676 |
| 679 } // namespace WebCore | 677 } // namespace WebCore |
| OLD | NEW |