| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |