| 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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 ? cell_before->GetCollapsedBorderValues()->EndBorder() | 634 ? cell_before->GetCollapsedBorderValues()->EndBorder() |
| 635 : CollapsedBorderValue(); | 635 : CollapsedBorderValue(); |
| 636 } | 636 } |
| 637 | 637 |
| 638 // For the start border, we need to check, in order of precedence: | 638 // For the start border, we need to check, in order of precedence: |
| 639 // (1) Our start border. | 639 // (1) Our start border. |
| 640 int start_color_property = | 640 int start_color_property = |
| 641 ResolveBorderProperty(CSSPropertyWebkitBorderStartColor); | 641 ResolveBorderProperty(CSSPropertyWebkitBorderStartColor); |
| 642 int end_color_property = | 642 int end_color_property = |
| 643 ResolveBorderProperty(CSSPropertyWebkitBorderEndColor); | 643 ResolveBorderProperty(CSSPropertyWebkitBorderEndColor); |
| 644 CollapsedBorderValue result(Style()->BorderStart(), | 644 CollapsedBorderValue result( |
| 645 ResolveColor(start_color_property), | 645 Style()->BorderStartStyle(), Style()->BorderStartWidth(), |
| 646 kBorderPrecedenceCell); | 646 ResolveColor(start_color_property), kBorderPrecedenceCell); |
| 647 | 647 |
| 648 // (2) The end border of the preceding cell. | 648 // (2) The end border of the preceding cell. |
| 649 if (cell_before) { | 649 if (cell_before) { |
| 650 CollapsedBorderValue cell_before_adjoining_border = CollapsedBorderValue( | 650 CollapsedBorderValue cell_before_adjoining_border = CollapsedBorderValue( |
| 651 cell_before->BorderAdjoiningCellAfter(this), | 651 cell_before->BorderAdjoiningCellAfter(this), |
| 652 cell_before->ResolveColor(end_color_property), kBorderPrecedenceCell); | 652 cell_before->ResolveColor(end_color_property), kBorderPrecedenceCell); |
| 653 // |result| should be the 2nd argument as |cellBefore| should win in case of | 653 // |result| should be the 2nd argument as |cellBefore| should win in case of |
| 654 // equality per CSS 2.1 (Border conflict resolution, point 4). | 654 // equality per CSS 2.1 (Border conflict resolution, point 4). |
| 655 result = ChooseBorder(cell_before_adjoining_border, result); | 655 result = ChooseBorder(cell_before_adjoining_border, result); |
| 656 if (!result.Exists()) | 656 if (!result.Exists()) |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 : CollapsedBorderValue(); | 768 : CollapsedBorderValue(); |
| 769 } | 769 } |
| 770 | 770 |
| 771 // For end border, we need to check, in order of precedence: | 771 // For end border, we need to check, in order of precedence: |
| 772 // (1) Our end border. | 772 // (1) Our end border. |
| 773 int start_color_property = | 773 int start_color_property = |
| 774 ResolveBorderProperty(CSSPropertyWebkitBorderStartColor); | 774 ResolveBorderProperty(CSSPropertyWebkitBorderStartColor); |
| 775 int end_color_property = | 775 int end_color_property = |
| 776 ResolveBorderProperty(CSSPropertyWebkitBorderEndColor); | 776 ResolveBorderProperty(CSSPropertyWebkitBorderEndColor); |
| 777 CollapsedBorderValue result = CollapsedBorderValue( | 777 CollapsedBorderValue result = CollapsedBorderValue( |
| 778 Style()->BorderEnd(), ResolveColor(end_color_property), | 778 Style()->BorderEndStyle(), Style()->BorderEndWidth(), |
| 779 kBorderPrecedenceCell); | 779 ResolveColor(end_color_property), kBorderPrecedenceCell); |
| 780 | 780 |
| 781 // (2) The start border of the following cell. | 781 // (2) The start border of the following cell. |
| 782 if (cell_after) { | 782 if (cell_after) { |
| 783 CollapsedBorderValue cell_after_adjoining_border = CollapsedBorderValue( | 783 CollapsedBorderValue cell_after_adjoining_border = CollapsedBorderValue( |
| 784 cell_after->BorderAdjoiningCellBefore(this), | 784 cell_after->BorderAdjoiningCellBefore(this), |
| 785 cell_after->ResolveColor(start_color_property), kBorderPrecedenceCell); | 785 cell_after->ResolveColor(start_color_property), kBorderPrecedenceCell); |
| 786 result = ChooseBorder(result, cell_after_adjoining_border); | 786 result = ChooseBorder(result, cell_after_adjoining_border); |
| 787 if (!result.Exists()) | 787 if (!result.Exists()) |
| 788 return result; | 788 return result; |
| 789 } | 789 } |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 : CollapsedBorderValue(); | 893 : CollapsedBorderValue(); |
| 894 } | 894 } |
| 895 | 895 |
| 896 // For before border, we need to check, in order of precedence: | 896 // For before border, we need to check, in order of precedence: |
| 897 // (1) Our before border. | 897 // (1) Our before border. |
| 898 int before_color_property = | 898 int before_color_property = |
| 899 ResolveBorderProperty(CSSPropertyWebkitBorderBeforeColor); | 899 ResolveBorderProperty(CSSPropertyWebkitBorderBeforeColor); |
| 900 int after_color_property = | 900 int after_color_property = |
| 901 ResolveBorderProperty(CSSPropertyWebkitBorderAfterColor); | 901 ResolveBorderProperty(CSSPropertyWebkitBorderAfterColor); |
| 902 CollapsedBorderValue result = CollapsedBorderValue( | 902 CollapsedBorderValue result = CollapsedBorderValue( |
| 903 Style()->BorderBefore(), ResolveColor(before_color_property), | 903 Style()->BorderBeforeStyle(), Style()->BorderBeforeWidth(), |
| 904 kBorderPrecedenceCell); | 904 ResolveColor(before_color_property), kBorderPrecedenceCell); |
| 905 | 905 |
| 906 if (prev_cell) { | 906 if (prev_cell) { |
| 907 // (2) A before cell's after border. | 907 // (2) A before cell's after border. |
| 908 result = ChooseBorder( | 908 result = ChooseBorder( |
| 909 CollapsedBorderValue(prev_cell->Style()->BorderAfter(), | 909 CollapsedBorderValue(prev_cell->Style()->BorderAfterStyle(), |
| 910 prev_cell->Style()->BorderAfterWidth(), |
| 910 prev_cell->ResolveColor(after_color_property), | 911 prev_cell->ResolveColor(after_color_property), |
| 911 kBorderPrecedenceCell), | 912 kBorderPrecedenceCell), |
| 912 result); | 913 result); |
| 913 if (!result.Exists()) | 914 if (!result.Exists()) |
| 914 return result; | 915 return result; |
| 915 } | 916 } |
| 916 | 917 |
| 917 // (3) Our row's before border. | 918 // (3) Our row's before border. |
| 918 result = ChooseBorder( | 919 result = ChooseBorder( |
| 919 result, | 920 result, |
| 920 CollapsedBorderValue(Parent()->Style()->BorderBefore(), | 921 CollapsedBorderValue(Parent()->Style()->BorderBeforeStyle(), |
| 922 Parent()->Style()->BorderBeforeWidth(), |
| 921 Parent()->ResolveColor(before_color_property), | 923 Parent()->ResolveColor(before_color_property), |
| 922 kBorderPrecedenceRow)); | 924 kBorderPrecedenceRow)); |
| 923 if (!result.Exists()) | 925 if (!result.Exists()) |
| 924 return result; | 926 return result; |
| 925 | 927 |
| 926 // (4) The previous row's after border. | 928 // (4) The previous row's after border. |
| 927 if (prev_cell) { | 929 if (prev_cell) { |
| 928 LayoutObject* prev_row = nullptr; | 930 LayoutObject* prev_row = nullptr; |
| 929 if (prev_cell->Section() == Section()) | 931 if (prev_cell->Section() == Section()) |
| 930 prev_row = Parent()->PreviousSibling(); | 932 prev_row = Parent()->PreviousSibling(); |
| 931 else | 933 else |
| 932 prev_row = prev_cell->Section()->LastRow(); | 934 prev_row = prev_cell->Section()->LastRow(); |
| 933 | 935 |
| 934 if (prev_row) { | 936 if (prev_row) { |
| 935 result = ChooseBorder( | 937 result = ChooseBorder( |
| 936 CollapsedBorderValue(prev_row->Style()->BorderAfter(), | 938 CollapsedBorderValue(prev_row->Style()->BorderAfterStyle(), |
| 939 prev_row->Style()->BorderAfterWidth(), |
| 937 prev_row->ResolveColor(after_color_property), | 940 prev_row->ResolveColor(after_color_property), |
| 938 kBorderPrecedenceRow), | 941 kBorderPrecedenceRow), |
| 939 result); | 942 result); |
| 940 if (!result.Exists()) | 943 if (!result.Exists()) |
| 941 return result; | 944 return result; |
| 942 } | 945 } |
| 943 } | 946 } |
| 944 | 947 |
| 945 // Now check row groups. | 948 // Now check row groups. |
| 946 LayoutTableSection* curr_section = Section(); | 949 LayoutTableSection* curr_section = Section(); |
| 947 if (!RowIndex()) { | 950 if (!RowIndex()) { |
| 948 // (5) Our row group's before border. | 951 // (5) Our row group's before border. |
| 949 result = ChooseBorder( | 952 result = ChooseBorder( |
| 950 result, | 953 result, |
| 951 CollapsedBorderValue(curr_section->Style()->BorderBefore(), | 954 CollapsedBorderValue(curr_section->Style()->BorderBeforeStyle(), |
| 955 curr_section->Style()->BorderBeforeWidth(), |
| 952 curr_section->ResolveColor(before_color_property), | 956 curr_section->ResolveColor(before_color_property), |
| 953 kBorderPrecedenceRowGroup)); | 957 kBorderPrecedenceRowGroup)); |
| 954 if (!result.Exists()) | 958 if (!result.Exists()) |
| 955 return result; | 959 return result; |
| 956 | 960 |
| 957 // (6) Previous row group's after border. | 961 // (6) Previous row group's after border. |
| 958 curr_section = table->SectionAbove(curr_section, kSkipEmptySections); | 962 curr_section = table->SectionAbove(curr_section, kSkipEmptySections); |
| 959 if (curr_section) { | 963 if (curr_section) { |
| 960 result = ChooseBorder( | 964 result = ChooseBorder( |
| 961 CollapsedBorderValue(curr_section->Style()->BorderAfter(), | 965 CollapsedBorderValue(curr_section->Style()->BorderAfterStyle(), |
| 966 curr_section->Style()->BorderAfterWidth(), |
| 962 curr_section->ResolveColor(after_color_property), | 967 curr_section->ResolveColor(after_color_property), |
| 963 kBorderPrecedenceRowGroup), | 968 kBorderPrecedenceRowGroup), |
| 964 result); | 969 result); |
| 965 if (!result.Exists()) | 970 if (!result.Exists()) |
| 966 return result; | 971 return result; |
| 967 } | 972 } |
| 968 } | 973 } |
| 969 | 974 |
| 970 if (!curr_section) { | 975 if (!curr_section) { |
| 971 // (8) Our column and column group's before borders. | 976 // (8) Our column and column group's before borders. |
| 972 LayoutTableCol* col_elt = | 977 LayoutTableCol* col_elt = |
| 973 table->ColElementAtAbsoluteColumn(AbsoluteColumnIndex()) | 978 table->ColElementAtAbsoluteColumn(AbsoluteColumnIndex()) |
| 974 .InnermostColOrColGroup(); | 979 .InnermostColOrColGroup(); |
| 975 if (col_elt) { | 980 if (col_elt) { |
| 976 result = ChooseBorder( | 981 result = ChooseBorder( |
| 977 result, | 982 result, |
| 978 CollapsedBorderValue(col_elt->Style()->BorderBefore(), | 983 CollapsedBorderValue(col_elt->Style()->BorderBeforeStyle(), |
| 984 col_elt->Style()->BorderBeforeWidth(), |
| 979 col_elt->ResolveColor(before_color_property), | 985 col_elt->ResolveColor(before_color_property), |
| 980 kBorderPrecedenceColumn)); | 986 kBorderPrecedenceColumn)); |
| 981 if (!result.Exists()) | 987 if (!result.Exists()) |
| 982 return result; | 988 return result; |
| 983 if (LayoutTableCol* enclosing_column_group = | 989 if (LayoutTableCol* enclosing_column_group = |
| 984 col_elt->EnclosingColumnGroup()) { | 990 col_elt->EnclosingColumnGroup()) { |
| 985 result = ChooseBorder( | 991 result = ChooseBorder( |
| 986 result, | 992 result, |
| 987 CollapsedBorderValue( | 993 CollapsedBorderValue( |
| 988 enclosing_column_group->Style()->BorderBefore(), | 994 enclosing_column_group->Style()->BorderBeforeStyle(), |
| 995 enclosing_column_group->Style()->BorderBeforeWidth(), |
| 989 enclosing_column_group->ResolveColor(before_color_property), | 996 enclosing_column_group->ResolveColor(before_color_property), |
| 990 kBorderPrecedenceColumnGroup)); | 997 kBorderPrecedenceColumnGroup)); |
| 991 if (!result.Exists()) | 998 if (!result.Exists()) |
| 992 return result; | 999 return result; |
| 993 } | 1000 } |
| 994 } | 1001 } |
| 995 | 1002 |
| 996 // (9) The table's before border. | 1003 // (9) The table's before border. |
| 997 result = ChooseBorder( | 1004 result = ChooseBorder( |
| 998 result, CollapsedBorderValue(table->Style()->BorderBefore(), | 1005 result, CollapsedBorderValue(table->Style()->BorderBeforeStyle(), |
| 1006 table->Style()->BorderBeforeWidth(), |
| 999 table->ResolveColor(before_color_property), | 1007 table->ResolveColor(before_color_property), |
| 1000 kBorderPrecedenceTable)); | 1008 kBorderPrecedenceTable)); |
| 1001 if (!result.Exists()) | 1009 if (!result.Exists()) |
| 1002 return result; | 1010 return result; |
| 1003 } | 1011 } |
| 1004 | 1012 |
| 1005 return result; | 1013 return result; |
| 1006 } | 1014 } |
| 1007 | 1015 |
| 1008 CollapsedBorderValue LayoutTableCell::ComputeCollapsedAfterBorder() const { | 1016 CollapsedBorderValue LayoutTableCell::ComputeCollapsedAfterBorder() const { |
| 1009 LayoutTable* table = this->Table(); | 1017 LayoutTable* table = this->Table(); |
| 1010 LayoutTableCell* next_cell = table->CellBelow(this); | 1018 LayoutTableCell* next_cell = table->CellBelow(this); |
| 1011 // We can use the border shared with |next_cell| if it is valid. | 1019 // We can use the border shared with |next_cell| if it is valid. |
| 1012 if (next_cell && next_cell->collapsed_border_values_valid_ && | 1020 if (next_cell && next_cell->collapsed_border_values_valid_ && |
| 1013 next_cell->AbsoluteColumnIndex() == AbsoluteColumnIndex()) { | 1021 next_cell->AbsoluteColumnIndex() == AbsoluteColumnIndex()) { |
| 1014 return next_cell->GetCollapsedBorderValues() | 1022 return next_cell->GetCollapsedBorderValues() |
| 1015 ? next_cell->GetCollapsedBorderValues()->BeforeBorder() | 1023 ? next_cell->GetCollapsedBorderValues()->BeforeBorder() |
| 1016 : CollapsedBorderValue(); | 1024 : CollapsedBorderValue(); |
| 1017 } | 1025 } |
| 1018 | 1026 |
| 1019 // For after border, we need to check, in order of precedence: | 1027 // For after border, we need to check, in order of precedence: |
| 1020 // (1) Our after border. | 1028 // (1) Our after border. |
| 1021 int before_color_property = | 1029 int before_color_property = |
| 1022 ResolveBorderProperty(CSSPropertyWebkitBorderBeforeColor); | 1030 ResolveBorderProperty(CSSPropertyWebkitBorderBeforeColor); |
| 1023 int after_color_property = | 1031 int after_color_property = |
| 1024 ResolveBorderProperty(CSSPropertyWebkitBorderAfterColor); | 1032 ResolveBorderProperty(CSSPropertyWebkitBorderAfterColor); |
| 1025 CollapsedBorderValue result = CollapsedBorderValue( | 1033 CollapsedBorderValue result = CollapsedBorderValue( |
| 1026 Style()->BorderAfter(), ResolveColor(after_color_property), | 1034 Style()->BorderAfterStyle(), Style()->BorderAfterWidth(), |
| 1027 kBorderPrecedenceCell); | 1035 ResolveColor(after_color_property), kBorderPrecedenceCell); |
| 1028 | 1036 |
| 1029 if (next_cell) { | 1037 if (next_cell) { |
| 1030 // (2) An after cell's before border. | 1038 // (2) An after cell's before border. |
| 1031 result = ChooseBorder( | 1039 result = ChooseBorder( |
| 1032 result, | 1040 result, |
| 1033 CollapsedBorderValue(next_cell->Style()->BorderBefore(), | 1041 CollapsedBorderValue(next_cell->Style()->BorderBeforeStyle(), |
| 1042 next_cell->Style()->BorderBeforeWidth(), |
| 1034 next_cell->ResolveColor(before_color_property), | 1043 next_cell->ResolveColor(before_color_property), |
| 1035 kBorderPrecedenceCell)); | 1044 kBorderPrecedenceCell)); |
| 1036 if (!result.Exists()) | 1045 if (!result.Exists()) |
| 1037 return result; | 1046 return result; |
| 1038 } | 1047 } |
| 1039 | 1048 |
| 1040 // (3) Our row's after border. (FIXME: Deal with rowspan!) | 1049 // (3) Our row's after border. (FIXME: Deal with rowspan!) |
| 1041 result = ChooseBorder( | 1050 result = ChooseBorder( |
| 1042 result, CollapsedBorderValue(Parent()->Style()->BorderAfter(), | 1051 result, CollapsedBorderValue(Parent()->Style()->BorderAfterStyle(), |
| 1052 Parent()->Style()->BorderAfterWidth(), |
| 1043 Parent()->ResolveColor(after_color_property), | 1053 Parent()->ResolveColor(after_color_property), |
| 1044 kBorderPrecedenceRow)); | 1054 kBorderPrecedenceRow)); |
| 1045 if (!result.Exists()) | 1055 if (!result.Exists()) |
| 1046 return result; | 1056 return result; |
| 1047 | 1057 |
| 1048 // (4) The next row's before border. | 1058 // (4) The next row's before border. |
| 1049 if (next_cell) { | 1059 if (next_cell) { |
| 1050 result = ChooseBorder( | 1060 result = ChooseBorder( |
| 1051 result, CollapsedBorderValue( | 1061 result, CollapsedBorderValue( |
| 1052 next_cell->Parent()->Style()->BorderBefore(), | 1062 next_cell->Parent()->Style()->BorderBeforeStyle(), |
| 1063 next_cell->Parent()->Style()->BorderBeforeWidth(), |
| 1053 next_cell->Parent()->ResolveColor(before_color_property), | 1064 next_cell->Parent()->ResolveColor(before_color_property), |
| 1054 kBorderPrecedenceRow)); | 1065 kBorderPrecedenceRow)); |
| 1055 if (!result.Exists()) | 1066 if (!result.Exists()) |
| 1056 return result; | 1067 return result; |
| 1057 } | 1068 } |
| 1058 | 1069 |
| 1059 // Now check row groups. | 1070 // Now check row groups. |
| 1060 LayoutTableSection* curr_section = Section(); | 1071 LayoutTableSection* curr_section = Section(); |
| 1061 if (RowIndex() + RowSpan() >= curr_section->NumRows()) { | 1072 if (RowIndex() + RowSpan() >= curr_section->NumRows()) { |
| 1062 // (5) Our row group's after border. | 1073 // (5) Our row group's after border. |
| 1063 result = ChooseBorder( | 1074 result = ChooseBorder( |
| 1064 result, | 1075 result, |
| 1065 CollapsedBorderValue(curr_section->Style()->BorderAfter(), | 1076 CollapsedBorderValue(curr_section->Style()->BorderAfterStyle(), |
| 1077 curr_section->Style()->BorderAfterWidth(), |
| 1066 curr_section->ResolveColor(after_color_property), | 1078 curr_section->ResolveColor(after_color_property), |
| 1067 kBorderPrecedenceRowGroup)); | 1079 kBorderPrecedenceRowGroup)); |
| 1068 if (!result.Exists()) | 1080 if (!result.Exists()) |
| 1069 return result; | 1081 return result; |
| 1070 | 1082 |
| 1071 // (6) Following row group's before border. | 1083 // (6) Following row group's before border. |
| 1072 curr_section = table->SectionBelow(curr_section, kSkipEmptySections); | 1084 curr_section = table->SectionBelow(curr_section, kSkipEmptySections); |
| 1073 if (curr_section) { | 1085 if (curr_section) { |
| 1074 result = ChooseBorder( | 1086 result = ChooseBorder( |
| 1075 result, CollapsedBorderValue( | 1087 result, CollapsedBorderValue( |
| 1076 curr_section->Style()->BorderBefore(), | 1088 curr_section->Style()->BorderBeforeStyle(), |
| 1089 curr_section->Style()->BorderBeforeWidth(), |
| 1077 curr_section->ResolveColor(before_color_property), | 1090 curr_section->ResolveColor(before_color_property), |
| 1078 kBorderPrecedenceRowGroup)); | 1091 kBorderPrecedenceRowGroup)); |
| 1079 if (!result.Exists()) | 1092 if (!result.Exists()) |
| 1080 return result; | 1093 return result; |
| 1081 } | 1094 } |
| 1082 } | 1095 } |
| 1083 | 1096 |
| 1084 if (!curr_section) { | 1097 if (!curr_section) { |
| 1085 // (8) Our column and column group's after borders. | 1098 // (8) Our column and column group's after borders. |
| 1086 LayoutTableCol* col_elt = | 1099 LayoutTableCol* col_elt = |
| 1087 table->ColElementAtAbsoluteColumn(AbsoluteColumnIndex()) | 1100 table->ColElementAtAbsoluteColumn(AbsoluteColumnIndex()) |
| 1088 .InnermostColOrColGroup(); | 1101 .InnermostColOrColGroup(); |
| 1089 if (col_elt) { | 1102 if (col_elt) { |
| 1090 result = ChooseBorder( | 1103 result = ChooseBorder( |
| 1091 result, | 1104 result, |
| 1092 CollapsedBorderValue(col_elt->Style()->BorderAfter(), | 1105 CollapsedBorderValue(col_elt->Style()->BorderAfterStyle(), |
| 1106 col_elt->Style()->BorderAfterWidth(), |
| 1093 col_elt->ResolveColor(after_color_property), | 1107 col_elt->ResolveColor(after_color_property), |
| 1094 kBorderPrecedenceColumn)); | 1108 kBorderPrecedenceColumn)); |
| 1095 if (!result.Exists()) | 1109 if (!result.Exists()) |
| 1096 return result; | 1110 return result; |
| 1097 if (LayoutTableCol* enclosing_column_group = | 1111 if (LayoutTableCol* enclosing_column_group = |
| 1098 col_elt->EnclosingColumnGroup()) { | 1112 col_elt->EnclosingColumnGroup()) { |
| 1099 result = ChooseBorder( | 1113 result = ChooseBorder( |
| 1100 result, | 1114 result, |
| 1101 CollapsedBorderValue( | 1115 CollapsedBorderValue( |
| 1102 enclosing_column_group->Style()->BorderAfter(), | 1116 enclosing_column_group->Style()->BorderAfterStyle(), |
| 1117 enclosing_column_group->Style()->BorderAfterWidth(), |
| 1103 enclosing_column_group->ResolveColor(after_color_property), | 1118 enclosing_column_group->ResolveColor(after_color_property), |
| 1104 kBorderPrecedenceColumnGroup)); | 1119 kBorderPrecedenceColumnGroup)); |
| 1105 if (!result.Exists()) | 1120 if (!result.Exists()) |
| 1106 return result; | 1121 return result; |
| 1107 } | 1122 } |
| 1108 } | 1123 } |
| 1109 | 1124 |
| 1110 // (9) The table's after border. | 1125 // (9) The table's after border. |
| 1111 result = ChooseBorder( | 1126 result = ChooseBorder( |
| 1112 result, CollapsedBorderValue(table->Style()->BorderAfter(), | 1127 result, CollapsedBorderValue(table->Style()->BorderAfterStyle(), |
| 1128 table->Style()->BorderAfterWidth(), |
| 1113 table->ResolveColor(after_color_property), | 1129 table->ResolveColor(after_color_property), |
| 1114 kBorderPrecedenceTable)); | 1130 kBorderPrecedenceTable)); |
| 1115 if (!result.Exists()) | 1131 if (!result.Exists()) |
| 1116 return result; | 1132 return result; |
| 1117 } | 1133 } |
| 1118 | 1134 |
| 1119 return result; | 1135 return result; |
| 1120 } | 1136 } |
| 1121 | 1137 |
| 1122 LayoutUnit LayoutTableCell::BorderLeft() const { | 1138 LayoutUnit LayoutTableCell::BorderLeft() const { |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1495 | 1511 |
| 1496 return LayoutBlock::HasLineIfEmpty(); | 1512 return LayoutBlock::HasLineIfEmpty(); |
| 1497 } | 1513 } |
| 1498 | 1514 |
| 1499 PaintInvalidationReason LayoutTableCell::InvalidatePaint( | 1515 PaintInvalidationReason LayoutTableCell::InvalidatePaint( |
| 1500 const PaintInvalidatorContext& context) const { | 1516 const PaintInvalidatorContext& context) const { |
| 1501 return TableCellPaintInvalidator(*this, context).InvalidatePaint(); | 1517 return TableCellPaintInvalidator(*this, context).InvalidatePaint(); |
| 1502 } | 1518 } |
| 1503 | 1519 |
| 1504 } // namespace blink | 1520 } // namespace blink |
| OLD | NEW |