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

Side by Side Diff: third_party/WebKit/Source/modules/csspaint/CSSPaintImageGeneratorImpl.cpp

Issue 2054023002: [CSS Paint API] Add StylePropertyMap as an argument to the paint function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/modules/csspaint/CSSPaintImageGeneratorImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/csspaint/CSSPaintImageGeneratorImpl.h" 5 #include "modules/csspaint/CSSPaintImageGeneratorImpl.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/LocalDOMWindow.h" 8 #include "core/frame/LocalDOMWindow.h"
9 #include "modules/csspaint/CSSPaintDefinition.h" 9 #include "modules/csspaint/CSSPaintDefinition.h"
10 #include "modules/csspaint/PaintWorklet.h" 10 #include "modules/csspaint/PaintWorklet.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 void CSSPaintImageGeneratorImpl::setDefinition(CSSPaintDefinition* definition) 47 void CSSPaintImageGeneratorImpl::setDefinition(CSSPaintDefinition* definition)
48 { 48 {
49 ASSERT(!m_definition); 49 ASSERT(!m_definition);
50 m_definition = definition; 50 m_definition = definition;
51 51
52 ASSERT(m_observer); 52 ASSERT(m_observer);
53 m_observer->paintImageGeneratorReady(); 53 m_observer->paintImageGeneratorReady();
54 } 54 }
55 55
56 PassRefPtr<Image> CSSPaintImageGeneratorImpl::paint(const IntSize& size) 56 PassRefPtr<Image> CSSPaintImageGeneratorImpl::paint(const LayoutObject& layoutOb ject, const IntSize& size)
57 { 57 {
58 return m_definition ? m_definition->paint(size) : nullptr; 58 return m_definition ? m_definition->paint(layoutObject, size) : nullptr;
59 } 59 }
60 60
61 const Vector<CSSPropertyID>& CSSPaintImageGeneratorImpl::nativeInvalidationPrope rties() const 61 const Vector<CSSPropertyID>& CSSPaintImageGeneratorImpl::nativeInvalidationPrope rties() const
62 { 62 {
63 DEFINE_STATIC_LOCAL(Vector<CSSPropertyID>, emptyVector, ()); 63 DEFINE_STATIC_LOCAL(Vector<CSSPropertyID>, emptyVector, ());
64 return m_definition ? m_definition->nativeInvalidationProperties() : emptyVe ctor; 64 return m_definition ? m_definition->nativeInvalidationProperties() : emptyVe ctor;
65 } 65 }
66 66
67 const Vector<AtomicString>& CSSPaintImageGeneratorImpl::customInvalidationProper ties() const 67 const Vector<AtomicString>& CSSPaintImageGeneratorImpl::customInvalidationProper ties() const
68 { 68 {
69 DEFINE_STATIC_LOCAL(Vector<AtomicString>, emptyVector, ()); 69 DEFINE_STATIC_LOCAL(Vector<AtomicString>, emptyVector, ());
70 return m_definition ? m_definition->customInvalidationProperties() : emptyVe ctor; 70 return m_definition ? m_definition->customInvalidationProperties() : emptyVe ctor;
71 } 71 }
72 72
73 DEFINE_TRACE(CSSPaintImageGeneratorImpl) 73 DEFINE_TRACE(CSSPaintImageGeneratorImpl)
74 { 74 {
75 visitor->trace(m_definition); 75 visitor->trace(m_definition);
76 visitor->trace(m_observer); 76 visitor->trace(m_observer);
77 CSSPaintImageGenerator::trace(visitor); 77 CSSPaintImageGenerator::trace(visitor);
78 } 78 }
79 79
80 } // namespace blink 80 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/csspaint/CSSPaintImageGeneratorImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698