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

Side by Side Diff: Source/core/rendering/RenderMultiColumnFlowThread.cpp

Issue 696523003: [New Multicolumn] Use the return value from flipForWritingMode(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase master Created 6 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 | « Source/core/rendering/RenderBox.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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 deleteLineBoxTree(); 121 deleteLineBoxTree();
122 122
123 destroy(); 123 destroy();
124 } 124 }
125 125
126 LayoutSize RenderMultiColumnFlowThread::columnOffset(const LayoutPoint& point) c onst 126 LayoutSize RenderMultiColumnFlowThread::columnOffset(const LayoutPoint& point) c onst
127 { 127 {
128 if (!hasValidRegionInfo()) 128 if (!hasValidRegionInfo())
129 return LayoutSize(0, 0); 129 return LayoutSize(0, 0);
130 130
131 LayoutPoint flowThreadPoint(point); 131 LayoutPoint flowThreadPoint = flipForWritingMode(point);
132 flipForWritingMode(flowThreadPoint);
133 LayoutUnit blockOffset = isHorizontalWritingMode() ? flowThreadPoint.y() : f lowThreadPoint.x(); 132 LayoutUnit blockOffset = isHorizontalWritingMode() ? flowThreadPoint.y() : f lowThreadPoint.x();
134 RenderMultiColumnSet* columnSet = columnSetAtBlockOffset(blockOffset); 133 RenderMultiColumnSet* columnSet = columnSetAtBlockOffset(blockOffset);
135 if (!columnSet) 134 if (!columnSet)
136 return LayoutSize(0, 0); 135 return LayoutSize(0, 0);
137 return columnSet->flowThreadTranslationAtOffset(blockOffset); 136 return columnSet->flowThreadTranslationAtOffset(blockOffset);
138 } 137 }
139 138
140 bool RenderMultiColumnFlowThread::needsNewWidth() const 139 bool RenderMultiColumnFlowThread::needsNewWidth() const
141 { 140 {
142 LayoutUnit newWidth; 141 LayoutUnit newWidth;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 313 }
315 314
316 bool RenderMultiColumnFlowThread::isPageLogicalHeightKnown() const 315 bool RenderMultiColumnFlowThread::isPageLogicalHeightKnown() const
317 { 316 {
318 if (RenderMultiColumnSet* columnSet = lastMultiColumnSet()) 317 if (RenderMultiColumnSet* columnSet = lastMultiColumnSet())
319 return columnSet->pageLogicalHeight(); 318 return columnSet->pageLogicalHeight();
320 return false; 319 return false;
321 } 320 }
322 321
323 } 322 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698