| 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 16 matching lines...) Expand all Loading... |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "modules/canvas2d/CanvasStyle.h" | 29 #include "modules/canvas2d/CanvasStyle.h" |
| 30 | 30 |
| 31 #include "core/CSSPropertyNames.h" | 31 #include "core/CSSPropertyNames.h" |
| 32 #include "core/css/StylePropertySet.h" | 32 #include "core/css/StylePropertySet.h" |
| 33 #include "core/css/parser/CSSParser.h" | 33 #include "core/css/parser/CSSParser.h" |
| 34 #include "core/html/HTMLCanvasElement.h" | 34 #include "core/html/HTMLCanvasElement.h" |
| 35 #include "modules/canvas2d/CanvasGradient.h" | 35 #include "modules/canvas2d/CanvasGradient.h" |
| 36 #include "modules/canvas2d/CanvasPattern.h" | 36 #include "modules/canvas2d/CanvasPattern.h" |
| 37 #include "third_party/skia/include/core/SkShader.h" |
| 37 #include "wtf/PassRefPtr.h" | 38 #include "wtf/PassRefPtr.h" |
| 38 | 39 |
| 39 namespace blink { | 40 namespace blink { |
| 40 | 41 |
| 41 enum ColorParseResult { ParsedRGBA, ParsedCurrentColor, ParsedSystemColor, Parse
Failed }; | 42 enum ColorParseResult { ParsedRGBA, ParsedCurrentColor, ParsedSystemColor, Parse
Failed }; |
| 42 | 43 |
| 43 static ColorParseResult parseColor(Color& parsedColor, const String& colorString
) | 44 static ColorParseResult parseColor(Color& parsedColor, const String& colorString
) |
| 44 { | 45 { |
| 45 if (equalIgnoringCase(colorString, "currentcolor")) | 46 if (equalIgnoringCase(colorString, "currentcolor")) |
| 46 return ParsedCurrentColor; | 47 return ParsedCurrentColor; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 return Color::black; | 135 return Color::black; |
| 135 } | 136 } |
| 136 | 137 |
| 137 DEFINE_TRACE(CanvasStyle) | 138 DEFINE_TRACE(CanvasStyle) |
| 138 { | 139 { |
| 139 visitor->trace(m_gradient); | 140 visitor->trace(m_gradient); |
| 140 visitor->trace(m_pattern); | 141 visitor->trace(m_pattern); |
| 141 } | 142 } |
| 142 | 143 |
| 143 } // namespace blink | 144 } // namespace blink |
| OLD | NEW |