Commit e1c948be authored by Mason Freed's avatar Mason Freed Committed by Commit Bot

Replace manual case/switch with PlatformEnumToCSSValueID

This code previously had a hard-coded list of border styles,
which can instead be retrieved from the CSS value tables.

No behavior changes are expected.

Change-Id: Ib416ba444e5a99b28457007b41a09db83f5e16cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2373422
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801534}
parent 12647726
......@@ -26,6 +26,7 @@
#include "third_party/blink/renderer/core/layout/layout_tree_as_text.h"
#include "third_party/blink/renderer/core/css/css_property_value_set.h"
#include "third_party/blink/renderer/core/css/css_value_id_mappings.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_context.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/pseudo_element.h"
......@@ -72,40 +73,7 @@ namespace blink {
static void PrintBorderStyle(WTF::TextStream& ts,
const EBorderStyle border_style) {
switch (border_style) {
case EBorderStyle::kNone:
ts << "none";
break;
case EBorderStyle::kHidden:
ts << "hidden";
break;
case EBorderStyle::kInset:
ts << "inset";
break;
case EBorderStyle::kGroove:
ts << "groove";
break;
case EBorderStyle::kRidge:
ts << "ridge";
break;
case EBorderStyle::kOutset:
ts << "outset";
break;
case EBorderStyle::kDotted:
ts << "dotted";
break;
case EBorderStyle::kDashed:
ts << "dashed";
break;
case EBorderStyle::kSolid:
ts << "solid";
break;
case EBorderStyle::kDouble:
ts << "double";
break;
}
ts << " ";
ts << getValueName(PlatformEnumToCSSValueID(border_style)) << " ";
}
static String GetTagName(Node* n) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment