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

Side by Side Diff: Source/core/rendering/RenderScrollbarPart.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/RenderRubyRun.h ('k') | Source/core/rendering/RenderSearchField.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 void layoutHorizontalPart(); 71 void layoutHorizontalPart();
72 void layoutVerticalPart(); 72 void layoutVerticalPart();
73 73
74 void computeScrollbarWidth(); 74 void computeScrollbarWidth();
75 void computeScrollbarHeight(); 75 void computeScrollbarHeight();
76 76
77 RenderScrollbar* m_scrollbar; 77 RenderScrollbar* m_scrollbar;
78 ScrollbarPart m_part; 78 ScrollbarPart m_part;
79 }; 79 };
80 80
81 inline RenderScrollbarPart* toRenderScrollbarPart(RenderObject* object) 81 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderScrollbarPart, isRenderScrollbarPart());
82 {
83 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderScrollbarPart()) ;
84 return static_cast<RenderScrollbarPart*>(object);
85 }
86
87 inline const RenderScrollbarPart* toRenderScrollbarPart(const RenderObject* obje ct)
88 {
89 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderScrollbarPart()) ;
90 return static_cast<const RenderScrollbarPart*>(object);
91 }
92
93 // This will catch anyone doing an unnecessary cast.
94 void toRenderScrollbarPart(const RenderScrollbarPart*);
95 82
96 } // namespace WebCore 83 } // namespace WebCore
97 84
98 #endif // RenderScrollbarPart_h 85 #endif // RenderScrollbarPart_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderRubyRun.h ('k') | Source/core/rendering/RenderSearchField.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698