Пример #1
0
static PassRefPtr<AnimatableValue> createFromBorderImageLength(
    const BorderImageLength& borderImageLength,
    const ComputedStyle& style) {
  if (borderImageLength.isNumber())
    return createFromDouble(borderImageLength.number());
  return createFromLength(borderImageLength.length(), style);
}
static LayoutUnit computeEdgeWidth(const BorderImageLength& borderSlice, int borderSide, const LayoutUnit& imageSide,
    const LayoutUnit& boxExtent)
{
    if (borderSlice.isNumber())
        return borderSlice.number() * borderSide;
    if (borderSlice.length().isAuto())
        return imageSide;
    return valueForLength(borderSlice.length(), boxExtent);
}