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

Side by Side Diff: Source/core/rendering/RenderQuote.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
« no previous file with comments | « Source/core/rendering/RenderProgress.h ('k') | Source/core/rendering/RenderRegion.h » ('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) 2011 Nokia Inc. All rights reserved. 2 * Copyright (C) 2011 Nokia Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 bool isAttached() { return m_attached; } 53 bool isAttached() { return m_attached; }
54 54
55 QuoteType m_type; 55 QuoteType m_type;
56 int m_depth; 56 int m_depth;
57 RenderQuote* m_next; 57 RenderQuote* m_next;
58 RenderQuote* m_previous; 58 RenderQuote* m_previous;
59 bool m_attached; 59 bool m_attached;
60 String m_text; 60 String m_text;
61 }; 61 };
62 62
63 inline RenderQuote* toRenderQuote(RenderObject* object) 63 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderQuote, isQuote());
64 {
65 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isQuote());
66 return static_cast<RenderQuote*>(object);
67 }
68
69 // This will catch anyone doing an unnecessary cast.
70 void toRenderQuote(const RenderQuote*);
71 64
72 } // namespace WebCore 65 } // namespace WebCore
73 66
74 #endif // RenderQuote_h 67 #endif // RenderQuote_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderProgress.h ('k') | Source/core/rendering/RenderRegion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698