tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

CSSNumericValue.cpp (3018B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #include "mozilla/dom/CSSNumericValue.h"
      8 
      9 #include "mozilla/AlreadyAddRefed.h"
     10 #include "mozilla/ErrorResult.h"
     11 #include "mozilla/dom/BindingDeclarations.h"
     12 #include "mozilla/dom/CSSNumericValueBinding.h"
     13 
     14 namespace mozilla::dom {
     15 
     16 CSSNumericValue::CSSNumericValue(nsCOMPtr<nsISupports> aParent)
     17    : CSSStyleValue(std::move(aParent)) {}
     18 
     19 CSSNumericValue::CSSNumericValue(nsCOMPtr<nsISupports> aParent,
     20                                 ValueType aValueType)
     21    : CSSStyleValue(std::move(aParent), aValueType) {}
     22 
     23 JSObject* CSSNumericValue::WrapObject(JSContext* aCx,
     24                                      JS::Handle<JSObject*> aGivenProto) {
     25  return CSSNumericValue_Binding::Wrap(aCx, this, aGivenProto);
     26 }
     27 
     28 // start of CSSNumericValue Web IDL implementation
     29 
     30 already_AddRefed<CSSNumericValue> CSSNumericValue::Add(
     31    const Sequence<OwningCSSNumberish>& aValues, ErrorResult& aRv) {
     32  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     33  return nullptr;
     34 }
     35 
     36 already_AddRefed<CSSNumericValue> CSSNumericValue::Sub(
     37    const Sequence<OwningCSSNumberish>& aValues, ErrorResult& aRv) {
     38  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     39  return nullptr;
     40 }
     41 
     42 already_AddRefed<CSSNumericValue> CSSNumericValue::Mul(
     43    const Sequence<OwningCSSNumberish>& aValues, ErrorResult& aRv) {
     44  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     45  return nullptr;
     46 }
     47 
     48 already_AddRefed<CSSNumericValue> CSSNumericValue::Div(
     49    const Sequence<OwningCSSNumberish>& aValues, ErrorResult& aRv) {
     50  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     51  return nullptr;
     52 }
     53 
     54 already_AddRefed<CSSNumericValue> CSSNumericValue::Min(
     55    const Sequence<OwningCSSNumberish>& aValues, ErrorResult& aRv) {
     56  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     57  return nullptr;
     58 }
     59 
     60 already_AddRefed<CSSNumericValue> CSSNumericValue::Max(
     61    const Sequence<OwningCSSNumberish>& aValues, ErrorResult& aRv) {
     62  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     63  return nullptr;
     64 }
     65 
     66 bool CSSNumericValue::Equals(const Sequence<OwningCSSNumberish>& aValue) {
     67  return false;
     68 }
     69 
     70 already_AddRefed<CSSUnitValue> CSSNumericValue::To(const nsACString& aUnit,
     71                                                   ErrorResult& aRv) {
     72  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     73  return nullptr;
     74 }
     75 
     76 already_AddRefed<CSSMathSum> CSSNumericValue::ToSum(
     77    const Sequence<nsCString>& aUnits, ErrorResult& aRv) {
     78  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     79  return nullptr;
     80 }
     81 
     82 void CSSNumericValue::Type(CSSNumericType& aRetVal) {}
     83 
     84 // static
     85 already_AddRefed<CSSNumericValue> CSSNumericValue::Parse(
     86    const GlobalObject& aGlobal, const nsACString& aCssText, ErrorResult& aRv) {
     87  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     88  return nullptr;
     89 }
     90 
     91 // end of CSSNumericValue Web IDL implementation
     92 
     93 }  // namespace mozilla::dom