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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 Vector<LayoutRect>& column_rule_bounds) const { | 561 Vector<LayoutRect>& column_rule_bounds) const { |
562 if (FlowThread()->IsLayoutPagedFlowThread()) | 562 if (FlowThread()->IsLayoutPagedFlowThread()) |
563 return false; | 563 return false; |
564 | 564 |
565 // Reference: https://www.w3.org/TR/css3-multicol/#column-gaps-and-rules | 565 // Reference: https://www.w3.org/TR/css3-multicol/#column-gaps-and-rules |
566 const ComputedStyle& block_style = MultiColumnBlockFlow()->StyleRef(); | 566 const ComputedStyle& block_style = MultiColumnBlockFlow()->StyleRef(); |
567 bool rule_transparent = block_style.ColumnRuleIsTransparent(); | 567 bool rule_transparent = block_style.ColumnRuleIsTransparent(); |
568 EBorderStyle rule_style = block_style.ColumnRuleStyle(); | 568 EBorderStyle rule_style = block_style.ColumnRuleStyle(); |
569 LayoutUnit rule_thickness(block_style.ColumnRuleWidth()); | 569 LayoutUnit rule_thickness(block_style.ColumnRuleWidth()); |
570 LayoutUnit col_gap = ColumnGap(); | 570 LayoutUnit col_gap = ColumnGap(); |
571 bool render_rule = rule_style > kBorderStyleHidden && !rule_transparent; | 571 bool render_rule = rule_style > EBorderStyle::kHidden && !rule_transparent; |
572 if (!render_rule) | 572 if (!render_rule) |
573 return false; | 573 return false; |
574 | 574 |
575 unsigned col_count = ActualColumnCount(); | 575 unsigned col_count = ActualColumnCount(); |
576 if (col_count <= 1) | 576 if (col_count <= 1) |
577 return false; | 577 return false; |
578 | 578 |
579 bool left_to_right = Style()->IsLeftToRightDirection(); | 579 bool left_to_right = Style()->IsLeftToRightDirection(); |
580 LayoutUnit curr_logical_left_offset = | 580 LayoutUnit curr_logical_left_offset = |
581 left_to_right ? LayoutUnit() : ContentLogicalWidth(); | 581 left_to_right ? LayoutUnit() : ContentLogicalWidth(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 // Now add in column rule bounds, if present. | 626 // Now add in column rule bounds, if present. |
627 Vector<LayoutRect> column_rule_bounds; | 627 Vector<LayoutRect> column_rule_bounds; |
628 if (ComputeColumnRuleBounds(LayoutPoint(), column_rule_bounds)) { | 628 if (ComputeColumnRuleBounds(LayoutPoint(), column_rule_bounds)) { |
629 for (auto& bound : column_rule_bounds) | 629 for (auto& bound : column_rule_bounds) |
630 block_flow_bounds.Unite(bound); | 630 block_flow_bounds.Unite(bound); |
631 } | 631 } |
632 return block_flow_bounds; | 632 return block_flow_bounds; |
633 } | 633 } |
634 | 634 |
635 } // namespace blink | 635 } // namespace blink |
OLD | NEW |