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

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

Issue 129173004: Update rendering classes to use OVERRIDE / FINAL when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 11 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) 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 21 matching lines...) Expand all
32 namespace WebCore { 32 namespace WebCore {
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 { return "RenderScrollbarPart"; } 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(); 46 virtual void layout() OVERRIDE;
47 47
48 void paintIntoRect(GraphicsContext*, const LayoutPoint&, const LayoutRect&); 48 void paintIntoRect(GraphicsContext*, const LayoutPoint&, const LayoutRect&);
49 49
50 // Scrollbar parts needs to be rendered at device pixel boundaries. 50 // Scrollbar parts needs to be rendered at device pixel boundaries.
51 virtual LayoutUnit marginTop() const OVERRIDE { ASSERT(isIntegerValue(m_marg inBox.top())); return m_marginBox.top(); } 51 virtual LayoutUnit marginTop() const OVERRIDE { ASSERT(isIntegerValue(m_marg inBox.top())); return m_marginBox.top(); }
52 virtual LayoutUnit marginBottom() const OVERRIDE { ASSERT(isIntegerValue(m_m arginBox.bottom())); return m_marginBox.bottom(); } 52 virtual LayoutUnit marginBottom() const OVERRIDE { ASSERT(isIntegerValue(m_m arginBox.bottom())); return m_marginBox.bottom(); }
53 virtual LayoutUnit marginLeft() const OVERRIDE { ASSERT(isIntegerValue(m_mar ginBox.left())); return m_marginBox.left(); } 53 virtual LayoutUnit marginLeft() const OVERRIDE { ASSERT(isIntegerValue(m_mar ginBox.left())); return m_marginBox.left(); }
54 virtual LayoutUnit marginRight() const OVERRIDE { ASSERT(isIntegerValue(m_ma rginBox.right())); return m_marginBox.right(); } 54 virtual LayoutUnit marginRight() const OVERRIDE { ASSERT(isIntegerValue(m_ma rginBox.right())); return m_marginBox.right(); }
55 55
56 virtual bool isRenderScrollbarPart() const { return true; } 56 virtual bool isRenderScrollbarPart() const OVERRIDE { return true; }
57 RenderObject* rendererOwningScrollbar() const; 57 RenderObject* rendererOwningScrollbar() const;
58 58
59 protected: 59 protected:
60 virtual void styleWillChange(StyleDifference diff, const RenderStyle* newSty le); 60 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle) O VERRIDE;
61 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 61 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE;
62 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); 62 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE;
63 63
64 private: 64 private:
65 RenderScrollbarPart(RenderScrollbar*, ScrollbarPart); 65 RenderScrollbarPart(RenderScrollbar*, ScrollbarPart);
66 66
67 virtual void computePreferredLogicalWidths(); 67 virtual void computePreferredLogicalWidths() OVERRIDE;
68 68
69 virtual bool supportsPartialLayout() const OVERRIDE { return false; } 69 virtual bool supportsPartialLayout() const OVERRIDE { return false; }
70 70
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 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderScrollbarPart, isRenderScrollbarPart()); 81 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderScrollbarPart, isRenderScrollbarPart());
82 82
83 } // namespace WebCore 83 } // namespace WebCore
84 84
85 #endif // RenderScrollbarPart_h 85 #endif // RenderScrollbarPart_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698