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

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

Issue 2250713002: Handle auto-positioned out-of-flow objects inside multicol containers correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review Created 4 years, 4 months 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/LayoutFlowThread.h ('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) 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 { 180 {
181 ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled() || !m_columnSetsInv alidated); 181 ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled() || !m_columnSetsInv alidated);
182 182
183 LayoutRect result; 183 LayoutRect result;
184 for (auto* columnSet : m_multiColumnSetList) 184 for (auto* columnSet : m_multiColumnSetList)
185 result.unite(columnSet->fragmentsBoundingBox(layerBoundingBox)); 185 result.unite(columnSet->fragmentsBoundingBox(layerBoundingBox));
186 186
187 return result; 187 return result;
188 } 188 }
189 189
190 void LayoutFlowThread::flowThreadToContainingCoordinateSpace(LayoutUnit& blockPo sition, LayoutUnit& inlinePosition) const
191 {
192 LayoutPoint position(inlinePosition, blockPosition);
193 // First we have to make |position| physical, because that's what offsetLeft () expects and returns.
194 if (!isHorizontalWritingMode())
195 position = position.transposedPoint();
196 position = flipForWritingMode(position);
197
198 position.move(columnOffset(position));
199
200 // Make |position| logical again, and read out the values.
201 position = flipForWritingMode(position);
202 if (!isHorizontalWritingMode())
203 position = position.transposedPoint();
204 blockPosition = position.y();
205 inlinePosition = position.x();
206 }
207
190 void LayoutFlowThread::MultiColumnSetSearchAdapter::collectIfNeeded(const MultiC olumnSetInterval& interval) 208 void LayoutFlowThread::MultiColumnSetSearchAdapter::collectIfNeeded(const MultiC olumnSetInterval& interval)
191 { 209 {
192 if (m_result) 210 if (m_result)
193 return; 211 return;
194 if (interval.low() <= m_offset && interval.high() > m_offset) 212 if (interval.low() <= m_offset && interval.high() > m_offset)
195 m_result = interval.data(); 213 m_result = interval.data();
196 } 214 }
197 215
198 } // namespace blink 216 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlowThread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698