| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 enum ColorParseResult { | 45 enum ColorParseResult { |
| 46 kParsedRGBA, | 46 kParsedRGBA, |
| 47 kParsedCurrentColor, | 47 kParsedCurrentColor, |
| 48 kParsedSystemColor, | 48 kParsedSystemColor, |
| 49 kParseFailed | 49 kParseFailed |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 static ColorParseResult ParseColor(Color& parsed_color, | 52 static ColorParseResult ParseColor(Color& parsed_color, |
| 53 const String& color_string) { | 53 const String& color_string) { |
| 54 if (EqualIgnoringCase(color_string, "currentcolor")) | 54 if (DeprecatedEqualIgnoringCase(color_string, "currentcolor")) |
| 55 return kParsedCurrentColor; | 55 return kParsedCurrentColor; |
| 56 const bool kUseStrictParsing = true; | 56 const bool kUseStrictParsing = true; |
| 57 if (CSSParser::ParseColor(parsed_color, color_string, kUseStrictParsing)) | 57 if (CSSParser::ParseColor(parsed_color, color_string, kUseStrictParsing)) |
| 58 return kParsedRGBA; | 58 return kParsedRGBA; |
| 59 if (CSSParser::ParseSystemColor(parsed_color, color_string)) | 59 if (CSSParser::ParseSystemColor(parsed_color, color_string)) |
| 60 return kParsedSystemColor; | 60 return kParsedSystemColor; |
| 61 return kParseFailed; | 61 return kParseFailed; |
| 62 } | 62 } |
| 63 | 63 |
| 64 static Color CurrentColor(HTMLCanvasElement* canvas) { | 64 static Color CurrentColor(HTMLCanvasElement* canvas) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 ASSERT(type_ == kGradient || type_ == kImagePattern); | 131 ASSERT(type_ == kGradient || type_ == kImagePattern); |
| 132 return Color::kBlack; | 132 return Color::kBlack; |
| 133 } | 133 } |
| 134 | 134 |
| 135 DEFINE_TRACE(CanvasStyle) { | 135 DEFINE_TRACE(CanvasStyle) { |
| 136 visitor->Trace(gradient_); | 136 visitor->Trace(gradient_); |
| 137 visitor->Trace(pattern_); | 137 visitor->Trace(pattern_); |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace blink | 140 } // namespace blink |
| OLD | NEW |