OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 return nullptr; | 141 return nullptr; |
142 } | 142 } |
143 } | 143 } |
144 | 144 |
145 PassRefPtrWillBeRawPtr<CanvasStyle> CanvasStyle::createFromStringWithOverrideAlp
ha(const String& color, float alpha) | 145 PassRefPtrWillBeRawPtr<CanvasStyle> CanvasStyle::createFromStringWithOverrideAlp
ha(const String& color, float alpha) |
146 { | 146 { |
147 RGBA32 rgba; | 147 RGBA32 rgba; |
148 ColorParseResult parseResult = parseColor(rgba, color); | 148 ColorParseResult parseResult = parseColor(rgba, color); |
149 switch (parseResult) { | 149 switch (parseResult) { |
150 case ParsedRGBA: | 150 case ParsedRGBA: |
| 151 case ParsedSystemColor: |
151 return adoptRefWillBeNoop(new CanvasStyle(colorWithOverrideAlpha(rgba, a
lpha))); | 152 return adoptRefWillBeNoop(new CanvasStyle(colorWithOverrideAlpha(rgba, a
lpha))); |
152 case ParsedCurrentColor: | 153 case ParsedCurrentColor: |
153 return adoptRefWillBeNoop(new CanvasStyle(CurrentColorWithOverrideAlpha,
alpha)); | 154 return adoptRefWillBeNoop(new CanvasStyle(CurrentColorWithOverrideAlpha,
alpha)); |
154 case ParseFailed: | 155 case ParseFailed: |
155 return nullptr; | 156 return nullptr; |
156 default: | 157 default: |
157 ASSERT_NOT_REACHED(); | 158 ASSERT_NOT_REACHED(); |
158 return nullptr; | 159 return nullptr; |
159 } | 160 } |
160 } | 161 } |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 } | 273 } |
273 } | 274 } |
274 | 275 |
275 void CanvasStyle::trace(Visitor* visitor) | 276 void CanvasStyle::trace(Visitor* visitor) |
276 { | 277 { |
277 visitor->trace(m_gradient); | 278 visitor->trace(m_gradient); |
278 visitor->trace(m_pattern); | 279 visitor->trace(m_pattern); |
279 } | 280 } |
280 | 281 |
281 } | 282 } |
OLD | NEW |