CalculatedOr.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2023, Sam Atkins <atkinssj@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include "CalculatedOr.h"
  7. namespace Web::CSS {
  8. Angle AngleOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, Layout::Node const&) const
  9. {
  10. return calculated->resolve_angle().value();
  11. }
  12. Frequency FrequencyOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, Layout::Node const&) const
  13. {
  14. return calculated->resolve_frequency().value();
  15. }
  16. Length LengthOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, Layout::Node const& layout_node) const
  17. {
  18. return calculated->resolve_length(layout_node).value();
  19. }
  20. Percentage PercentageOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, Layout::Node const&) const
  21. {
  22. return calculated->resolve_percentage().value();
  23. }
  24. Time TimeOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, Layout::Node const&) const
  25. {
  26. return calculated->resolve_time().value();
  27. }
  28. }