normalize method

void normalize(
  1. double emValue
)

Implementation

void normalize(double emValue) {
  switch (unit) {
    case Unit.rem:
    // Because CSSBoxWidget doesn't have any information about any
    // sort of tree structure, treat rem the same as em. The HtmlParser
    // widget handles rem/em values before they get to CSSBoxWidget.
    case Unit.em:
      value *= emValue;
      unit = Unit.px;
      return;
    case Unit.px:
    case Unit.auto:
    case Unit.percent:
      return;
  }
}