Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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 : /*
8 : * Servo-backed specified value store, to be used when mapping presentation
9 : * attributes
10 : */
11 :
12 : #ifndef mozilla_ServoSpecifiedValues_h
13 : #define mozilla_ServoSpecifiedValues_h
14 :
15 : #include "mozilla/GenericSpecifiedValues.h"
16 : #include "mozilla/ServoBindingTypes.h"
17 :
18 : namespace mozilla {
19 :
20 0 : class ServoSpecifiedValues final : public GenericSpecifiedValues
21 : {
22 : public:
23 : ServoSpecifiedValues(nsPresContext* aContext,
24 : RawServoDeclarationBlock* aDecl);
25 :
26 : // GenericSpecifiedValues overrides
27 : bool PropertyIsSet(nsCSSPropertyID aId);
28 :
29 : void SetIdentStringValue(nsCSSPropertyID aId, const nsString& aValue);
30 :
31 : void SetIdentAtomValue(nsCSSPropertyID aId, nsIAtom* aValue);
32 :
33 : void SetKeywordValue(nsCSSPropertyID aId, int32_t aValue);
34 :
35 : void SetIntValue(nsCSSPropertyID aId, int32_t aValue);
36 :
37 : void SetPixelValue(nsCSSPropertyID aId, float aValue);
38 :
39 : void SetLengthValue(nsCSSPropertyID aId, nsCSSValue aValue);
40 :
41 : void SetNumberValue(nsCSSPropertyID aId, float aValue);
42 :
43 : void SetPercentValue(nsCSSPropertyID aId, float aValue);
44 :
45 : void SetAutoValue(nsCSSPropertyID aId);
46 :
47 : void SetCurrentColor(nsCSSPropertyID aId);
48 :
49 : void SetColorValue(nsCSSPropertyID aId, nscolor aValue);
50 :
51 : void SetFontFamily(const nsString& aValue);
52 : void SetTextDecorationColorOverride();
53 : void SetBackgroundImage(nsAttrValue& aValue);
54 :
55 : private:
56 : RefPtr<RawServoDeclarationBlock> mDecl;
57 : };
58 :
59 : } // namespace mozilla
60 :
61 : #endif // mozilla_ServoSpecifiedValues_h
|