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

Side by Side Diff: Source/core/rendering/svg/RenderSVGImage.h

Issue 33983003: Introduce DEFINE_RENDER_OBJECT_TYPE_CASTS to replace manual toRenderFoo, and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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) 2006 Alexander Kellett <lypanov@kde.org> 2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2007 Rob Buis <buis@kde.org>
5 * Copyright (C) 2009 Google, Inc. 5 * Copyright (C) 2009 Google, Inc.
6 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 6 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 bool m_needsBoundariesUpdate : 1; 74 bool m_needsBoundariesUpdate : 1;
75 bool m_needsTransformUpdate : 1; 75 bool m_needsTransformUpdate : 1;
76 AffineTransform m_localTransform; 76 AffineTransform m_localTransform;
77 FloatRect m_objectBoundingBox; 77 FloatRect m_objectBoundingBox;
78 FloatRect m_repaintBoundingBox; 78 FloatRect m_repaintBoundingBox;
79 OwnPtr<RenderImageResource> m_imageResource; 79 OwnPtr<RenderImageResource> m_imageResource;
80 80
81 OwnPtr<ImageBuffer> m_bufferedForeground; 81 OwnPtr<ImageBuffer> m_bufferedForeground;
82 }; 82 };
83 83
84 inline RenderSVGImage* toRenderSVGImage(RenderObject* object) 84 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGImage, isSVGImage());
85 {
86 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSVGImage());
87 return static_cast<RenderSVGImage*>(object);
88 }
89
90 inline const RenderSVGImage* toRenderSVGImage(const RenderObject* object)
91 {
92 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSVGImage());
93 return static_cast<const RenderSVGImage*>(object);
94 }
95
96 // This will catch anyone doing an unnecessary cast.
97 void toRenderSVGImage(const RenderSVGImage*);
98 85
99 } // namespace WebCore 86 } // namespace WebCore
100 87
101 #endif // RenderSVGImage_h 88 #endif // RenderSVGImage_h
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGGradientStop.h ('k') | Source/core/rendering/svg/RenderSVGInlineText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698