OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) |
3 * (C) 1997 Torben Weis (weis@kde.org) | 3 * (C) 1997 Torben Weis (weis@kde.org) |
4 * (C) 1998 Waldo Bastian (bastian@kde.org) | 4 * (C) 1998 Waldo Bastian (bastian@kde.org) |
5 * (C) 1999 Lars Knoll (knoll@kde.org) | 5 * (C) 1999 Lars Knoll (knoll@kde.org) |
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
8 * All rights reserved. | 8 * All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 LayoutInvalidationReason::kAttributeChanged); | 158 LayoutInvalidationReason::kAttributeChanged); |
159 if (Parent() && Section()) | 159 if (Parent() && Section()) |
160 Section()->SetNeedsCellRecalc(); | 160 Section()->SetNeedsCellRecalc(); |
161 } | 161 } |
162 | 162 |
163 Length LayoutTableCell::LogicalWidthFromColumns( | 163 Length LayoutTableCell::LogicalWidthFromColumns( |
164 LayoutTableCol* first_col_for_this_cell, | 164 LayoutTableCol* first_col_for_this_cell, |
165 Length width_from_style) const { | 165 Length width_from_style) const { |
166 DCHECK(first_col_for_this_cell); | 166 DCHECK(first_col_for_this_cell); |
167 DCHECK_EQ(first_col_for_this_cell, | 167 DCHECK_EQ(first_col_for_this_cell, |
168 Table() | 168 GetColAndColGroup().InnermostColOrColGroup()); |
169 ->ColElementAtAbsoluteColumn(AbsoluteColumnIndex()) | |
170 .InnermostColOrColGroup()); | |
171 LayoutTableCol* table_col = first_col_for_this_cell; | 169 LayoutTableCol* table_col = first_col_for_this_cell; |
172 | 170 |
173 unsigned col_span_count = ColSpan(); | 171 unsigned col_span_count = ColSpan(); |
174 int col_width_sum = 0; | 172 int col_width_sum = 0; |
175 for (unsigned i = 1; i <= col_span_count; i++) { | 173 for (unsigned i = 1; i <= col_span_count; i++) { |
176 Length col_width = table_col->Style()->LogicalWidth(); | 174 Length col_width = table_col->Style()->LogicalWidth(); |
177 | 175 |
178 // Percentage value should be returned only for colSpan == 1. | 176 // Percentage value should be returned only for colSpan == 1. |
179 // Otherwise we return original width for the cell. | 177 // Otherwise we return original width for the cell. |
180 if (!col_width.IsFixed()) { | 178 if (!col_width.IsFixed()) { |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 // row over row group, etc.) | 585 // row over row group, etc.) |
588 return border1.Precedence() < border2.Precedence(); | 586 return border1.Precedence() < border2.Precedence(); |
589 } | 587 } |
590 | 588 |
591 static CollapsedBorderValue ChooseBorder(const CollapsedBorderValue& border1, | 589 static CollapsedBorderValue ChooseBorder(const CollapsedBorderValue& border1, |
592 const CollapsedBorderValue& border2) { | 590 const CollapsedBorderValue& border2) { |
593 return CompareBorders(border1, border2) ? border2 : border1; | 591 return CompareBorders(border1, border2) ? border2 : border1; |
594 } | 592 } |
595 | 593 |
596 bool LayoutTableCell::IsInStartColumn() const { | 594 bool LayoutTableCell::IsInStartColumn() const { |
597 return !AbsoluteColumnIndex(); | 595 return !EffectiveColumnIndex(); |
598 } | 596 } |
599 | 597 |
600 bool LayoutTableCell::IsInEndColumn() const { | 598 bool LayoutTableCell::IsInEndColumn() const { |
601 return Table()->AbsoluteColumnToEffectiveColumn(AbsoluteColumnIndex() + | 599 return EffectiveColumnIndexOfCellAfter() >= Table()->NumEffectiveColumns(); |
602 ColSpan() - 1) == | |
603 Table()->NumEffectiveColumns() - 1; | |
604 } | 600 } |
605 | 601 |
606 bool LayoutTableCell::HasStartBorderAdjoiningTable() const { | 602 bool LayoutTableCell::HasStartBorderAdjoiningTable() const { |
607 // The table direction determines the row direction. In mixed directionality, | 603 // The table direction determines the row direction. In mixed directionality, |
608 // we cannot guarantee that we have a common border with the table (think a | 604 // we cannot guarantee that we have a common border with the table (think a |
609 // ltr table with rtl start cell). | 605 // ltr table with rtl start cell). |
610 return HasSameDirectionAs(Table()) ? IsInStartColumn() : IsInEndColumn(); | 606 return HasSameDirectionAs(Table()) ? IsInStartColumn() : IsInEndColumn(); |
611 } | 607 } |
612 | 608 |
613 bool LayoutTableCell::HasEndBorderAdjoiningTable() const { | 609 bool LayoutTableCell::HasEndBorderAdjoiningTable() const { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 result = ChooseBorder( | 668 result = ChooseBorder( |
673 result, | 669 result, |
674 CollapsedBorderValue(Section()->BorderAdjoiningStartCell(this), | 670 CollapsedBorderValue(Section()->BorderAdjoiningStartCell(this), |
675 Section()->ResolveColor(start_color_property), | 671 Section()->ResolveColor(start_color_property), |
676 kBorderPrecedenceRowGroup)); | 672 kBorderPrecedenceRowGroup)); |
677 if (!result.Exists()) | 673 if (!result.Exists()) |
678 return result; | 674 return result; |
679 } | 675 } |
680 | 676 |
681 // (5) Our column and column group's start borders. | 677 // (5) Our column and column group's start borders. |
682 LayoutTable::ColAndColGroup col_and_col_group = | 678 auto start_col = GetColAndColGroup(); |
683 table->ColElementAtAbsoluteColumn(AbsoluteColumnIndex()); | 679 if (start_col.colgroup && start_col.adjoins_start_border_of_col_group) { |
684 if (col_and_col_group.colgroup && | |
685 col_and_col_group.adjoins_start_border_of_col_group) { | |
686 // Only apply the colgroup's border if this cell touches the colgroup edge. | 680 // Only apply the colgroup's border if this cell touches the colgroup edge. |
687 result = ChooseBorder( | 681 result = ChooseBorder( |
688 result, | 682 result, CollapsedBorderValue( |
689 CollapsedBorderValue( | 683 start_col.colgroup->BorderAdjoiningCellStartBorder(this), |
690 col_and_col_group.colgroup->BorderAdjoiningCellStartBorder(this), | 684 start_col.colgroup->ResolveColor(start_color_property), |
691 col_and_col_group.colgroup->ResolveColor(start_color_property), | 685 kBorderPrecedenceColumnGroup)); |
692 kBorderPrecedenceColumnGroup)); | |
693 if (!result.Exists()) | 686 if (!result.Exists()) |
694 return result; | 687 return result; |
695 } | 688 } |
696 if (col_and_col_group.col) { | 689 if (start_col.col) { |
697 // Always apply the col's border irrespective of whether this cell touches | 690 // Always apply the col's border irrespective of whether this cell touches |
698 // it. This is per HTML5: "For the purposes of the CSS table model, the col | 691 // it. This is per HTML5: "For the purposes of the CSS table model, the col |
699 // element is expected to be treated as if it "was present as many times as | 692 // element is expected to be treated as if it "was present as many times as |
700 // its span attribute specifies". | 693 // its span attribute specifies". |
701 result = ChooseBorder( | 694 result = ChooseBorder( |
702 result, CollapsedBorderValue( | 695 result, CollapsedBorderValue( |
703 col_and_col_group.col->BorderAdjoiningCellStartBorder(this), | 696 start_col.col->BorderAdjoiningCellStartBorder(this), |
704 col_and_col_group.col->ResolveColor(start_color_property), | 697 start_col.col->ResolveColor(start_color_property), |
705 kBorderPrecedenceColumn)); | 698 kBorderPrecedenceColumn)); |
706 if (!result.Exists()) | 699 if (!result.Exists()) |
707 return result; | 700 return result; |
708 } | 701 } |
709 | 702 |
710 // (6) The end border of the preceding column. | 703 // (6) The end border of the preceding column. |
711 if (cell_before) { | 704 if (cell_before) { |
712 LayoutTable::ColAndColGroup col_and_col_group = | 705 auto col_before = |
713 table->ColElementAtAbsoluteColumn(AbsoluteColumnIndex() - 1); | 706 table->ColAndColGroupAtEffectiveColumn(EffectiveColumnIndex() - 1); |
714 // Only apply the colgroup's border if this cell touches the colgroup edge. | 707 // Only apply the colgroup's border if this cell touches the colgroup edge. |
715 if (col_and_col_group.colgroup && | 708 if (col_before.colgroup && col_before.adjoins_end_border_of_col_group) { |
716 col_and_col_group.adjoins_end_border_of_col_group) { | |
717 result = ChooseBorder( | 709 result = ChooseBorder( |
718 CollapsedBorderValue( | 710 CollapsedBorderValue( |
719 col_and_col_group.colgroup->BorderAdjoiningCellEndBorder(this), | 711 col_before.colgroup->BorderAdjoiningCellEndBorder(this), |
720 col_and_col_group.colgroup->ResolveColor(end_color_property), | 712 col_before.colgroup->ResolveColor(end_color_property), |
721 kBorderPrecedenceColumnGroup), | 713 kBorderPrecedenceColumnGroup), |
722 result); | 714 result); |
723 if (!result.Exists()) | 715 if (!result.Exists()) |
724 return result; | 716 return result; |
725 } | 717 } |
726 // Always apply the col's border irrespective of whether this cell touches | 718 // Always apply the col's border irrespective of whether this cell touches |
727 // it. This is per HTML5: "For the purposes of the CSS table model, the col | 719 // it. This is per HTML5: "For the purposes of the CSS table model, the col |
728 // element is expected to be treated as if it "was present as many times as | 720 // element is expected to be treated as if it "was present as many times as |
729 // its span attribute specifies". | 721 // its span attribute specifies". |
730 if (col_and_col_group.col) { | 722 if (col_before.col) { |
731 result = ChooseBorder( | 723 result = ChooseBorder( |
732 CollapsedBorderValue( | 724 CollapsedBorderValue(col_before.col->BorderAdjoiningCellAfter(this), |
733 col_and_col_group.col->BorderAdjoiningCellAfter(this), | 725 col_before.col->ResolveColor(end_color_property), |
734 col_and_col_group.col->ResolveColor(end_color_property), | 726 kBorderPrecedenceColumn), |
735 kBorderPrecedenceColumn), | |
736 result); | 727 result); |
737 if (!result.Exists()) | 728 if (!result.Exists()) |
738 return result; | 729 return result; |
739 } | 730 } |
740 } | 731 } |
741 | 732 |
742 if (start_border_adjoins_table) { | 733 if (start_border_adjoins_table) { |
743 // (7) The table's start border. | 734 // (7) The table's start border. |
744 result = ChooseBorder( | 735 result = ChooseBorder( |
745 result, CollapsedBorderValue(table->TableStartBorderAdjoiningCell(this), | 736 result, CollapsedBorderValue(table->TableStartBorderAdjoiningCell(this), |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 result = ChooseBorder( | 793 result = ChooseBorder( |
803 result, | 794 result, |
804 CollapsedBorderValue(Section()->BorderAdjoiningEndCell(this), | 795 CollapsedBorderValue(Section()->BorderAdjoiningEndCell(this), |
805 Section()->ResolveColor(end_color_property), | 796 Section()->ResolveColor(end_color_property), |
806 kBorderPrecedenceRowGroup)); | 797 kBorderPrecedenceRowGroup)); |
807 if (!result.Exists()) | 798 if (!result.Exists()) |
808 return result; | 799 return result; |
809 } | 800 } |
810 | 801 |
811 // (5) Our column and column group's end borders. | 802 // (5) Our column and column group's end borders. |
812 LayoutTable::ColAndColGroup col_and_col_group = | 803 auto end_col = table->ColAndColGroupAtEffectiveColumn( |
813 table->ColElementAtAbsoluteColumn(AbsoluteColumnIndex() + ColSpan() - 1); | 804 EffectiveColumnIndexOfCellAfter() - 1); |
814 if (col_and_col_group.colgroup && | 805 if (end_col.colgroup && end_col.adjoins_end_border_of_col_group) { |
815 col_and_col_group.adjoins_end_border_of_col_group) { | |
816 // Only apply the colgroup's border if this cell touches the colgroup edge. | 806 // Only apply the colgroup's border if this cell touches the colgroup edge. |
817 result = ChooseBorder( | 807 result = ChooseBorder( |
818 result, | 808 result, CollapsedBorderValue( |
819 CollapsedBorderValue( | 809 end_col.colgroup->BorderAdjoiningCellEndBorder(this), |
820 col_and_col_group.colgroup->BorderAdjoiningCellEndBorder(this), | 810 end_col.colgroup->ResolveColor(end_color_property), |
821 col_and_col_group.colgroup->ResolveColor(end_color_property), | 811 kBorderPrecedenceColumnGroup)); |
822 kBorderPrecedenceColumnGroup)); | |
823 if (!result.Exists()) | 812 if (!result.Exists()) |
824 return result; | 813 return result; |
825 } | 814 } |
826 if (col_and_col_group.col) { | 815 if (end_col.col) { |
827 // Always apply the col's border irrespective of whether this cell touches | 816 // Always apply the col's border irrespective of whether this cell touches |
828 // it. This is per HTML5: "For the purposes of the CSS table model, the col | 817 // it. This is per HTML5: "For the purposes of the CSS table model, the col |
829 // element is expected to be treated as if it "was present as many times as | 818 // element is expected to be treated as if it "was present as many times as |
830 // its span attribute specifies". | 819 // its span attribute specifies". |
831 result = ChooseBorder( | 820 result = ChooseBorder( |
832 result, CollapsedBorderValue( | 821 result, |
833 col_and_col_group.col->BorderAdjoiningCellEndBorder(this), | 822 CollapsedBorderValue(end_col.col->BorderAdjoiningCellEndBorder(this), |
834 col_and_col_group.col->ResolveColor(end_color_property), | 823 end_col.col->ResolveColor(end_color_property), |
835 kBorderPrecedenceColumn)); | 824 kBorderPrecedenceColumn)); |
836 if (!result.Exists()) | 825 if (!result.Exists()) |
837 return result; | 826 return result; |
838 } | 827 } |
839 | 828 |
840 // (6) The start border of the next column. | 829 // (6) The start border of the next column. |
841 if (!is_end_column) { | 830 if (!is_end_column) { |
842 LayoutTable::ColAndColGroup col_and_col_group = | 831 auto col_after = table->ColAndColGroupAtEffectiveColumn( |
843 table->ColElementAtAbsoluteColumn(AbsoluteColumnIndex() + ColSpan()); | 832 EffectiveColumnIndexOfCellAfter()); |
844 if (col_and_col_group.colgroup && | 833 if (col_after.colgroup && col_after.adjoins_start_border_of_col_group) { |
845 col_and_col_group.adjoins_start_border_of_col_group) { | |
846 // Only apply the colgroup's border if this cell touches the colgroup | 834 // Only apply the colgroup's border if this cell touches the colgroup |
847 // edge. | 835 // edge. |
848 result = ChooseBorder( | 836 result = ChooseBorder( |
849 result, | 837 result, CollapsedBorderValue( |
850 CollapsedBorderValue( | 838 col_after.colgroup->BorderAdjoiningCellStartBorder(this), |
851 col_and_col_group.colgroup->BorderAdjoiningCellStartBorder(this), | 839 col_after.colgroup->ResolveColor(start_color_property), |
852 col_and_col_group.colgroup->ResolveColor(start_color_property), | 840 kBorderPrecedenceColumnGroup)); |
853 kBorderPrecedenceColumnGroup)); | |
854 if (!result.Exists()) | 841 if (!result.Exists()) |
855 return result; | 842 return result; |
856 } | 843 } |
857 if (col_and_col_group.col) { | 844 if (col_after.col) { |
858 // Always apply the col's border irrespective of whether this cell touches | 845 // Always apply the col's border irrespective of whether this cell touches |
859 // it. This is per HTML5: "For the purposes of the CSS table model, the | 846 // it. This is per HTML5: "For the purposes of the CSS table model, the |
860 // col element is expected to be treated as if it "was present as many | 847 // col element is expected to be treated as if it "was present as many |
861 // times as its span attribute specifies". | 848 // times as its span attribute specifies". |
862 result = ChooseBorder( | 849 result = ChooseBorder( |
863 result, CollapsedBorderValue( | 850 result, CollapsedBorderValue( |
864 col_and_col_group.col->BorderAdjoiningCellBefore(this), | 851 col_after.col->BorderAdjoiningCellBefore(this), |
865 col_and_col_group.col->ResolveColor(start_color_property), | 852 col_after.col->ResolveColor(start_color_property), |
866 kBorderPrecedenceColumn)); | 853 kBorderPrecedenceColumn)); |
867 if (!result.Exists()) | 854 if (!result.Exists()) |
868 return result; | 855 return result; |
869 } | 856 } |
870 } | 857 } |
871 | 858 |
872 if (end_border_adjoins_table) { | 859 if (end_border_adjoins_table) { |
873 // (7) The table's end border. | 860 // (7) The table's end border. |
874 result = ChooseBorder( | 861 result = ChooseBorder( |
875 result, CollapsedBorderValue(table->TableEndBorderAdjoiningCell(this), | 862 result, CollapsedBorderValue(table->TableEndBorderAdjoiningCell(this), |
876 table->ResolveColor(end_color_property), | 863 table->ResolveColor(end_color_property), |
877 kBorderPrecedenceTable)); | 864 kBorderPrecedenceTable)); |
878 if (!result.Exists()) | 865 if (!result.Exists()) |
879 return result; | 866 return result; |
880 } | 867 } |
881 | 868 |
882 return result; | 869 return result; |
883 } | 870 } |
884 | 871 |
885 CollapsedBorderValue LayoutTableCell::ComputeCollapsedBeforeBorder() const { | 872 CollapsedBorderValue LayoutTableCell::ComputeCollapsedBeforeBorder() const { |
886 LayoutTable* table = this->Table(); | 873 LayoutTable* table = this->Table(); |
887 LayoutTableCell* prev_cell = table->CellAbove(this); | 874 LayoutTableCell* prev_cell = table->CellAbove(this); |
888 // We can use the border shared with |prev_cell| if it is valid. | 875 // We can use the border shared with |prev_cell| if it is valid. |
889 if (prev_cell && prev_cell->collapsed_border_values_valid_ && | 876 if (prev_cell && prev_cell->collapsed_border_values_valid_ && |
890 prev_cell->AbsoluteColumnIndex() == AbsoluteColumnIndex()) { | 877 prev_cell->EffectiveColumnIndex() == EffectiveColumnIndex()) { |
891 return prev_cell->GetCollapsedBorderValues() | 878 return prev_cell->GetCollapsedBorderValues() |
892 ? prev_cell->GetCollapsedBorderValues()->AfterBorder() | 879 ? prev_cell->GetCollapsedBorderValues()->AfterBorder() |
893 : CollapsedBorderValue(); | 880 : CollapsedBorderValue(); |
894 } | 881 } |
895 | 882 |
896 // For before border, we need to check, in order of precedence: | 883 // For before border, we need to check, in order of precedence: |
897 // (1) Our before border. | 884 // (1) Our before border. |
898 int before_color_property = | 885 int before_color_property = |
899 ResolveBorderProperty(CSSPropertyWebkitBorderBeforeColor); | 886 ResolveBorderProperty(CSSPropertyWebkitBorderBeforeColor); |
900 int after_color_property = | 887 int after_color_property = |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 curr_section->ResolveColor(after_color_property), | 949 curr_section->ResolveColor(after_color_property), |
963 kBorderPrecedenceRowGroup), | 950 kBorderPrecedenceRowGroup), |
964 result); | 951 result); |
965 if (!result.Exists()) | 952 if (!result.Exists()) |
966 return result; | 953 return result; |
967 } | 954 } |
968 } | 955 } |
969 | 956 |
970 if (!curr_section) { | 957 if (!curr_section) { |
971 // (8) Our column and column group's before borders. | 958 // (8) Our column and column group's before borders. |
972 LayoutTableCol* col_elt = | 959 LayoutTableCol* col_elt = GetColAndColGroup().InnermostColOrColGroup(); |
973 table->ColElementAtAbsoluteColumn(AbsoluteColumnIndex()) | |
974 .InnermostColOrColGroup(); | |
975 if (col_elt) { | 960 if (col_elt) { |
976 result = ChooseBorder( | 961 result = ChooseBorder( |
977 result, | 962 result, |
978 CollapsedBorderValue(col_elt->Style()->BorderBefore(), | 963 CollapsedBorderValue(col_elt->Style()->BorderBefore(), |
979 col_elt->ResolveColor(before_color_property), | 964 col_elt->ResolveColor(before_color_property), |
980 kBorderPrecedenceColumn)); | 965 kBorderPrecedenceColumn)); |
981 if (!result.Exists()) | 966 if (!result.Exists()) |
982 return result; | 967 return result; |
983 if (LayoutTableCol* enclosing_column_group = | 968 if (LayoutTableCol* enclosing_column_group = |
984 col_elt->EnclosingColumnGroup()) { | 969 col_elt->EnclosingColumnGroup()) { |
(...skipping 18 matching lines...) Expand all Loading... |
1003 } | 988 } |
1004 | 989 |
1005 return result; | 990 return result; |
1006 } | 991 } |
1007 | 992 |
1008 CollapsedBorderValue LayoutTableCell::ComputeCollapsedAfterBorder() const { | 993 CollapsedBorderValue LayoutTableCell::ComputeCollapsedAfterBorder() const { |
1009 LayoutTable* table = this->Table(); | 994 LayoutTable* table = this->Table(); |
1010 LayoutTableCell* next_cell = table->CellBelow(this); | 995 LayoutTableCell* next_cell = table->CellBelow(this); |
1011 // We can use the border shared with |next_cell| if it is valid. | 996 // We can use the border shared with |next_cell| if it is valid. |
1012 if (next_cell && next_cell->collapsed_border_values_valid_ && | 997 if (next_cell && next_cell->collapsed_border_values_valid_ && |
1013 next_cell->AbsoluteColumnIndex() == AbsoluteColumnIndex()) { | 998 next_cell->EffectiveColumnIndex() == EffectiveColumnIndex()) { |
1014 return next_cell->GetCollapsedBorderValues() | 999 return next_cell->GetCollapsedBorderValues() |
1015 ? next_cell->GetCollapsedBorderValues()->BeforeBorder() | 1000 ? next_cell->GetCollapsedBorderValues()->BeforeBorder() |
1016 : CollapsedBorderValue(); | 1001 : CollapsedBorderValue(); |
1017 } | 1002 } |
1018 | 1003 |
1019 // For after border, we need to check, in order of precedence: | 1004 // For after border, we need to check, in order of precedence: |
1020 // (1) Our after border. | 1005 // (1) Our after border. |
1021 int before_color_property = | 1006 int before_color_property = |
1022 ResolveBorderProperty(CSSPropertyWebkitBorderBeforeColor); | 1007 ResolveBorderProperty(CSSPropertyWebkitBorderBeforeColor); |
1023 int after_color_property = | 1008 int after_color_property = |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1076 curr_section->Style()->BorderBefore(), | 1061 curr_section->Style()->BorderBefore(), |
1077 curr_section->ResolveColor(before_color_property), | 1062 curr_section->ResolveColor(before_color_property), |
1078 kBorderPrecedenceRowGroup)); | 1063 kBorderPrecedenceRowGroup)); |
1079 if (!result.Exists()) | 1064 if (!result.Exists()) |
1080 return result; | 1065 return result; |
1081 } | 1066 } |
1082 } | 1067 } |
1083 | 1068 |
1084 if (!curr_section) { | 1069 if (!curr_section) { |
1085 // (8) Our column and column group's after borders. | 1070 // (8) Our column and column group's after borders. |
1086 LayoutTableCol* col_elt = | 1071 LayoutTableCol* col_elt = GetColAndColGroup().InnermostColOrColGroup(); |
1087 table->ColElementAtAbsoluteColumn(AbsoluteColumnIndex()) | |
1088 .InnermostColOrColGroup(); | |
1089 if (col_elt) { | 1072 if (col_elt) { |
1090 result = ChooseBorder( | 1073 result = ChooseBorder( |
1091 result, | 1074 result, |
1092 CollapsedBorderValue(col_elt->Style()->BorderAfter(), | 1075 CollapsedBorderValue(col_elt->Style()->BorderAfter(), |
1093 col_elt->ResolveColor(after_color_property), | 1076 col_elt->ResolveColor(after_color_property), |
1094 kBorderPrecedenceColumn)); | 1077 kBorderPrecedenceColumn)); |
1095 if (!result.Exists()) | 1078 if (!result.Exists()) |
1096 return result; | 1079 return result; |
1097 if (LayoutTableCol* enclosing_column_group = | 1080 if (LayoutTableCol* enclosing_column_group = |
1098 col_elt->EnclosingColumnGroup()) { | 1081 col_elt->EnclosingColumnGroup()) { |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1495 | 1478 |
1496 return LayoutBlock::HasLineIfEmpty(); | 1479 return LayoutBlock::HasLineIfEmpty(); |
1497 } | 1480 } |
1498 | 1481 |
1499 PaintInvalidationReason LayoutTableCell::InvalidatePaint( | 1482 PaintInvalidationReason LayoutTableCell::InvalidatePaint( |
1500 const PaintInvalidatorContext& context) const { | 1483 const PaintInvalidatorContext& context) const { |
1501 return TableCellPaintInvalidator(*this, context).InvalidatePaint(); | 1484 return TableCellPaintInvalidator(*this, context).InvalidatePaint(); |
1502 } | 1485 } |
1503 | 1486 |
1504 } // namespace blink | 1487 } // namespace blink |
OLD | NEW |