Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp

Issue 2896783002: Remove dependency on order of enum EBorderStyle (Closed)
Patch Set: Merge branch and make it dependent on https://codereview.chromium.org/2895933004 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
index 43fff52a63b93dc5e06f2071b587ca7f74a90c3b..bbe7690929d04d6e3e256850ff0f48bee10f4e18 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
@@ -1354,7 +1354,7 @@ int LayoutTableSection::CalcBlockDirectionOuterBorder(
side == kBorderBefore ? Style()->BorderBefore() : Style()->BorderAfter();
if (sb.Style() == EBorderStyle::kHidden)
return -1;
- if (sb.Style() > EBorderStyle::kHidden)
+ if (ComputedStyle::BorderStyleIsVisible(sb.Style()))
border_width = sb.Width();
const BorderValue& rb = side == kBorderBefore
@@ -1362,7 +1362,8 @@ int LayoutTableSection::CalcBlockDirectionOuterBorder(
: LastRow()->Style()->BorderAfter();
if (rb.Style() == EBorderStyle::kHidden)
return -1;
- if (rb.Style() > EBorderStyle::kHidden && rb.Width() > border_width)
+ if (ComputedStyle::BorderStyleIsVisible(rb.Style()) &&
+ rb.Width() > border_width)
border_width = rb.Width();
bool all_hidden = true;
@@ -1389,15 +1390,18 @@ int LayoutTableSection::CalcBlockDirectionOuterBorder(
cb.Style() == EBorderStyle::kHidden)
continue;
all_hidden = false;
- if (gb.Style() > EBorderStyle::kHidden && gb.Width() > border_width)
+ if (ComputedStyle::BorderStyleIsVisible(gb.Style()) &&
+ gb.Width() > border_width)
border_width = gb.Width();
- if (cb.Style() > EBorderStyle::kHidden && cb.Width() > border_width)
+ if (ComputedStyle::BorderStyleIsVisible(cb.Style()) &&
+ cb.Width() > border_width)
border_width = cb.Width();
} else {
if (cb.Style() == EBorderStyle::kHidden)
continue;
all_hidden = false;
- if (cb.Style() > EBorderStyle::kHidden && cb.Width() > border_width)
+ if (ComputedStyle::BorderStyleIsVisible(cb.Style()) &&
+ cb.Width() > border_width)
border_width = cb.Width();
}
}
@@ -1422,7 +1426,7 @@ int LayoutTableSection::CalcInlineDirectionOuterBorder(
side == kBorderStart ? Style()->BorderStart() : Style()->BorderEnd();
if (sb.Style() == EBorderStyle::kHidden)
return -1;
- if (sb.Style() > EBorderStyle::kHidden)
+ if (ComputedStyle::BorderStyleIsVisible(sb.Style()))
border_width = sb.Width();
if (LayoutTableCol* col = Table()
@@ -1432,7 +1436,8 @@ int LayoutTableSection::CalcInlineDirectionOuterBorder(
: col->Style()->BorderEnd();
if (gb.Style() == EBorderStyle::kHidden)
return -1;
- if (gb.Style() > EBorderStyle::kHidden && gb.Width() > border_width)
+ if (ComputedStyle::BorderStyleIsVisible(gb.Style()) &&
+ gb.Width() > border_width)
border_width = gb.Width();
}
@@ -1459,9 +1464,11 @@ int LayoutTableSection::CalcInlineDirectionOuterBorder(
rb.Style() == EBorderStyle::kHidden)
continue;
all_hidden = false;
- if (cb.Style() > EBorderStyle::kHidden && cb.Width() > border_width)
+ if (ComputedStyle::BorderStyleIsVisible(cb.Style()) &&
+ cb.Width() > border_width)
border_width = cb.Width();
- if (rb.Style() > EBorderStyle::kHidden && rb.Width() > border_width)
+ if (ComputedStyle::BorderStyleIsVisible(rb.Style()) &&
+ rb.Width() > border_width)
border_width = rb.Width();
}
if (all_hidden)
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698