Changeset 224350 in webkit
- Timestamp:
- Nov 2, 2017 12:24:42 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r224348 r224350 1 2017-11-02 Zalan Bujtas <zalan@apple.com> 2 3 LayoutState::m_next is really the ancestor state. 4 https://bugs.webkit.org/show_bug.cgi?id=179187 5 <rdar://problem/35319525> 6 7 Reviewed by Simon Fraser. 8 9 No change in functionality. 10 11 * rendering/LayoutState.cpp: 12 (WebCore::LayoutState::LayoutState): 13 (WebCore::LayoutState::clearPaginationInformation): 14 (WebCore::LayoutState::propagateLineGridInfo): 15 (WebCore::LayoutState::establishLineGrid): 16 * rendering/LayoutState.h: 17 * rendering/RenderView.h: 18 1 19 2017-11-02 Alex Christensen <achristensen@webkit.org> 2 20 -
trunk/Source/WebCore/rendering/LayoutState.cpp
r222575 r224350 35 35 namespace WebCore { 36 36 37 LayoutState::LayoutState(std::unique_ptr<LayoutState> next, RenderBox* renderer, const LayoutSize& offset, LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged)38 : m_ next(WTFMove(next))37 LayoutState::LayoutState(std::unique_ptr<LayoutState> ancestor, RenderBox* renderer, const LayoutSize& offset, LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged) 38 : m_ancestor(WTFMove(ancestor)) 39 39 #ifndef NDEBUG 40 40 , m_renderer(renderer) 41 41 #endif 42 42 { 43 ASSERT(m_ next);43 ASSERT(m_ancestor); 44 44 45 45 bool fixed = renderer->isOutOfFlowPositioned() && renderer->style().position() == FixedPosition; … … 49 49 m_paintOffset = LayoutSize(fixedOffset.x(), fixedOffset.y()) + offset; 50 50 } else 51 m_paintOffset = m_ next->m_paintOffset + offset;51 m_paintOffset = m_ancestor->m_paintOffset + offset; 52 52 53 53 if (renderer->isOutOfFlowPositioned() && !fixed) { … … 63 63 m_paintOffset += renderer->layer()->offsetForInFlowPosition(); 64 64 65 m_clipped = !fixed && m_ next->m_clipped;65 m_clipped = !fixed && m_ancestor->m_clipped; 66 66 if (m_clipped) 67 m_clipRect = m_ next->m_clipRect;67 m_clipRect = m_ancestor->m_clipRect; 68 68 69 69 if (renderer->hasOverflowClip()) { … … 90 90 } else { 91 91 // If we don't establish a new page height, then propagate the old page height and offset down. 92 m_pageLogicalHeight = m_ next->m_pageLogicalHeight;93 m_pageLogicalHeightChanged = m_ next->m_pageLogicalHeightChanged;94 m_pageOffset = m_ next->m_pageOffset;92 m_pageLogicalHeight = m_ancestor->m_pageLogicalHeight; 93 m_pageLogicalHeightChanged = m_ancestor->m_pageLogicalHeightChanged; 94 m_pageOffset = m_ancestor->m_pageOffset; 95 95 96 96 // Disable pagination for objects we don't support. For now this includes overflow:scroll/auto, inline blocks and … … 106 106 propagateLineGridInfo(renderer); 107 107 108 m_layoutDelta = m_ next->m_layoutDelta;108 m_layoutDelta = m_ancestor->m_layoutDelta; 109 109 #if !ASSERT_DISABLED 110 m_layoutDeltaXSaturated = m_ next->m_layoutDeltaXSaturated;111 m_layoutDeltaYSaturated = m_ next->m_layoutDeltaYSaturated;110 m_layoutDeltaXSaturated = m_ancestor->m_layoutDeltaXSaturated; 111 m_layoutDeltaYSaturated = m_ancestor->m_layoutDeltaYSaturated; 112 112 #endif 113 113 … … 149 149 void LayoutState::clearPaginationInformation() 150 150 { 151 m_pageLogicalHeight = m_ next->m_pageLogicalHeight;152 m_pageOffset = m_ next->m_pageOffset;151 m_pageLogicalHeight = m_ancestor->m_pageLogicalHeight; 152 m_pageOffset = m_ancestor->m_pageOffset; 153 153 } 154 154 … … 164 164 // Disable line grids for objects we don't support. For now this includes overflow:scroll/auto, inline blocks and 165 165 // writing mode roots. 166 if (!m_ next|| renderer->isUnsplittableForPagination())166 if (!m_ancestor || renderer->isUnsplittableForPagination()) 167 167 return; 168 168 169 m_lineGrid = m_ next->m_lineGrid;170 m_lineGridOffset = m_ next->m_lineGridOffset;171 m_lineGridPaginationOrigin = m_ next->m_lineGridPaginationOrigin;169 m_lineGrid = m_ancestor->m_lineGrid; 170 m_lineGridOffset = m_ancestor->m_lineGridOffset; 171 m_lineGridPaginationOrigin = m_ancestor->m_lineGridPaginationOrigin; 172 172 } 173 173 … … 179 179 return; 180 180 RenderBlockFlow* currentGrid = m_lineGrid; 181 for (LayoutState* currentState = m_ next.get(); currentState; currentState = currentState->m_next.get()) {181 for (LayoutState* currentState = m_ancestor.get(); currentState; currentState = currentState->m_ancestor.get()) { 182 182 if (currentState->m_lineGrid == currentGrid) 183 183 continue; -
trunk/Source/WebCore/rendering/LayoutState.h
r222575 r224350 54 54 } 55 55 56 LayoutState(std::unique_ptr<LayoutState> , RenderBox*, const LayoutSize& offset, LayoutUnit pageHeight, bool pageHeightChanged);56 LayoutState(std::unique_ptr<LayoutState> ancestor, RenderBox*, const LayoutSize& offset, LayoutUnit pageHeight, bool pageHeightChanged); 57 57 explicit LayoutState(RenderObject&); 58 58 … … 98 98 // The current line grid that we're snapping to and the offset of the start of the grid. 99 99 RenderBlockFlow* m_lineGrid { nullptr }; 100 std::unique_ptr<LayoutState> m_ next;100 std::unique_ptr<LayoutState> m_ancestor; 101 101 102 102 // FIXME: Distinguish between the layout clip rect and the paint clip rect which may be larger, -
trunk/Source/WebCore/rendering/RenderView.h
r224176 r224350 264 264 void popLayoutState() 265 265 { 266 m_layoutState = WTFMove(m_layoutState->m_ next);266 m_layoutState = WTFMove(m_layoutState->m_ancestor); 267 267 } 268 268
Note: See TracChangeset
for help on using the changeset viewer.