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

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

Issue 898783003: Move rendering/RenderLayer* to layout/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
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 16 matching lines...) Expand all
27 #include "core/rendering/LayoutState.h" 27 #include "core/rendering/LayoutState.h"
28 #include "core/rendering/PaintInvalidationState.h" 28 #include "core/rendering/PaintInvalidationState.h"
29 #include "core/rendering/RenderBlockFlow.h" 29 #include "core/rendering/RenderBlockFlow.h"
30 #include "platform/PODFreeListArena.h" 30 #include "platform/PODFreeListArena.h"
31 #include "platform/RuntimeEnabledFeatures.h" 31 #include "platform/RuntimeEnabledFeatures.h"
32 #include "platform/scroll/ScrollableArea.h" 32 #include "platform/scroll/ScrollableArea.h"
33 #include "wtf/OwnPtr.h" 33 #include "wtf/OwnPtr.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 class RenderLayerCompositor; 37 class LayerCompositor;
38 class RenderQuote; 38 class RenderQuote;
39 39
40 // The root of the render tree, corresponding to the CSS initial containing bloc k. 40 // The root of the render tree, corresponding to the CSS initial containing bloc k.
41 // It's dimensions match that of the logical viewport (which may be different fr om 41 // It's dimensions match that of the logical viewport (which may be different fr om
42 // the visible viewport in fixed-layout mode), and it is always at position (0,0 ) 42 // the visible viewport in fixed-layout mode), and it is always at position (0,0 )
43 // relative to the document (and so isn't necessarily in view). 43 // relative to the document (and so isn't necessarily in view).
44 class RenderView final : public RenderBlockFlow { 44 class RenderView final : public RenderBlockFlow {
45 public: 45 public:
46 explicit RenderView(Document*); 46 explicit RenderView(Document*);
47 virtual ~RenderView(); 47 virtual ~RenderView();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 float zoomFactor() const; 80 float zoomFactor() const;
81 81
82 FrameView* frameView() const { return m_frameView; } 82 FrameView* frameView() const { return m_frameView; }
83 83
84 enum ViewportConstrainedPosition { 84 enum ViewportConstrainedPosition {
85 IsNotFixedPosition, 85 IsNotFixedPosition,
86 IsFixedPosition, 86 IsFixedPosition,
87 }; 87 };
88 88
89 static ViewportConstrainedPosition viewportConstrainedPosition(EPosition pos ition) { return position == FixedPosition ? IsFixedPosition : IsNotFixedPosition ; } 89 static ViewportConstrainedPosition viewportConstrainedPosition(EPosition pos ition) { return position == FixedPosition ? IsFixedPosition : IsNotFixedPosition ; }
90 void mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintIn validationContainer, LayoutRect&, ViewportConstrainedPosition, const PaintInvali dationState*) const; 90 void mapRectToPaintInvalidationBacking(const LayoutLayerModelObject* paintIn validationContainer, LayoutRect&, ViewportConstrainedPosition, const PaintInvali dationState*) const;
91 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const o verride; 91 virtual void mapRectToPaintInvalidationBacking(const LayoutLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const o verride;
92 void adjustViewportConstrainedOffset(LayoutRect&, ViewportConstrainedPositio n) const; 92 void adjustViewportConstrainedOffset(LayoutRect&, ViewportConstrainedPositio n) const;
93 93
94 void invalidatePaintForRectangle(const LayoutRect&, PaintInvalidationReason) const; 94 void invalidatePaintForRectangle(const LayoutRect&, PaintInvalidationReason) const;
95 95
96 void invalidatePaintForViewAndCompositedLayers(); 96 void invalidatePaintForViewAndCompositedLayers();
97 97
98 virtual void paint(const PaintInfo&, const LayoutPoint&) override; 98 virtual void paint(const PaintInfo&, const LayoutPoint&) override;
99 virtual void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoin t&) override; 99 virtual void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoin t&) override;
100 100
101 enum SelectionPaintInvalidationMode { PaintInvalidationNewXOROld, PaintInval idationNewMinusOld }; 101 enum SelectionPaintInvalidationMode { PaintInvalidationNewXOROld, PaintInval idationNewMinusOld };
(...skipping 26 matching lines...) Expand all
128 if (m_pageLogicalHeight != height) { 128 if (m_pageLogicalHeight != height) {
129 m_pageLogicalHeight = height; 129 m_pageLogicalHeight = height;
130 m_pageLogicalHeightChanged = true; 130 m_pageLogicalHeightChanged = true;
131 } 131 }
132 } 132 }
133 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; } 133 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; }
134 134
135 // Notification that this view moved into or out of a native window. 135 // Notification that this view moved into or out of a native window.
136 void setIsInWindow(bool); 136 void setIsInWindow(bool);
137 137
138 RenderLayerCompositor* compositor(); 138 LayerCompositor* compositor();
139 bool usesCompositing() const; 139 bool usesCompositing() const;
140 140
141 IntRect unscaledDocumentRect() const; 141 IntRect unscaledDocumentRect() const;
142 LayoutRect backgroundRect(RenderBox* backgroundRenderer) const; 142 LayoutRect backgroundRect(RenderBox* backgroundRenderer) const;
143 143
144 IntRect documentRect() const; 144 IntRect documentRect() const;
145 145
146 // Renderer that paints the root background has background-images which all have background-attachment: fixed. 146 // Renderer that paints the root background has background-images which all have background-attachment: fixed.
147 bool rootBackgroundIsEntirelyFixed() const; 147 bool rootBackgroundIsEntirelyFixed() const;
148 148
(...skipping 13 matching lines...) Expand all
162 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const override; 162 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const override;
163 163
164 double layoutViewportWidth() const; 164 double layoutViewportWidth() const;
165 double layoutViewportHeight() const; 165 double layoutViewportHeight() const;
166 166
167 void pushLayoutState(LayoutState& layoutState) { m_layoutState = &layoutStat e; } 167 void pushLayoutState(LayoutState& layoutState) { m_layoutState = &layoutStat e; }
168 void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState ->next(); } 168 void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState ->next(); }
169 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override final; 169 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override final;
170 170
171 private: 171 private:
172 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0, const PaintInvalidationState* = 0) const override; 172 virtual void mapLocalToContainer(const LayoutLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0, const PaintInvalidationState* = 0) const override;
173 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const override; 173 virtual const RenderObject* pushMappingToContainer(const LayoutLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const override;
174 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst override; 174 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst override;
175 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const override; 175 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const override;
176 176
177 void layoutContent(); 177 void layoutContent();
178 #if ENABLE(ASSERT) 178 #if ENABLE(ASSERT)
179 void checkLayoutState(); 179 void checkLayoutState();
180 #endif 180 #endif
181 181
182 friend class ForceHorriblySlowRectMapping; 182 friend class ForceHorriblySlowRectMapping;
183 183
184 bool shouldUsePrintingLayout() const; 184 bool shouldUsePrintingLayout() const;
185 185
186 RenderObject* backgroundRenderer() const; 186 RenderObject* backgroundRenderer() const;
187 187
188 virtual void invalidateDisplayItemClients(DisplayItemList*) const override; 188 virtual void invalidateDisplayItemClients(DisplayItemList*) const override;
189 189
190 FrameView* m_frameView; 190 FrameView* m_frameView;
191 191
192 RenderObject* m_selectionStart; 192 RenderObject* m_selectionStart;
193 RenderObject* m_selectionEnd; 193 RenderObject* m_selectionEnd;
194 194
195 int m_selectionStartPos; 195 int m_selectionStartPos;
196 int m_selectionEndPos; 196 int m_selectionEndPos;
197 197
198 LayoutUnit m_pageLogicalHeight; 198 LayoutUnit m_pageLogicalHeight;
199 bool m_pageLogicalHeightChanged; 199 bool m_pageLogicalHeightChanged;
200 LayoutState* m_layoutState; 200 LayoutState* m_layoutState;
201 OwnPtr<RenderLayerCompositor> m_compositor; 201 OwnPtr<LayerCompositor> m_compositor;
202 RefPtr<IntervalArena> m_intervalArena; 202 RefPtr<IntervalArena> m_intervalArena;
203 203
204 RenderQuote* m_renderQuoteHead; 204 RenderQuote* m_renderQuoteHead;
205 unsigned m_layoutCounterCount; 205 unsigned m_layoutCounterCount;
206 206
207 unsigned m_hitTestCount; 207 unsigned m_hitTestCount;
208 208
209 class PendingSelection final { 209 class PendingSelection final {
210 DISALLOW_ALLOCATION(); 210 DISALLOW_ALLOCATION();
211 public: 211 public:
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 m_paintInvalidationState->m_cachedOffsetsEnabled = true; 253 m_paintInvalidationState->m_cachedOffsetsEnabled = true;
254 } 254 }
255 private: 255 private:
256 const PaintInvalidationState* m_paintInvalidationState; 256 const PaintInvalidationState* m_paintInvalidationState;
257 bool m_didDisable; 257 bool m_didDisable;
258 }; 258 };
259 259
260 } // namespace blink 260 } // namespace blink
261 261
262 #endif // RenderView_h 262 #endif // RenderView_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTextControlSingleLine.cpp ('k') | Source/core/rendering/RenderView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698