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

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

Issue 1492993002: Support enclosing fragmentainer breaks inside spanners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/Source/core/layout/LayoutMultiColumnSpannerPlaceholder.cpp ('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 view.pushLayoutState(*this); 45 view.pushLayoutState(*this);
46 } 46 }
47 47
48 LayoutState::LayoutState(LayoutBox& layoutObject, const LayoutSize& offset, Layo utUnit pageLogicalHeight, bool pageLogicalHeightChanged, bool containingBlockLog icalWidthChanged) 48 LayoutState::LayoutState(LayoutBox& layoutObject, const LayoutSize& offset, Layo utUnit pageLogicalHeight, bool pageLogicalHeightChanged, bool containingBlockLog icalWidthChanged)
49 : m_containingBlockLogicalWidthChanged(containingBlockLogicalWidthChanged) 49 : m_containingBlockLogicalWidthChanged(containingBlockLogicalWidthChanged)
50 , m_next(layoutObject.view()->layoutState()) 50 , m_next(layoutObject.view()->layoutState())
51 , m_layoutObject(layoutObject) 51 , m_layoutObject(layoutObject)
52 { 52 {
53 if (layoutObject.isLayoutFlowThread()) 53 if (layoutObject.isLayoutFlowThread())
54 m_flowThread = toLayoutFlowThread(&layoutObject); 54 m_flowThread = toLayoutFlowThread(&layoutObject);
55 else if (!layoutObject.isOutOfFlowPositioned() && !layoutObject.isColumnSpan All()) 55 else if (!layoutObject.isOutOfFlowPositioned())
56 m_flowThread = m_next->flowThread(); 56 m_flowThread = m_next->flowThread();
57 else 57 else
58 m_flowThread = nullptr; 58 m_flowThread = nullptr;
59 layoutObject.view()->pushLayoutState(*this); 59 layoutObject.view()->pushLayoutState(*this);
60 bool fixed = layoutObject.isOutOfFlowPositioned() && layoutObject.style()->p osition() == FixedPosition; 60 bool fixed = layoutObject.isOutOfFlowPositioned() && layoutObject.style()->p osition() == FixedPosition;
61 if (fixed) { 61 if (fixed) {
62 // FIXME: This doesn't work correctly with transforms. 62 // FIXME: This doesn't work correctly with transforms.
63 FloatPoint fixedOffset = layoutObject.view()->localToAbsolute(FloatPoint (), IsFixed); 63 FloatPoint fixedOffset = layoutObject.view()->localToAbsolute(FloatPoint (), IsFixed);
64 m_layoutOffset = LayoutSize(fixedOffset.x(), fixedOffset.y()) + offset; 64 m_layoutOffset = LayoutSize(fixedOffset.x(), fixedOffset.y()) + offset;
65 } else { 65 } else {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn it& childLogicalOffset) const 138 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn it& childLogicalOffset) const
139 { 139 {
140 if (child.isHorizontalWritingMode()) 140 if (child.isHorizontalWritingMode())
141 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh t(); 141 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh t();
142 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width(); 142 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width();
143 } 143 }
144 144
145 } // namespace blink 145 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMultiColumnSpannerPlaceholder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698