| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // If |SVGPaintDescription::hasFallback| is true, |SVGPaintDescription::color| | 73 // If |SVGPaintDescription::hasFallback| is true, |SVGPaintDescription::color| |
| 74 // is set to a fallback color. | 74 // is set to a fallback color. |
| 75 struct SVGPaintDescription { | 75 struct SVGPaintDescription { |
| 76 STACK_ALLOCATED(); | 76 STACK_ALLOCATED(); |
| 77 SVGPaintDescription() | 77 SVGPaintDescription() |
| 78 : resource(nullptr), isValid(false), hasFallback(false) {} | 78 : resource(nullptr), isValid(false), hasFallback(false) {} |
| 79 SVGPaintDescription(Color color) | 79 SVGPaintDescription(Color color) |
| 80 : resource(nullptr), color(color), isValid(true), hasFallback(false) {} | 80 : resource(nullptr), color(color), isValid(true), hasFallback(false) {} |
| 81 SVGPaintDescription(LayoutSVGResourcePaintServer* resource) | 81 SVGPaintDescription(LayoutSVGResourcePaintServer* resource) |
| 82 : resource(resource), isValid(true), hasFallback(false) { | 82 : resource(resource), isValid(true), hasFallback(false) { |
| 83 ASSERT(resource); | 83 DCHECK(resource); |
| 84 } | 84 } |
| 85 SVGPaintDescription(LayoutSVGResourcePaintServer* resource, | 85 SVGPaintDescription(LayoutSVGResourcePaintServer* resource, |
| 86 Color fallbackColor) | 86 Color fallbackColor) |
| 87 : resource(resource), | 87 : resource(resource), |
| 88 color(fallbackColor), | 88 color(fallbackColor), |
| 89 isValid(true), | 89 isValid(true), |
| 90 hasFallback(true) { | 90 hasFallback(true) { |
| 91 ASSERT(resource); | 91 DCHECK(resource); |
| 92 } | 92 } |
| 93 | 93 |
| 94 LayoutSVGResourcePaintServer* resource; | 94 LayoutSVGResourcePaintServer* resource; |
| 95 Color color; | 95 Color color; |
| 96 bool isValid; | 96 bool isValid; |
| 97 bool hasFallback; | 97 bool hasFallback; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 class LayoutSVGResourcePaintServer : public LayoutSVGResourceContainer { | 100 class LayoutSVGResourcePaintServer : public LayoutSVGResourceContainer { |
| 101 public: | 101 public: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 112 | 112 |
| 113 DEFINE_TYPE_CASTS(LayoutSVGResourcePaintServer, | 113 DEFINE_TYPE_CASTS(LayoutSVGResourcePaintServer, |
| 114 LayoutSVGResourceContainer, | 114 LayoutSVGResourceContainer, |
| 115 resource, | 115 resource, |
| 116 resource->isSVGPaintServer(), | 116 resource->isSVGPaintServer(), |
| 117 resource.isSVGPaintServer()); | 117 resource.isSVGPaintServer()); |
| 118 | 118 |
| 119 } // namespace blink | 119 } // namespace blink |
| 120 | 120 |
| 121 #endif | 121 #endif |
| OLD | NEW |