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

Side by Side Diff: Source/core/rendering/RenderScrollbarPart.h

Issue 640593002: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/[css|rendering|clipboard] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased the patch Created 6 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/RenderScrollbar.h ('k') | Source/core/rendering/RenderScrollbarTheme.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 15 matching lines...) Expand all
26 #ifndef RenderScrollbarPart_h 26 #ifndef RenderScrollbarPart_h
27 #define RenderScrollbarPart_h 27 #define RenderScrollbarPart_h
28 28
29 #include "core/rendering/RenderBlock.h" 29 #include "core/rendering/RenderBlock.h"
30 #include "platform/scroll/ScrollTypes.h" 30 #include "platform/scroll/ScrollTypes.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class RenderScrollbar; 34 class RenderScrollbar;
35 35
36 class RenderScrollbarPart FINAL : public RenderBlock { 36 class RenderScrollbarPart final : public RenderBlock {
37 public: 37 public:
38 static RenderScrollbarPart* createAnonymous(Document*, RenderScrollbar* = 0, ScrollbarPart = NoPart); 38 static RenderScrollbarPart* createAnonymous(Document*, RenderScrollbar* = 0, ScrollbarPart = NoPart);
39 39
40 virtual ~RenderScrollbarPart(); 40 virtual ~RenderScrollbarPart();
41 41
42 virtual const char* renderName() const OVERRIDE { return "RenderScrollbarPar t"; } 42 virtual const char* renderName() const override { return "RenderScrollbarPar t"; }
43 43
44 virtual LayerType layerTypeRequired() const OVERRIDE { return NoLayer; } 44 virtual LayerType layerTypeRequired() const override { return NoLayer; }
45 45
46 virtual void layout() OVERRIDE; 46 virtual void layout() override;
47 47
48 // Scrollbar parts needs to be rendered at device pixel boundaries. 48 // Scrollbar parts needs to be rendered at device pixel boundaries.
49 virtual LayoutUnit marginTop() const OVERRIDE { ASSERT(isIntegerValue(m_marg inBox.top())); return m_marginBox.top(); } 49 virtual LayoutUnit marginTop() const override { ASSERT(isIntegerValue(m_marg inBox.top())); return m_marginBox.top(); }
50 virtual LayoutUnit marginBottom() const OVERRIDE { ASSERT(isIntegerValue(m_m arginBox.bottom())); return m_marginBox.bottom(); } 50 virtual LayoutUnit marginBottom() const override { ASSERT(isIntegerValue(m_m arginBox.bottom())); return m_marginBox.bottom(); }
51 virtual LayoutUnit marginLeft() const OVERRIDE { ASSERT(isIntegerValue(m_mar ginBox.left())); return m_marginBox.left(); } 51 virtual LayoutUnit marginLeft() const override { ASSERT(isIntegerValue(m_mar ginBox.left())); return m_marginBox.left(); }
52 virtual LayoutUnit marginRight() const OVERRIDE { ASSERT(isIntegerValue(m_ma rginBox.right())); return m_marginBox.right(); } 52 virtual LayoutUnit marginRight() const override { ASSERT(isIntegerValue(m_ma rginBox.right())); return m_marginBox.right(); }
53 53
54 virtual bool isRenderScrollbarPart() const OVERRIDE { return true; } 54 virtual bool isRenderScrollbarPart() const override { return true; }
55 RenderObject* rendererOwningScrollbar() const; 55 RenderObject* rendererOwningScrollbar() const;
56 56
57 protected: 57 protected:
58 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O VERRIDE; 58 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) o verride;
59 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE; 59 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov erride;
60 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; 60 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override;
61 61
62 private: 62 private:
63 RenderScrollbarPart(RenderScrollbar*, ScrollbarPart); 63 RenderScrollbarPart(RenderScrollbar*, ScrollbarPart);
64 64
65 virtual void computePreferredLogicalWidths() OVERRIDE; 65 virtual void computePreferredLogicalWidths() override;
66 66
67 // Have all padding getters return 0. The important point here is to avoid r esolving percents 67 // Have all padding getters return 0. The important point here is to avoid r esolving percents
68 // against the containing block, since scroll bar corners don't always have one (so it would 68 // against the containing block, since scroll bar corners don't always have one (so it would
69 // crash). Scroll bar corners are not actually laid out, and they don't have child content, so 69 // crash). Scroll bar corners are not actually laid out, and they don't have child content, so
70 // what we return here doesn't really matter. 70 // what we return here doesn't really matter.
71 virtual LayoutUnit paddingTop() const OVERRIDE { return LayoutUnit(); } 71 virtual LayoutUnit paddingTop() const override { return LayoutUnit(); }
72 virtual LayoutUnit paddingBottom() const OVERRIDE { return LayoutUnit(); } 72 virtual LayoutUnit paddingBottom() const override { return LayoutUnit(); }
73 virtual LayoutUnit paddingLeft() const OVERRIDE { return LayoutUnit(); } 73 virtual LayoutUnit paddingLeft() const override { return LayoutUnit(); }
74 virtual LayoutUnit paddingRight() const OVERRIDE { return LayoutUnit(); } 74 virtual LayoutUnit paddingRight() const override { return LayoutUnit(); }
75 virtual LayoutUnit paddingBefore() const OVERRIDE { return LayoutUnit(); } 75 virtual LayoutUnit paddingBefore() const override { return LayoutUnit(); }
76 virtual LayoutUnit paddingAfter() const OVERRIDE { return LayoutUnit(); } 76 virtual LayoutUnit paddingAfter() const override { return LayoutUnit(); }
77 virtual LayoutUnit paddingStart() const OVERRIDE { return LayoutUnit(); } 77 virtual LayoutUnit paddingStart() const override { return LayoutUnit(); }
78 virtual LayoutUnit paddingEnd() const OVERRIDE { return LayoutUnit(); } 78 virtual LayoutUnit paddingEnd() const override { return LayoutUnit(); }
79 79
80 void layoutHorizontalPart(); 80 void layoutHorizontalPart();
81 void layoutVerticalPart(); 81 void layoutVerticalPart();
82 82
83 void computeScrollbarWidth(); 83 void computeScrollbarWidth();
84 void computeScrollbarHeight(); 84 void computeScrollbarHeight();
85 85
86 RenderScrollbar* m_scrollbar; 86 RenderScrollbar* m_scrollbar;
87 ScrollbarPart m_part; 87 ScrollbarPart m_part;
88 }; 88 };
89 89
90 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderScrollbarPart, isRenderScrollbarPart()); 90 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderScrollbarPart, isRenderScrollbarPart());
91 91
92 } // namespace blink 92 } // namespace blink
93 93
94 #endif // RenderScrollbarPart_h 94 #endif // RenderScrollbarPart_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderScrollbar.h ('k') | Source/core/rendering/RenderScrollbarTheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698