| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 { | 61 { |
| 62 // The whole SVGPaint interface is deprecated in SVG 1.1 (2nd edition). | 62 // The whole SVGPaint interface is deprecated in SVG 1.1 (2nd edition). |
| 63 // The setters are the most problematic part so we remove the support for th
ose first. | 63 // The setters are the most problematic part so we remove the support for th
ose first. |
| 64 } | 64 } |
| 65 | 65 |
| 66 void SVGPaint::setPaint(unsigned short, const String&, const String&, const Stri
ng&, ExceptionState& es) | 66 void SVGPaint::setPaint(unsigned short, const String&, const String&, const Stri
ng&, ExceptionState& es) |
| 67 { | 67 { |
| 68 es.throwUninformativeAndGenericDOMException(NoModificationAllowedError); | 68 es.throwUninformativeAndGenericDOMException(NoModificationAllowedError); |
| 69 } | 69 } |
| 70 | 70 |
| 71 String SVGPaint::customCssText() const | 71 String SVGPaint::customCSSText() const |
| 72 { | 72 { |
| 73 switch (m_paintType) { | 73 switch (m_paintType) { |
| 74 case SVG_PAINTTYPE_UNKNOWN: | 74 case SVG_PAINTTYPE_UNKNOWN: |
| 75 case SVG_PAINTTYPE_RGBCOLOR: | 75 case SVG_PAINTTYPE_RGBCOLOR: |
| 76 case SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR: | 76 case SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR: |
| 77 case SVG_PAINTTYPE_CURRENTCOLOR: | 77 case SVG_PAINTTYPE_CURRENTCOLOR: |
| 78 return SVGColor::customCssText(); | 78 return SVGColor::customCSSText(); |
| 79 case SVG_PAINTTYPE_NONE: | 79 case SVG_PAINTTYPE_NONE: |
| 80 return "none"; | 80 return "none"; |
| 81 case SVG_PAINTTYPE_URI_NONE: | 81 case SVG_PAINTTYPE_URI_NONE: |
| 82 return m_uri + " none"; | 82 return m_uri + " none"; |
| 83 case SVG_PAINTTYPE_URI_CURRENTCOLOR: | 83 case SVG_PAINTTYPE_URI_CURRENTCOLOR: |
| 84 case SVG_PAINTTYPE_URI_RGBCOLOR: | 84 case SVG_PAINTTYPE_URI_RGBCOLOR: |
| 85 case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR: { | 85 case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR: { |
| 86 String color = SVGColor::customCssText(); | 86 String color = SVGColor::customCSSText(); |
| 87 if (color.isEmpty()) | 87 if (color.isEmpty()) |
| 88 return m_uri; | 88 return m_uri; |
| 89 return "url(" + m_uri + ") " + color; | 89 return "url(" + m_uri + ") " + color; |
| 90 } | 90 } |
| 91 case SVG_PAINTTYPE_URI: | 91 case SVG_PAINTTYPE_URI: |
| 92 return "url(" + m_uri + ')'; | 92 return "url(" + m_uri + ')'; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 ASSERT_NOT_REACHED(); | 95 ASSERT_NOT_REACHED(); |
| 96 return String(); | 96 return String(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 107 { | 107 { |
| 108 return adoptRef(new SVGPaint(*this)); | 108 return adoptRef(new SVGPaint(*this)); |
| 109 } | 109 } |
| 110 | 110 |
| 111 bool SVGPaint::equals(const SVGPaint& other) const | 111 bool SVGPaint::equals(const SVGPaint& other) const |
| 112 { | 112 { |
| 113 return m_paintType == other.m_paintType && m_uri == other.m_uri && SVGColor:
:equals(other); | 113 return m_paintType == other.m_paintType && m_uri == other.m_uri && SVGColor:
:equals(other); |
| 114 } | 114 } |
| 115 | 115 |
| 116 } | 116 } |
| OLD | NEW |