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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceGradient.h

Issue 2749583002: Add Gradient::addColorStops method (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceGradient.cpp » ('j') | 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) 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 3 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 void removeAllClientsFromCache(bool markForInvalidation = true) final; 47 void removeAllClientsFromCache(bool markForInvalidation = true) final;
48 void removeClientFromCache(LayoutObject*, 48 void removeClientFromCache(LayoutObject*,
49 bool markForInvalidation = true) final; 49 bool markForInvalidation = true) final;
50 50
51 SVGPaintServer preparePaintServer(const LayoutObject&) final; 51 SVGPaintServer preparePaintServer(const LayoutObject&) final;
52 52
53 bool isChildAllowed(LayoutObject* child, const ComputedStyle&) const final; 53 bool isChildAllowed(LayoutObject* child, const ComputedStyle&) const final;
54 54
55 protected: 55 protected:
56 void addStops(Gradient&, const Vector<Gradient::ColorStop>&) const;
57
58 virtual SVGUnitTypes::SVGUnitType gradientUnits() const = 0; 56 virtual SVGUnitTypes::SVGUnitType gradientUnits() const = 0;
59 virtual AffineTransform calculateGradientTransform() const = 0; 57 virtual AffineTransform calculateGradientTransform() const = 0;
60 virtual bool collectGradientAttributes(SVGGradientElement*) = 0; 58 virtual bool collectGradientAttributes(SVGGradientElement*) = 0;
61 virtual PassRefPtr<Gradient> buildGradient() const = 0; 59 virtual PassRefPtr<Gradient> buildGradient() const = 0;
62 60
63 static GradientSpreadMethod platformSpreadMethodFromSVGType( 61 static GradientSpreadMethod platformSpreadMethodFromSVGType(
64 SVGSpreadMethodType); 62 SVGSpreadMethodType);
65 63
66 private: 64 private:
67 bool m_shouldCollectGradientAttributes : 1; 65 bool m_shouldCollectGradientAttributes : 1;
68 HashMap<const LayoutObject*, std::unique_ptr<GradientData>> m_gradientMap; 66 HashMap<const LayoutObject*, std::unique_ptr<GradientData>> m_gradientMap;
69 }; 67 };
70 68
71 } // namespace blink 69 } // namespace blink
72 70
73 #endif 71 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698