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

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

Issue 1656743002: Removing more implicit LayoutUnit construction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix additional test Created 4 years, 10 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 LayoutPoint flowThreadPoint = row.visualPointToFlowThreadPoint(point + row.o ffsetFromColumnSet()); 337 LayoutPoint flowThreadPoint = row.visualPointToFlowThreadPoint(point + row.o ffsetFromColumnSet());
338 // Then drill into the flow thread, where we'll find the actual content. 338 // Then drill into the flow thread, where we'll find the actual content.
339 return flowThread()->positionForPoint(flowThreadPoint); 339 return flowThread()->positionForPoint(flowThreadPoint);
340 } 340 }
341 341
342 LayoutUnit LayoutMultiColumnSet::columnGap() const 342 LayoutUnit LayoutMultiColumnSet::columnGap() const
343 { 343 {
344 LayoutBlockFlow* parentBlock = multiColumnBlockFlow(); 344 LayoutBlockFlow* parentBlock = multiColumnBlockFlow();
345 if (parentBlock->style()->hasNormalColumnGap()) 345 if (parentBlock->style()->hasNormalColumnGap())
346 return LayoutUnit(parentBlock->style()->fontDescription().computedPixelS ize()); // "1em" is recommended as the normal gap setting. Matches <p> margins. 346 return LayoutUnit(parentBlock->style()->fontDescription().computedPixelS ize()); // "1em" is recommended as the normal gap setting. Matches <p> margins.
347 return parentBlock->style()->columnGap(); 347 return LayoutUnit(parentBlock->style()->columnGap());
348 } 348 }
349 349
350 unsigned LayoutMultiColumnSet::actualColumnCount() const 350 unsigned LayoutMultiColumnSet::actualColumnCount() const
351 { 351 {
352 // FIXME: remove this method. It's a meaningless question to ask the set "ho w many columns do 352 // FIXME: remove this method. It's a meaningless question to ask the set "ho w many columns do
353 // you actually have?", since that may vary for each row. 353 // you actually have?", since that may vary for each row.
354 return firstFragmentainerGroup().actualColumnCount(); 354 return firstFragmentainerGroup().actualColumnCount();
355 } 355 }
356 356
357 void LayoutMultiColumnSet::paintObject(const PaintInfo& paintInfo, const LayoutP oint& paintOffset) const 357 void LayoutMultiColumnSet::paintObject(const PaintInfo& paintInfo, const LayoutP oint& paintOffset) const
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 419
420 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const 420 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const
421 { 421 {
422 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi dth(), logicalHeightInFlowThread()); 422 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi dth(), logicalHeightInFlowThread());
423 if (!isHorizontalWritingMode()) 423 if (!isHorizontalWritingMode())
424 return portionRect.transposedRect(); 424 return portionRect.transposedRect();
425 return portionRect; 425 return portionRect;
426 } 426 }
427 427
428 } // namespace blink 428 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698