| OLD | NEW |
| 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/CSSPaintDefinition.h" | 5 #include "modules/csspaint/CSSPaintDefinition.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptState.h" | 7 #include "bindings/core/v8/ScriptState.h" |
| 8 #include "bindings/core/v8/V8Binding.h" | 8 #include "bindings/core/v8/V8Binding.h" |
| 9 #include "bindings/core/v8/V8BindingMacros.h" | 9 #include "bindings/core/v8/V8BindingMacros.h" |
| 10 #include "bindings/core/v8/V8ObjectConstructor.h" | 10 #include "bindings/core/v8/V8ObjectConstructor.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 return nullptr; | 88 return nullptr; |
| 89 | 89 |
| 90 DCHECK(layoutObject.node()); | 90 DCHECK(layoutObject.node()); |
| 91 | 91 |
| 92 PaintRenderingContext2D* renderingContext = PaintRenderingContext2D::create( | 92 PaintRenderingContext2D* renderingContext = PaintRenderingContext2D::create( |
| 93 ImageBuffer::create(WTF::wrapUnique( | 93 ImageBuffer::create(WTF::wrapUnique( |
| 94 new RecordingImageBufferSurface(size, nullptr /* fallbackFactory */, | 94 new RecordingImageBufferSurface(size, nullptr /* fallbackFactory */, |
| 95 m_hasAlpha ? NonOpaque : Opaque))), | 95 m_hasAlpha ? NonOpaque : Opaque))), |
| 96 m_hasAlpha, zoom); | 96 m_hasAlpha, zoom); |
| 97 PaintSize* paintSize = PaintSize::create(specifiedSize); | 97 PaintSize* paintSize = PaintSize::create(specifiedSize); |
| 98 StylePropertyMap* styleMap = FilteredComputedStylePropertyMap::create( | 98 StylePropertyMapReadonly* styleMap = FilteredComputedStylePropertyMap::create( |
| 99 CSSComputedStyleDeclaration::create(layoutObject.node()), | 99 CSSComputedStyleDeclaration::create(layoutObject.node()), |
| 100 m_nativeInvalidationProperties, m_customInvalidationProperties, | 100 m_nativeInvalidationProperties, m_customInvalidationProperties, |
| 101 layoutObject.node()); | 101 layoutObject.node()); |
| 102 | 102 |
| 103 v8::Local<v8::Value> argv[] = { | 103 v8::Local<v8::Value> argv[] = { |
| 104 ToV8(renderingContext, m_scriptState->context()->Global(), isolate), | 104 ToV8(renderingContext, m_scriptState->context()->Global(), isolate), |
| 105 ToV8(paintSize, m_scriptState->context()->Global(), isolate), | 105 ToV8(paintSize, m_scriptState->context()->Global(), isolate), |
| 106 ToV8(styleMap, m_scriptState->context()->Global(), isolate), | 106 ToV8(styleMap, m_scriptState->context()->Global(), isolate), |
| 107 ToV8(*paintArguments, m_scriptState->context()->Global(), isolate)}; | 107 ToV8(*paintArguments, m_scriptState->context()->Global(), isolate)}; |
| 108 | 108 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 137 v8::Local<v8::Object> paintInstance; | 137 v8::Local<v8::Object> paintInstance; |
| 138 if (V8ObjectConstructor::newInstance(isolate, constructor) | 138 if (V8ObjectConstructor::newInstance(isolate, constructor) |
| 139 .ToLocal(&paintInstance)) { | 139 .ToLocal(&paintInstance)) { |
| 140 m_instance.set(isolate, paintInstance); | 140 m_instance.set(isolate, paintInstance); |
| 141 } | 141 } |
| 142 | 142 |
| 143 m_didCallConstructor = true; | 143 m_didCallConstructor = true; |
| 144 } | 144 } |
| 145 | 145 |
| 146 } // namespace blink | 146 } // namespace blink |
| OLD | NEW |