Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: Source/core/svg/SVGPaint.cpp

Issue 183973036: Remove some SVG API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Retry Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« Source/core/svg/SVGColor.cpp ('K') | « Source/core/svg/SVGPaint.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return SVGColor::SVG_COLORTYPE_UNKNOWN; 50 return SVGColor::SVG_COLORTYPE_UNKNOWN;
51 } 51 }
52 52
53 SVGPaint::SVGPaint(const SVGPaintType& paintType, const String& uri) 53 SVGPaint::SVGPaint(const SVGPaintType& paintType, const String& uri)
54 : SVGColor(SVGPaintClass, colorTypeForPaintType(paintType)) 54 : SVGColor(SVGPaintClass, colorTypeForPaintType(paintType))
55 , m_paintType(paintType) 55 , m_paintType(paintType)
56 , m_uri(uri) 56 , m_uri(uri)
57 { 57 {
58 } 58 }
59 59
60 void SVGPaint::setUri(const String&)
61 {
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.
64 }
65
66 void SVGPaint::setPaint(unsigned short, const String&, const String&, const Stri ng&, ExceptionState& exceptionState)
67 {
68 exceptionState.throwDOMException(NoModificationAllowedError, ExceptionMessag es::readOnly());
69 }
70
71 String SVGPaint::customCSSText() const 60 String SVGPaint::customCSSText() const
72 { 61 {
73 switch (m_paintType) { 62 switch (m_paintType) {
74 case SVG_PAINTTYPE_UNKNOWN: 63 case SVG_PAINTTYPE_UNKNOWN:
75 return String(); 64 return String();
76 case SVG_PAINTTYPE_RGBCOLOR: 65 case SVG_PAINTTYPE_RGBCOLOR:
77 case SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR: 66 case SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR:
78 case SVG_PAINTTYPE_CURRENTCOLOR: 67 case SVG_PAINTTYPE_CURRENTCOLOR:
79 return SVGColor::customCSSText(); 68 return SVGColor::customCSSText();
80 case SVG_PAINTTYPE_NONE: 69 case SVG_PAINTTYPE_NONE:
(...skipping 27 matching lines...) Expand all
108 { 97 {
109 return adoptRefWillBeRefCountedGarbageCollected(new SVGPaint(*this)); 98 return adoptRefWillBeRefCountedGarbageCollected(new SVGPaint(*this));
110 } 99 }
111 100
112 bool SVGPaint::equals(const SVGPaint& other) const 101 bool SVGPaint::equals(const SVGPaint& other) const
113 { 102 {
114 return m_paintType == other.m_paintType && m_uri == other.m_uri && SVGColor: :equals(other); 103 return m_paintType == other.m_paintType && m_uri == other.m_uri && SVGColor: :equals(other);
115 } 104 }
116 105
117 } 106 }
OLDNEW
« Source/core/svg/SVGColor.cpp ('K') | « Source/core/svg/SVGPaint.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698