2017-02-13 03:02:29 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Servo-backed specified value store, to be used when mapping presentation
|
|
|
|
* attributes
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef mozilla_ServoSpecifiedValues_h
|
|
|
|
#define mozilla_ServoSpecifiedValues_h
|
|
|
|
|
|
|
|
#include "mozilla/GenericSpecifiedValues.h"
|
2017-06-14 02:38:16 +03:00
|
|
|
#include "mozilla/ServoBindingTypes.h"
|
2017-02-13 03:02:29 +03:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
2017-06-16 04:57:29 +03:00
|
|
|
class ServoSpecifiedValues final : public GenericSpecifiedValues
|
2017-02-13 03:02:29 +03:00
|
|
|
{
|
|
|
|
public:
|
2017-06-16 04:57:29 +03:00
|
|
|
ServoSpecifiedValues(nsPresContext* aContext,
|
|
|
|
RawServoDeclarationBlock* aDecl);
|
2017-02-13 03:02:29 +03:00
|
|
|
|
|
|
|
// GenericSpecifiedValues overrides
|
2017-02-13 03:02:29 +03:00
|
|
|
bool PropertyIsSet(nsCSSPropertyID aId);
|
2017-02-13 03:02:29 +03:00
|
|
|
|
2017-06-15 22:42:15 +03:00
|
|
|
void SetIdentStringValue(nsCSSPropertyID aId, const nsString& aValue);
|
2017-02-13 03:02:29 +03:00
|
|
|
|
2017-06-15 22:48:26 +03:00
|
|
|
void SetIdentAtomValue(nsCSSPropertyID aId, nsIAtom* aValue);
|
|
|
|
|
2017-06-15 22:42:15 +03:00
|
|
|
void SetKeywordValue(nsCSSPropertyID aId, int32_t aValue);
|
2017-02-13 03:02:29 +03:00
|
|
|
|
2017-06-15 22:42:15 +03:00
|
|
|
void SetIntValue(nsCSSPropertyID aId, int32_t aValue);
|
2017-02-13 03:02:29 +03:00
|
|
|
|
2017-06-15 22:42:15 +03:00
|
|
|
void SetPixelValue(nsCSSPropertyID aId, float aValue);
|
2017-02-13 03:02:29 +03:00
|
|
|
|
2017-06-15 22:42:15 +03:00
|
|
|
void SetLengthValue(nsCSSPropertyID aId, nsCSSValue aValue);
|
2017-04-10 10:28:48 +03:00
|
|
|
|
2017-06-15 22:42:15 +03:00
|
|
|
void SetNumberValue(nsCSSPropertyID aId, float aValue);
|
2017-04-10 10:28:48 +03:00
|
|
|
|
2017-06-15 22:42:15 +03:00
|
|
|
void SetPercentValue(nsCSSPropertyID aId, float aValue);
|
2017-02-13 03:02:29 +03:00
|
|
|
|
2017-02-13 03:02:29 +03:00
|
|
|
void SetAutoValue(nsCSSPropertyID aId);
|
2017-02-13 03:02:29 +03:00
|
|
|
|
2017-02-13 03:02:29 +03:00
|
|
|
void SetCurrentColor(nsCSSPropertyID aId);
|
2017-02-13 03:02:29 +03:00
|
|
|
|
2017-06-15 22:42:15 +03:00
|
|
|
void SetColorValue(nsCSSPropertyID aId, nscolor aValue);
|
2017-02-13 03:02:29 +03:00
|
|
|
|
2017-02-13 03:02:29 +03:00
|
|
|
void SetFontFamily(const nsString& aValue);
|
|
|
|
void SetTextDecorationColorOverride();
|
2017-04-10 10:28:48 +03:00
|
|
|
void SetBackgroundImage(nsAttrValue& aValue);
|
2017-02-13 03:02:29 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
RefPtr<RawServoDeclarationBlock> mDecl;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_ServoSpecifiedValues_h
|