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

Side by Side Diff: Source/core/layout/LayoutMultiColumnSet.cpp

Issue 1190153002: Make mapLocalToContainer() work properly for content that follows a column spanner. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // If we're followed by a spanner, we need to balance. 153 // If we're followed by a spanner, we need to balance.
154 return true; 154 return true;
155 } 155 }
156 } 156 }
157 } 157 }
158 return !flowThread->columnHeightAvailable(); 158 return !flowThread->columnHeightAvailable();
159 } 159 }
160 160
161 LayoutSize LayoutMultiColumnSet::flowThreadTranslationAtOffset(LayoutUnit blockO ffset) const 161 LayoutSize LayoutMultiColumnSet::flowThreadTranslationAtOffset(LayoutUnit blockO ffset) const
162 { 162 {
163 const MultiColumnFragmentainerGroup& row = fragmentainerGroupAtFlowThreadOff set(blockOffset); 163 return fragmentainerGroupAtFlowThreadOffset(blockOffset).flowThreadTranslati onAtOffset(blockOffset);
164 return row.offsetFromColumnSet() + row.flowThreadTranslationAtOffset(blockOf fset);
165 } 164 }
166 165
167 LayoutPoint LayoutMultiColumnSet::visualPointToFlowThreadPoint(const LayoutPoint & visualPoint) const 166 LayoutPoint LayoutMultiColumnSet::visualPointToFlowThreadPoint(const LayoutPoint & visualPoint) const
168 { 167 {
169 const MultiColumnFragmentainerGroup& row = fragmentainerGroupAtVisualPoint(v isualPoint); 168 const MultiColumnFragmentainerGroup& row = fragmentainerGroupAtVisualPoint(v isualPoint);
170 return row.visualPointToFlowThreadPoint(visualPoint - row.offsetFromColumnSe t()); 169 return row.visualPointToFlowThreadPoint(visualPoint - row.offsetFromColumnSe t());
171 } 170 }
172 171
173 void LayoutMultiColumnSet::updateMinimumColumnHeight(LayoutUnit offsetInFlowThre ad, LayoutUnit height) 172 void LayoutMultiColumnSet::updateMinimumColumnHeight(LayoutUnit offsetInFlowThre ad, LayoutUnit height)
174 { 173 {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 325
327 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const 326 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const
328 { 327 {
329 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi dth(), logicalHeightInFlowThread()); 328 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi dth(), logicalHeightInFlowThread());
330 if (!isHorizontalWritingMode()) 329 if (!isHorizontalWritingMode())
331 return portionRect.transposedRect(); 330 return portionRect.transposedRect();
332 return portionRect; 331 return portionRect;
333 } 332 }
334 333
335 } 334 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698