| 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 28 matching lines...) Expand all Loading... |
| 39 m_flowThread(flowThread), | 39 m_flowThread(flowThread), |
| 40 m_initialHeightCalculated(false) {} | 40 m_initialHeightCalculated(false) {} |
| 41 | 41 |
| 42 LayoutMultiColumnSet* LayoutMultiColumnSet::createAnonymous( | 42 LayoutMultiColumnSet* LayoutMultiColumnSet::createAnonymous( |
| 43 LayoutFlowThread& flowThread, | 43 LayoutFlowThread& flowThread, |
| 44 const ComputedStyle& parentStyle) { | 44 const ComputedStyle& parentStyle) { |
| 45 Document& document = flowThread.document(); | 45 Document& document = flowThread.document(); |
| 46 LayoutMultiColumnSet* layoutObject = new LayoutMultiColumnSet(&flowThread); | 46 LayoutMultiColumnSet* layoutObject = new LayoutMultiColumnSet(&flowThread); |
| 47 layoutObject->setDocumentForAnonymous(&document); | 47 layoutObject->setDocumentForAnonymous(&document); |
| 48 layoutObject->setStyle(ComputedStyle::createAnonymousStyleWithDisplay( | 48 layoutObject->setStyle(ComputedStyle::createAnonymousStyleWithDisplay( |
| 49 parentStyle, EDisplay::Block)); | 49 parentStyle, EDisplay::kBlock)); |
| 50 return layoutObject; | 50 return layoutObject; |
| 51 } | 51 } |
| 52 | 52 |
| 53 unsigned LayoutMultiColumnSet::fragmentainerGroupIndexAtFlowThreadOffset( | 53 unsigned LayoutMultiColumnSet::fragmentainerGroupIndexAtFlowThreadOffset( |
| 54 LayoutUnit flowThreadOffset, | 54 LayoutUnit flowThreadOffset, |
| 55 PageBoundaryRule rule) const { | 55 PageBoundaryRule rule) const { |
| 56 ASSERT(m_fragmentainerGroups.size() > 0); | 56 ASSERT(m_fragmentainerGroups.size() > 0); |
| 57 if (flowThreadOffset <= 0) | 57 if (flowThreadOffset <= 0) |
| 58 return 0; | 58 return 0; |
| 59 // TODO(mstensho): Introduce an interval tree or similar to speed up this. | 59 // TODO(mstensho): Introduce an interval tree or similar to speed up this. |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 // Now add in column rule bounds, if present. | 610 // Now add in column rule bounds, if present. |
| 611 Vector<LayoutRect> columnRuleBounds; | 611 Vector<LayoutRect> columnRuleBounds; |
| 612 if (computeColumnRuleBounds(LayoutPoint(), columnRuleBounds)) { | 612 if (computeColumnRuleBounds(LayoutPoint(), columnRuleBounds)) { |
| 613 for (auto& bound : columnRuleBounds) | 613 for (auto& bound : columnRuleBounds) |
| 614 blockFlowBounds.unite(bound); | 614 blockFlowBounds.unite(bound); |
| 615 } | 615 } |
| 616 return blockFlowBounds; | 616 return blockFlowBounds; |
| 617 } | 617 } |
| 618 | 618 |
| 619 } // namespace blink | 619 } // namespace blink |
| OLD | NEW |