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

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

Issue 1024023002: [New Multicolumn] mapAbsoluteToLocalPoint() needs to convert to flow thread coordinates. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review - remove more cruft. Created 5 years, 9 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
« no previous file with comments | « Source/core/layout/LayoutMultiColumnSet.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) 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 return !flowThread->columnHeightAvailable(); 117 return !flowThread->columnHeightAvailable();
118 } 118 }
119 119
120 LayoutSize LayoutMultiColumnSet::flowThreadTranslationAtOffset(LayoutUnit blockO ffset) const 120 LayoutSize LayoutMultiColumnSet::flowThreadTranslationAtOffset(LayoutUnit blockO ffset) const
121 { 121 {
122 const MultiColumnFragmentainerGroup& row = fragmentainerGroupAtFlowThreadOff set(blockOffset); 122 const MultiColumnFragmentainerGroup& row = fragmentainerGroupAtFlowThreadOff set(blockOffset);
123 return row.offsetFromColumnSet() + row.flowThreadTranslationAtOffset(blockOf fset); 123 return row.offsetFromColumnSet() + row.flowThreadTranslationAtOffset(blockOf fset);
124 } 124 }
125 125
126 LayoutPoint LayoutMultiColumnSet::visualPointToFlowThreadPoint(const LayoutPoint & visualPoint) const
127 {
128 const MultiColumnFragmentainerGroup& row = fragmentainerGroupAtVisualPoint(v isualPoint);
129 return row.visualPointToFlowThreadPoint(visualPoint - row.offsetFromColumnSe t());
130 }
131
126 void LayoutMultiColumnSet::updateMinimumColumnHeight(LayoutUnit offsetInFlowThre ad, LayoutUnit height) 132 void LayoutMultiColumnSet::updateMinimumColumnHeight(LayoutUnit offsetInFlowThre ad, LayoutUnit height)
127 { 133 {
128 fragmentainerGroupAtFlowThreadOffset(offsetInFlowThread).updateMinimumColumn Height(height); 134 fragmentainerGroupAtFlowThreadOffset(offsetInFlowThread).updateMinimumColumn Height(height);
129 } 135 }
130 136
131 LayoutUnit LayoutMultiColumnSet::pageLogicalTopForOffset(LayoutUnit offset) cons t 137 LayoutUnit LayoutMultiColumnSet::pageLogicalTopForOffset(LayoutUnit offset) cons t
132 { 138 {
133 return fragmentainerGroupAtFlowThreadOffset(offset).columnLogicalTopForOffse t(offset); 139 return fragmentainerGroupAtFlowThreadOffset(offset).columnLogicalTopForOffse t(offset);
134 } 140 }
135 141
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 285
280 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const 286 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const
281 { 287 {
282 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi dth(), logicalHeightInFlowThread()); 288 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi dth(), logicalHeightInFlowThread());
283 if (!isHorizontalWritingMode()) 289 if (!isHorizontalWritingMode())
284 return portionRect.transposedRect(); 290 return portionRect.transposedRect();
285 return portionRect; 291 return portionRect;
286 } 292 }
287 293
288 } 294 }
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutMultiColumnSet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698