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

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

Issue 2312293003: [CSSTypedOM] Computed StylePropertyMap use ComputedStyle for Lengths (Closed)
Patch Set: rebase Created 4 years, 2 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/core/css/cssom/WindowGetComputedStyle.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/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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 DCHECK(layoutObject.node()); 83 DCHECK(layoutObject.node());
84 84
85 PaintRenderingContext2D* renderingContext = PaintRenderingContext2D::create( 85 PaintRenderingContext2D* renderingContext = PaintRenderingContext2D::create(
86 ImageBuffer::create(wrapUnique( 86 ImageBuffer::create(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 layoutObject.node());
94 95
95 v8::Local<v8::Value> argv[] = { 96 v8::Local<v8::Value> argv[] = {
96 toV8(renderingContext, m_scriptState->context()->Global(), isolate), 97 toV8(renderingContext, m_scriptState->context()->Global(), isolate),
97 toV8(paintSize, m_scriptState->context()->Global(), isolate), 98 toV8(paintSize, m_scriptState->context()->Global(), isolate),
98 toV8(styleMap, m_scriptState->context()->Global(), isolate)}; 99 toV8(styleMap, m_scriptState->context()->Global(), isolate)};
99 100
100 v8::Local<v8::Function> paint = m_paint.newLocal(isolate); 101 v8::Local<v8::Function> paint = m_paint.newLocal(isolate);
101 102
102 v8::TryCatch block(isolate); 103 v8::TryCatch block(isolate);
103 block.SetVerbose(true); 104 block.SetVerbose(true);
(...skipping 24 matching lines...) Expand all
128 v8::Local<v8::Object> paintInstance; 129 v8::Local<v8::Object> paintInstance;
129 if (V8ObjectConstructor::newInstance(isolate, constructor) 130 if (V8ObjectConstructor::newInstance(isolate, constructor)
130 .ToLocal(&paintInstance)) { 131 .ToLocal(&paintInstance)) {
131 m_instance.set(isolate, paintInstance); 132 m_instance.set(isolate, paintInstance);
132 } 133 }
133 134
134 m_didCallConstructor = true; 135 m_didCallConstructor = true;
135 } 136 }
136 137
137 } // namespace blink 138 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/WindowGetComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698