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

Side by Side Diff: Source/core/rendering/RenderView.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/RenderVideo.h ('k') | Source/core/rendering/RenderWidget.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
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 22 matching lines...) Expand all
33 namespace blink { 33 namespace blink {
34 34
35 class FlowThreadController; 35 class FlowThreadController;
36 class RenderLayerCompositor; 36 class RenderLayerCompositor;
37 class RenderQuote; 37 class RenderQuote;
38 38
39 // The root of the render tree, corresponding to the CSS initial containing bloc k. 39 // The root of the render tree, corresponding to the CSS initial containing bloc k.
40 // It's dimensions match that of the logical viewport (which may be different fr om 40 // It's dimensions match that of the logical viewport (which may be different fr om
41 // the visible viewport in fixed-layout mode), and it is always at position (0,0 ) 41 // the visible viewport in fixed-layout mode), and it is always at position (0,0 )
42 // relative to the document (and so isn't necessarily in view). 42 // relative to the document (and so isn't necessarily in view).
43 class RenderView FINAL : public RenderBlockFlow { 43 class RenderView final : public RenderBlockFlow {
44 public: 44 public:
45 explicit RenderView(Document*); 45 explicit RenderView(Document*);
46 virtual ~RenderView(); 46 virtual ~RenderView();
47 virtual void trace(Visitor*) OVERRIDE; 47 virtual void trace(Visitor*) override;
48 48
49 bool hitTest(const HitTestRequest&, HitTestResult&); 49 bool hitTest(const HitTestRequest&, HitTestResult&);
50 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); 50 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&);
51 51
52 // Returns the total count of calls to HitTest, for testing. 52 // Returns the total count of calls to HitTest, for testing.
53 unsigned hitTestCount() const { return m_hitTestCount; } 53 unsigned hitTestCount() const { return m_hitTestCount; }
54 54
55 virtual const char* renderName() const OVERRIDE { return "RenderView"; } 55 virtual const char* renderName() const override { return "RenderView"; }
56 56
57 virtual bool isRenderView() const OVERRIDE { return true; } 57 virtual bool isRenderView() const override { return true; }
58 58
59 virtual LayerType layerTypeRequired() const OVERRIDE { return NormalLayer; } 59 virtual LayerType layerTypeRequired() const override { return NormalLayer; }
60 60
61 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const OVERRIDE; 61 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const override;
62 62
63 virtual void layout() OVERRIDE; 63 virtual void layout() override;
64 virtual void updateLogicalWidth() OVERRIDE; 64 virtual void updateLogicalWidth() override;
65 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const OVERRIDE; 65 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const override;
66 66
67 virtual LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const OVERRIDE; 67 virtual LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const override;
68 68
69 // The same as the FrameView's layoutHeight/layoutWidth but with null check guards. 69 // The same as the FrameView's layoutHeight/layoutWidth but with null check guards.
70 int viewHeight(IncludeScrollbarsInRect = ExcludeScrollbars) const; 70 int viewHeight(IncludeScrollbarsInRect = ExcludeScrollbars) const;
71 int viewWidth(IncludeScrollbarsInRect = ExcludeScrollbars) const; 71 int viewWidth(IncludeScrollbarsInRect = ExcludeScrollbars) const;
72 int viewLogicalWidth() const 72 int viewLogicalWidth() const
73 { 73 {
74 return style()->isHorizontalWritingMode() ? viewWidth(ExcludeScrollbars) : viewHeight(ExcludeScrollbars); 74 return style()->isHorizontalWritingMode() ? viewWidth(ExcludeScrollbars) : viewHeight(ExcludeScrollbars);
75 } 75 }
76 int viewLogicalHeight() const; 76 int viewLogicalHeight() const;
77 LayoutUnit viewLogicalHeightForPercentages() const; 77 LayoutUnit viewLogicalHeightForPercentages() const;
78 78
79 float zoomFactor() const; 79 float zoomFactor() const;
80 80
81 FrameView* frameView() const { return m_frameView; } 81 FrameView* frameView() const { return m_frameView; }
82 82
83 enum ViewportConstrainedPosition { 83 enum ViewportConstrainedPosition {
84 IsNotFixedPosition, 84 IsNotFixedPosition,
85 IsFixedPosition, 85 IsFixedPosition,
86 }; 86 };
87 void mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintIn validationContainer, LayoutRect&, ViewportConstrainedPosition, const PaintInvali dationState*) const; 87 void mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintIn validationContainer, LayoutRect&, ViewportConstrainedPosition, const PaintInvali dationState*) const;
88 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const O VERRIDE; 88 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const o verride;
89 89
90 void invalidatePaintForRectangle(const LayoutRect&, InvalidationReason) cons t; 90 void invalidatePaintForRectangle(const LayoutRect&, InvalidationReason) cons t;
91 91
92 void invalidatePaintForViewAndCompositedLayers(); 92 void invalidatePaintForViewAndCompositedLayers();
93 93
94 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; 94 virtual void paint(PaintInfo&, const LayoutPoint&) override;
95 virtual void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint&) OV ERRIDE; 95 virtual void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint&) ov erride;
96 96
97 enum SelectionPaintInvalidationMode { PaintInvalidationNewXOROld, PaintInval idationNewMinusOld }; 97 enum SelectionPaintInvalidationMode { PaintInvalidationNewXOROld, PaintInval idationNewMinusOld };
98 void setSelection(RenderObject* start, int startPos, RenderObject*, int endP os, SelectionPaintInvalidationMode = PaintInvalidationNewXOROld); 98 void setSelection(RenderObject* start, int startPos, RenderObject*, int endP os, SelectionPaintInvalidationMode = PaintInvalidationNewXOROld);
99 void clearSelection(); 99 void clearSelection();
100 RenderObject* selectionStart() const { return m_selectionStart; } 100 RenderObject* selectionStart() const { return m_selectionStart; }
101 RenderObject* selectionEnd() const { return m_selectionEnd; } 101 RenderObject* selectionEnd() const { return m_selectionEnd; }
102 IntRect selectionBounds() const; 102 IntRect selectionBounds() const;
103 void selectionStartEnd(int& startPos, int& endPos) const; 103 void selectionStartEnd(int& startPos, int& endPos) const;
104 void invalidatePaintForSelection() const; 104 void invalidatePaintForSelection() const;
105 105
106 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const OVERRIDE; 106 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const override;
107 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRID E; 107 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const overrid e;
108 108
109 virtual LayoutRect viewRect() const OVERRIDE; 109 virtual LayoutRect viewRect() const override;
110 110
111 bool shouldDoFullPaintInvalidationForNextLayout() const; 111 bool shouldDoFullPaintInvalidationForNextLayout() const;
112 bool doingFullPaintInvalidation() const { return m_frameView->needsFullPaint Invalidation(); } 112 bool doingFullPaintInvalidation() const { return m_frameView->needsFullPaint Invalidation(); }
113 113
114 LayoutState* layoutState() const { return m_layoutState; } 114 LayoutState* layoutState() const { return m_layoutState; }
115 115
116 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) OVERRID E; 116 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) overrid e;
117 117
118 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; } 118 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; }
119 void setPageLogicalHeight(LayoutUnit height) 119 void setPageLogicalHeight(LayoutUnit height)
120 { 120 {
121 if (m_pageLogicalHeight != height) { 121 if (m_pageLogicalHeight != height) {
122 m_pageLogicalHeight = height; 122 m_pageLogicalHeight = height;
123 m_pageLogicalHeightChanged = true; 123 m_pageLogicalHeightChanged = true;
124 } 124 }
125 } 125 }
126 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; } 126 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; }
(...skipping 20 matching lines...) Expand all
147 RenderQuote* renderQuoteHead() const { return m_renderQuoteHead; } 147 RenderQuote* renderQuoteHead() const { return m_renderQuoteHead; }
148 148
149 // FIXME: This is a work around because the current implementation of counte rs 149 // FIXME: This is a work around because the current implementation of counte rs
150 // requires walking the entire tree repeatedly and most pages don't actually use either 150 // requires walking the entire tree repeatedly and most pages don't actually use either
151 // feature so we shouldn't take the performance hit when not needed. Long te rm we should 151 // feature so we shouldn't take the performance hit when not needed. Long te rm we should
152 // rewrite the counter and quotes code. 152 // rewrite the counter and quotes code.
153 void addRenderCounter() { m_renderCounterCount++; } 153 void addRenderCounter() { m_renderCounterCount++; }
154 void removeRenderCounter() { ASSERT(m_renderCounterCount > 0); m_renderCount erCount--; } 154 void removeRenderCounter() { ASSERT(m_renderCounterCount > 0); m_renderCount erCount--; }
155 bool hasRenderCounters() { return m_renderCounterCount; } 155 bool hasRenderCounters() { return m_renderCounterCount; }
156 156
157 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const OVERRIDE; 157 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const override;
158 158
159 double layoutViewportWidth() const; 159 double layoutViewportWidth() const;
160 double layoutViewportHeight() const; 160 double layoutViewportHeight() const;
161 161
162 void pushLayoutState(LayoutState&); 162 void pushLayoutState(LayoutState&);
163 void popLayoutState(); 163 void popLayoutState();
164 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) OVERRIDE FINAL; 164 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override final;
165 165
166 private: 166 private:
167 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0, const PaintInvalidationState* = 0) const OVERRIDE; 167 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0, const PaintInvalidationState* = 0) const override;
168 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE; 168 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const override;
169 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst OVERRIDE; 169 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst override;
170 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const OVERRIDE; 170 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const override;
171 171
172 void layoutContent(); 172 void layoutContent();
173 #if ENABLE(ASSERT) 173 #if ENABLE(ASSERT)
174 void checkLayoutState(); 174 void checkLayoutState();
175 #endif 175 #endif
176 176
177 friend class ForceHorriblySlowRectMapping; 177 friend class ForceHorriblySlowRectMapping;
178 178
179 bool shouldUsePrintingLayout() const; 179 bool shouldUsePrintingLayout() const;
180 180
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 m_paintInvalidationState->m_cachedOffsetsEnabled = true; 225 m_paintInvalidationState->m_cachedOffsetsEnabled = true;
226 } 226 }
227 private: 227 private:
228 const PaintInvalidationState* m_paintInvalidationState; 228 const PaintInvalidationState* m_paintInvalidationState;
229 bool m_didDisable; 229 bool m_didDisable;
230 }; 230 };
231 231
232 } // namespace blink 232 } // namespace blink
233 233
234 #endif // RenderView_h 234 #endif // RenderView_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderVideo.h ('k') | Source/core/rendering/RenderWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698