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 } | 42 } |
43 | 43 |
44 LayoutMultiColumnSet* LayoutMultiColumnSet::createAnonymous(LayoutFlowThread& fl
owThread, const ComputedStyle& parentStyle) | 44 LayoutMultiColumnSet* LayoutMultiColumnSet::createAnonymous(LayoutFlowThread& fl
owThread, const ComputedStyle& parentStyle) |
45 { | 45 { |
46 Document& document = flowThread.document(); | 46 Document& document = flowThread.document(); |
47 LayoutMultiColumnSet* layoutObject = new LayoutMultiColumnSet(&flowThread); | 47 LayoutMultiColumnSet* layoutObject = new LayoutMultiColumnSet(&flowThread); |
48 layoutObject->setDocumentForAnonymous(&document); | 48 layoutObject->setDocumentForAnonymous(&document); |
49 layoutObject->setStyle(ComputedStyle::createAnonymousStyleWithDisplay(parent
Style, BLOCK)); | 49 layoutObject->setStyle(ComputedStyle::createAnonymousStyleWithDisplay(parent
Style, EDisplay::Block)); |
50 return layoutObject; | 50 return layoutObject; |
51 } | 51 } |
52 | 52 |
53 unsigned LayoutMultiColumnSet::fragmentainerGroupIndexAtFlowThreadOffset(LayoutU
nit flowThreadOffset, PageBoundaryRule rule) const | 53 unsigned LayoutMultiColumnSet::fragmentainerGroupIndexAtFlowThreadOffset(LayoutU
nit flowThreadOffset, PageBoundaryRule rule) const |
54 { | 54 { |
55 ASSERT(m_fragmentainerGroups.size() > 0); | 55 ASSERT(m_fragmentainerGroups.size() > 0); |
56 if (flowThreadOffset <= 0) | 56 if (flowThreadOffset <= 0) |
57 return 0; | 57 return 0; |
58 // TODO(mstensho): Introduce an interval tree or similar to speed up this. | 58 // TODO(mstensho): Introduce an interval tree or similar to speed up this. |
59 for (unsigned index = 0; index < m_fragmentainerGroups.size(); index++) { | 59 for (unsigned index = 0; index < m_fragmentainerGroups.size(); index++) { |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 // Now add in column rule bounds, if present. | 539 // Now add in column rule bounds, if present. |
540 Vector<LayoutRect> columnRuleBounds; | 540 Vector<LayoutRect> columnRuleBounds; |
541 if (computeColumnRuleBounds(LayoutPoint(), columnRuleBounds)) { | 541 if (computeColumnRuleBounds(LayoutPoint(), columnRuleBounds)) { |
542 for (auto& bound : columnRuleBounds) | 542 for (auto& bound : columnRuleBounds) |
543 blockFlowBounds.unite(bound); | 543 blockFlowBounds.unite(bound); |
544 } | 544 } |
545 return blockFlowBounds; | 545 return blockFlowBounds; |
546 } | 546 } |
547 | 547 |
548 } // namespace blink | 548 } // namespace blink |
OLD | NEW |