OLD | NEW |
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 Loading... |
71 void V8CanvasRenderingContext2D::strokeStyleAttributeGetterCustom(v8::Local<v8::
String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 71 void V8CanvasRenderingContext2D::strokeStyleAttributeGetterCustom(v8::Local<v8::
String> name, const v8::PropertyCallbackInfo<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::
String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>&
info) | 77 void V8CanvasRenderingContext2D::strokeStyleAttributeSetterCustom(v8::Local<v8::
String> name, 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)); | 81 impl->setStrokeColor(toWebCoreString(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(v8::Local<v8::St
ring> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 86 void V8CanvasRenderingContext2D::fillStyleAttributeGetterCustom(v8::Local<v8::St
ring> name, const v8::PropertyCallbackInfo<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::St
ring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& in
fo) | 92 void V8CanvasRenderingContext2D::fillStyleAttributeSetterCustom(v8::Local<v8::St
ring> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& in
fo) |
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)); | 96 impl->setFillColor(toWebCoreString(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 |
OLD | NEW |