Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: third_party/WebKit/Source/core/css/CSSPaintValue.h

Issue 1782833008: Add paint() function as valid CSS <image> type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: name->customCSSText Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/CSSPaintValue.h
diff --git a/third_party/WebKit/Source/core/css/CSSPaintValue.h b/third_party/WebKit/Source/core/css/CSSPaintValue.h
new file mode 100644
index 0000000000000000000000000000000000000000..905b5784f6fb561321beee84878a0e561f9527a2
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/CSSPaintValue.h
@@ -0,0 +1,49 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CSSPaintValue_h
+#define CSSPaintValue_h
+
+#include "core/css/CSSCustomIdentValue.h"
+#include "core/css/CSSImageGeneratorValue.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class CSSPaintValue : public CSSImageGeneratorValue {
+public:
+ static PassRefPtrWillBeRawPtr<CSSPaintValue> create(PassRefPtrWillBeRawPtr<CSSCustomIdentValue> name)
+ {
+ return adoptRefWillBeNoop(new CSSPaintValue(name));
+ }
+ ~CSSPaintValue();
+
+ String customCSSText() const;
+
+ String name() const;
+
+ PassRefPtr<Image> image(const LayoutObject*, const IntSize&);
+ bool isFixedSize() const { return false; }
+ IntSize fixedSize(const LayoutObject*) { return IntSize(); }
+
+ bool isPending() const { return false; }
+ bool knownToBeOpaque(const LayoutObject*) const { return false; }
+
+ void loadSubimages(Document*) { }
+
+ bool equals(const CSSPaintValue&) const;
+
+ DECLARE_TRACE_AFTER_DISPATCH();
+
+private:
+ explicit CSSPaintValue(PassRefPtrWillBeRawPtr<CSSCustomIdentValue> name);
+
+ RefPtrWillBeMember<CSSCustomIdentValue> m_name;
+};
+
+DEFINE_CSS_VALUE_TYPE_CASTS(CSSPaintValue, isPaintValue());
+
+} // namespace blink
+
+#endif // CSSPaintValue_h
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSImageGeneratorValue.cpp ('k') | third_party/WebKit/Source/core/css/CSSPaintValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698