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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Rob Buis <buis@kde.org>
4 * Copyright (C) 2014 Samsung Electronics. All rights reserved. 4 * Copyright (C) 2014 Samsung Electronics. 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 16 matching lines...) Expand all
27 #include "core/svg/SVGAnimatedPreserveAspectRatio.h" 27 #include "core/svg/SVGAnimatedPreserveAspectRatio.h"
28 #include "core/svg/SVGAnimatedRect.h" 28 #include "core/svg/SVGAnimatedRect.h"
29 #include "core/svg/SVGPreserveAspectRatio.h" 29 #include "core/svg/SVGPreserveAspectRatio.h"
30 #include "core/svg/SVGRect.h" 30 #include "core/svg/SVGRect.h"
31 #include "platform/heap/Handle.h" 31 #include "platform/heap/Handle.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 class AffineTransform; 35 class AffineTransform;
36 36
37 class SVGFitToViewBox : public WillBeGarbageCollectedMixin { 37 class SVGFitToViewBox : public GarbageCollectedMixin {
38 public: 38 public:
39 enum PropertyMapPolicy { 39 enum PropertyMapPolicy {
40 PropertyMapPolicyAdd, 40 PropertyMapPolicyAdd,
41 PropertyMapPolicySkip, 41 PropertyMapPolicySkip,
42 }; 42 };
43 43
44 static AffineTransform viewBoxToViewTransform(const FloatRect& viewBoxRect, PassRefPtrWillBeRawPtr<SVGPreserveAspectRatio>, float viewWidth, float viewHeigh t); 44 static AffineTransform viewBoxToViewTransform(const FloatRect& viewBoxRect, RawPtr<SVGPreserveAspectRatio>, float viewWidth, float viewHeight);
45 45
46 static bool isKnownAttribute(const QualifiedName&); 46 static bool isKnownAttribute(const QualifiedName&);
47 47
48 bool hasEmptyViewBox() const { return m_viewBox->currentValue()->isValid() & & m_viewBox->currentValue()->value().isEmpty(); } 48 bool hasEmptyViewBox() const { return m_viewBox->currentValue()->isValid() & & m_viewBox->currentValue()->value().isEmpty(); }
49 49
50 // JS API 50 // JS API
51 SVGAnimatedRect* viewBox() const { return m_viewBox.get(); } 51 SVGAnimatedRect* viewBox() const { return m_viewBox.get(); }
52 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() const { return m_prese rveAspectRatio.get(); } 52 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() const { return m_prese rveAspectRatio.get(); }
53 53
54 DECLARE_VIRTUAL_TRACE(); 54 DECLARE_VIRTUAL_TRACE();
55 55
56 protected: 56 protected:
57 explicit SVGFitToViewBox(SVGElement*, PropertyMapPolicy = PropertyMapPolicyA dd); 57 explicit SVGFitToViewBox(SVGElement*, PropertyMapPolicy = PropertyMapPolicyA dd);
58 void updateViewBox(const FloatRect&); 58 void updateViewBox(const FloatRect&);
59 void clearViewBox() { m_viewBox = nullptr; } 59 void clearViewBox() { m_viewBox = nullptr; }
60 void clearPreserveAspectRatio() { m_preserveAspectRatio = nullptr; } 60 void clearPreserveAspectRatio() { m_preserveAspectRatio = nullptr; }
61 61
62 private: 62 private:
63 RefPtrWillBeMember<SVGAnimatedRect> m_viewBox; 63 Member<SVGAnimatedRect> m_viewBox;
64 RefPtrWillBeMember<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; 64 Member<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio;
65 }; 65 };
66 66
67 } // namespace blink 67 } // namespace blink
68 68
69 #endif // SVGFitToViewBox_h 69 #endif // SVGFitToViewBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698