Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutState.cpp

Issue 2516463003: If an object's containing block is in a flow thread, so is the object. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fragmentation/relayout-abspos.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 LayoutState::LayoutState(LayoutBox& layoutObject, 47 LayoutState::LayoutState(LayoutBox& layoutObject,
48 LayoutUnit pageLogicalHeight, 48 LayoutUnit pageLogicalHeight,
49 bool containingBlockLogicalWidthChanged) 49 bool containingBlockLogicalWidthChanged)
50 : m_containingBlockLogicalWidthChanged(containingBlockLogicalWidthChanged), 50 : m_containingBlockLogicalWidthChanged(containingBlockLogicalWidthChanged),
51 m_next(layoutObject.view()->layoutState()), 51 m_next(layoutObject.view()->layoutState()),
52 m_layoutObject(layoutObject) { 52 m_layoutObject(layoutObject) {
53 if (layoutObject.isLayoutFlowThread()) 53 if (layoutObject.isLayoutFlowThread())
54 m_flowThread = toLayoutFlowThread(&layoutObject); 54 m_flowThread = toLayoutFlowThread(&layoutObject);
55 else if (!layoutObject.isOutOfFlowPositioned()) 55 else
56 m_flowThread = m_next->flowThread(); 56 m_flowThread = m_next->flowThread();
57 else
58 m_flowThread = nullptr;
59 m_paginationStateChanged = m_next->m_paginationStateChanged; 57 m_paginationStateChanged = m_next->m_paginationStateChanged;
60 layoutObject.view()->pushLayoutState(*this); 58 layoutObject.view()->pushLayoutState(*this);
61 m_heightOffsetForTableHeaders = m_next->heightOffsetForTableHeaders(); 59 m_heightOffsetForTableHeaders = m_next->heightOffsetForTableHeaders();
62 60
63 if (pageLogicalHeight || layoutObject.isLayoutFlowThread()) { 61 if (pageLogicalHeight || layoutObject.isLayoutFlowThread()) {
64 // Entering a new pagination context. 62 // Entering a new pagination context.
65 m_pageLogicalHeight = pageLogicalHeight; 63 m_pageLogicalHeight = pageLogicalHeight;
66 m_paginationOffset = LayoutSize(); 64 m_paginationOffset = LayoutSize();
67 m_isPaginated = true; 65 m_isPaginated = true;
68 return; 66 return;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 132
135 LayoutUnit LayoutState::pageLogicalOffset( 133 LayoutUnit LayoutState::pageLogicalOffset(
136 const LayoutBox& child, 134 const LayoutBox& child,
137 const LayoutUnit& childLogicalOffset) const { 135 const LayoutUnit& childLogicalOffset) const {
138 if (child.isHorizontalWritingMode()) 136 if (child.isHorizontalWritingMode())
139 return m_paginationOffset.height() + childLogicalOffset; 137 return m_paginationOffset.height() + childLogicalOffset;
140 return m_paginationOffset.width() + childLogicalOffset; 138 return m_paginationOffset.width() + childLogicalOffset;
141 } 139 }
142 140
143 } // namespace blink 141 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fragmentation/relayout-abspos.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698