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

Side by Side Diff: Source/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp

Issue 113213002: Rename toWebCoreString*() utility methods to toCoreString*() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Keep "to" prefix Created 7 years 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 void V8CanvasRenderingContext2D::strokeStyleAttributeGetterCustom(const v8::Prop ertyCallbackInfo<v8::Value>& info) 71 void V8CanvasRenderingContext2D::strokeStyleAttributeGetterCustom(const v8::Prop ertyCallbackInfo<v8::Value>& info)
72 { 72 {
73 CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.H older()); 73 CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.H older());
74 v8SetReturnValue(info, toV8Object(impl->strokeStyle(), info.Holder(), info.G etIsolate())); 74 v8SetReturnValue(info, toV8Object(impl->strokeStyle(), info.Holder(), info.G etIsolate()));
75 } 75 }
76 76
77 void V8CanvasRenderingContext2D::strokeStyleAttributeSetterCustom(v8::Local<v8:: Value> value, const v8::PropertyCallbackInfo<void>& info) 77 void V8CanvasRenderingContext2D::strokeStyleAttributeSetterCustom(v8::Local<v8:: Value> value, const v8::PropertyCallbackInfo<void>& info)
78 { 78 {
79 CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.H older()); 79 CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.H older());
80 if (value->IsString()) 80 if (value->IsString())
81 impl->setStrokeColor(toWebCoreString(value.As<v8::String>())); 81 impl->setStrokeColor(toCoreString(value.As<v8::String>()));
82 else 82 else
83 impl->setStrokeStyle(toCanvasStyle(value, info.GetIsolate())); 83 impl->setStrokeStyle(toCanvasStyle(value, info.GetIsolate()));
84 } 84 }
85 85
86 void V8CanvasRenderingContext2D::fillStyleAttributeGetterCustom(const v8::Proper tyCallbackInfo<v8::Value>& info) 86 void V8CanvasRenderingContext2D::fillStyleAttributeGetterCustom(const v8::Proper tyCallbackInfo<v8::Value>& info)
87 { 87 {
88 CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.H older()); 88 CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.H older());
89 v8SetReturnValue(info, toV8Object(impl->fillStyle(), info.Holder(), info.Get Isolate())); 89 v8SetReturnValue(info, toV8Object(impl->fillStyle(), info.Holder(), info.Get Isolate()));
90 } 90 }
91 91
92 void V8CanvasRenderingContext2D::fillStyleAttributeSetterCustom(v8::Local<v8::Va lue> value, const v8::PropertyCallbackInfo<void>& info) 92 void V8CanvasRenderingContext2D::fillStyleAttributeSetterCustom(v8::Local<v8::Va lue> value, const v8::PropertyCallbackInfo<void>& info)
93 { 93 {
94 CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.H older()); 94 CanvasRenderingContext2D* impl = V8CanvasRenderingContext2D::toNative(info.H older());
95 if (value->IsString()) 95 if (value->IsString())
96 impl->setFillColor(toWebCoreString(value.As<v8::String>())); 96 impl->setFillColor(toCoreString(value.As<v8::String>()));
97 else 97 else
98 impl->setFillStyle(toCanvasStyle(value, info.GetIsolate())); 98 impl->setFillStyle(toCanvasStyle(value, info.GetIsolate()));
99 } 99 }
100 100
101 } // namespace WebCore 101 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp ('k') | Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698