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

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

Issue 2595543003: Rename toV8(...) function in Blink to ToV8(...). (Closed)
Patch Set: Rebasing... Created 3 years, 11 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
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 ImageBuffer::create(WTF::wrapUnique( 86 ImageBuffer::create(WTF::wrapUnique(
87 new RecordingImageBufferSurface(size, nullptr /* fallbackFactory */, 87 new RecordingImageBufferSurface(size, nullptr /* fallbackFactory */,
88 m_hasAlpha ? NonOpaque : Opaque))), 88 m_hasAlpha ? NonOpaque : Opaque))),
89 m_hasAlpha, zoom); 89 m_hasAlpha, zoom);
90 PaintSize* paintSize = PaintSize::create(specifiedSize); 90 PaintSize* paintSize = PaintSize::create(specifiedSize);
91 StylePropertyMap* styleMap = FilteredComputedStylePropertyMap::create( 91 StylePropertyMap* styleMap = FilteredComputedStylePropertyMap::create(
92 CSSComputedStyleDeclaration::create(layoutObject.node()), 92 CSSComputedStyleDeclaration::create(layoutObject.node()),
93 m_nativeInvalidationProperties, m_customInvalidationProperties); 93 m_nativeInvalidationProperties, m_customInvalidationProperties);
94 94
95 v8::Local<v8::Value> argv[] = { 95 v8::Local<v8::Value> argv[] = {
96 toV8(renderingContext, m_scriptState->context()->Global(), isolate), 96 ToV8(renderingContext, m_scriptState->context()->Global(), isolate),
97 toV8(paintSize, m_scriptState->context()->Global(), isolate), 97 ToV8(paintSize, m_scriptState->context()->Global(), isolate),
98 toV8(styleMap, m_scriptState->context()->Global(), isolate)}; 98 ToV8(styleMap, m_scriptState->context()->Global(), isolate)};
99 99
100 v8::Local<v8::Function> paint = m_paint.newLocal(isolate); 100 v8::Local<v8::Function> paint = m_paint.newLocal(isolate);
101 101
102 v8::TryCatch block(isolate); 102 v8::TryCatch block(isolate);
103 block.SetVerbose(true); 103 block.SetVerbose(true);
104 104
105 V8ScriptRunner::callFunction(paint, m_scriptState->getExecutionContext(), 105 V8ScriptRunner::callFunction(paint, m_scriptState->getExecutionContext(),
106 instance, 3, argv, isolate); 106 instance, 3, argv, isolate);
107 107
108 // The paint function may have produced an error, in which case produce an 108 // The paint function may have produced an error, in which case produce an
(...skipping 19 matching lines...) Expand all
128 v8::Local<v8::Object> paintInstance; 128 v8::Local<v8::Object> paintInstance;
129 if (V8ObjectConstructor::newInstance(isolate, constructor) 129 if (V8ObjectConstructor::newInstance(isolate, constructor)
130 .ToLocal(&paintInstance)) { 130 .ToLocal(&paintInstance)) {
131 m_instance.set(isolate, paintInstance); 131 m_instance.set(isolate, paintInstance);
132 } 132 }
133 133
134 m_didCallConstructor = true; 134 m_didCallConstructor = true;
135 } 135 }
136 136
137 } // namespace blink 137 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698