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

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

Issue 2339973002: Handle exclusive end offsets when translating from flow thread coordinates. (Closed)
Patch Set: Documentation Created 4 years, 3 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
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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 if (LayoutBox* next = nextSiblingBox()) { 282 if (LayoutBox* next = nextSiblingBox()) {
283 if (next->isLayoutMultiColumnSpannerPlaceholder()) { 283 if (next->isLayoutMultiColumnSpannerPlaceholder()) {
284 // If we're followed by a spanner, we need to balance. 284 // If we're followed by a spanner, we need to balance.
285 return true; 285 return true;
286 } 286 }
287 } 287 }
288 } 288 }
289 return !flowThread->columnHeightAvailable(); 289 return !flowThread->columnHeightAvailable();
290 } 290 }
291 291
292 LayoutSize LayoutMultiColumnSet::flowThreadTranslationAtOffset(LayoutUnit blockO ffset, CoordinateSpaceConversion mode) const 292 LayoutSize LayoutMultiColumnSet::flowThreadTranslationAtOffset(LayoutUnit blockO ffset, PageBoundaryRule rule, CoordinateSpaceConversion mode) const
293 { 293 {
294 return fragmentainerGroupAtFlowThreadOffset(blockOffset).flowThreadTranslati onAtOffset(blockOffset, mode); 294 return fragmentainerGroupAtFlowThreadOffset(blockOffset).flowThreadTranslati onAtOffset(blockOffset, rule, mode);
295 } 295 }
296 296
297 LayoutPoint LayoutMultiColumnSet::visualPointToFlowThreadPoint(const LayoutPoint & visualPoint) const 297 LayoutPoint LayoutMultiColumnSet::visualPointToFlowThreadPoint(const LayoutPoint & visualPoint) const
298 { 298 {
299 const MultiColumnFragmentainerGroup& row = fragmentainerGroupAtVisualPoint(v isualPoint); 299 const MultiColumnFragmentainerGroup& row = fragmentainerGroupAtVisualPoint(v isualPoint);
300 return row.visualPointToFlowThreadPoint(visualPoint - row.offsetFromColumnSe t()); 300 return row.visualPointToFlowThreadPoint(visualPoint - row.offsetFromColumnSe t());
301 } 301 }
302 302
303 LayoutUnit LayoutMultiColumnSet::pageLogicalTopForOffset(LayoutUnit offset) cons t 303 LayoutUnit LayoutMultiColumnSet::pageLogicalTopForOffset(LayoutUnit offset) cons t
304 { 304 {
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 // Now add in column rule bounds, if present. 535 // Now add in column rule bounds, if present.
536 Vector<LayoutRect> columnRuleBounds; 536 Vector<LayoutRect> columnRuleBounds;
537 if (computeColumnRuleBounds(LayoutPoint(), columnRuleBounds)) { 537 if (computeColumnRuleBounds(LayoutPoint(), columnRuleBounds)) {
538 for (auto& bound : columnRuleBounds) 538 for (auto& bound : columnRuleBounds)
539 blockFlowBounds.unite(bound); 539 blockFlowBounds.unite(bound);
540 } 540 }
541 return blockFlowBounds; 541 return blockFlowBounds;
542 } 542 }
543 543
544 } // namespace blink 544 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698