summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSReflectValue.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/css/CSSReflectValue.h')
-rw-r--r--Source/WebCore/css/CSSReflectValue.h37
1 files changed, 16 insertions, 21 deletions
diff --git a/Source/WebCore/css/CSSReflectValue.h b/Source/WebCore/css/CSSReflectValue.h
index 544c2341c..678bcdd4d 100644
--- a/Source/WebCore/css/CSSReflectValue.h
+++ b/Source/WebCore/css/CSSReflectValue.h
@@ -13,7 +13,7 @@
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -23,52 +23,47 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef CSSReflectValue_h
-#define CSSReflectValue_h
+#pragma once
#include "CSSReflectionDirection.h"
#include "CSSValue.h"
-#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
namespace WebCore {
class CSSPrimitiveValue;
-class CSSReflectValue : public CSSValue {
+class CSSReflectValue final : public CSSValue {
public:
- static PassRef<CSSReflectValue> create(PassRefPtr<CSSPrimitiveValue> direction,
- PassRefPtr<CSSPrimitiveValue> offset, PassRefPtr<CSSValue> mask)
+ static Ref<CSSReflectValue> create(Ref<CSSPrimitiveValue>&& direction, Ref<CSSPrimitiveValue>&& offset, RefPtr<CSSValue>&& mask)
{
- return adoptRef(*new CSSReflectValue(direction, offset, mask));
+ return adoptRef(*new CSSReflectValue(WTFMove(direction), WTFMove(offset), WTFMove(mask)));
}
- CSSPrimitiveValue* direction() const { return m_direction.get(); }
- CSSPrimitiveValue* offset() const { return m_offset.get(); }
+ CSSPrimitiveValue& direction() { return m_direction.get(); }
+ CSSPrimitiveValue& offset() { return m_offset.get(); }
+ const CSSPrimitiveValue& direction() const { return m_direction.get(); }
+ const CSSPrimitiveValue& offset() const { return m_offset.get(); }
CSSValue* mask() const { return m_mask.get(); }
String customCSSText() const;
- void addSubresourceStyleURLs(ListHashSet<URL>&, const StyleSheetContents*) const;
-
bool equals(const CSSReflectValue&) const;
private:
- CSSReflectValue(PassRefPtr<CSSPrimitiveValue> direction, PassRefPtr<CSSPrimitiveValue> offset, PassRefPtr<CSSValue> mask)
+ CSSReflectValue(Ref<CSSPrimitiveValue>&& direction, Ref<CSSPrimitiveValue>&& offset, RefPtr<CSSValue>&& mask)
: CSSValue(ReflectClass)
- , m_direction(direction)
- , m_offset(offset)
- , m_mask(mask)
+ , m_direction(WTFMove(direction))
+ , m_offset(WTFMove(offset))
+ , m_mask(WTFMove(mask))
{
}
- RefPtr<CSSPrimitiveValue> m_direction;
- RefPtr<CSSPrimitiveValue> m_offset;
+ Ref<CSSPrimitiveValue> m_direction;
+ Ref<CSSPrimitiveValue> m_offset;
RefPtr<CSSValue> m_mask;
};
-CSS_VALUE_TYPE_CASTS(CSSReflectValue, isReflectValue())
-
} // namespace WebCore
-#endif // CSSReflectValue_h
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSReflectValue, isReflectValue())