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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CSSPaintValue_h
6 #define CSSPaintValue_h
7
8 #include "core/css/CSSCustomIdentValue.h"
9 #include "core/css/CSSImageGeneratorValue.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13
14 class CSSPaintValue : public CSSImageGeneratorValue {
15 public:
16 static PassRefPtrWillBeRawPtr<CSSPaintValue> create(PassRefPtrWillBeRawPtr<C SSCustomIdentValue> name)
17 {
18 return adoptRefWillBeNoop(new CSSPaintValue(name));
19 }
20 ~CSSPaintValue();
21
22 String customCSSText() const;
23
24 String name() const;
25
26 PassRefPtr<Image> image(const LayoutObject*, const IntSize&);
27 bool isFixedSize() const { return false; }
28 IntSize fixedSize(const LayoutObject*) { return IntSize(); }
29
30 bool isPending() const { return false; }
31 bool knownToBeOpaque(const LayoutObject*) const { return false; }
32
33 void loadSubimages(Document*) { }
34
35 bool equals(const CSSPaintValue&) const;
36
37 DECLARE_TRACE_AFTER_DISPATCH();
38
39 private:
40 explicit CSSPaintValue(PassRefPtrWillBeRawPtr<CSSCustomIdentValue> name);
41
42 RefPtrWillBeMember<CSSCustomIdentValue> m_name;
43 };
44
45 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPaintValue, isPaintValue());
46
47 } // namespace blink
48
49 #endif // CSSPaintValue_h
OLDNEW
« 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