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

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

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (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
« no previous file with comments | « Source/core/rendering/RenderVideo.cpp ('k') | Source/core/rendering/RenderView.cpp » ('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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 void willBeDestroyed() override; 48 void willBeDestroyed() override;
49 49
50 bool hitTest(const HitTestRequest&, HitTestResult&); 50 bool hitTest(const HitTestRequest&, HitTestResult&);
51 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); 51 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&);
52 52
53 // Returns the total count of calls to HitTest, for testing. 53 // Returns the total count of calls to HitTest, for testing.
54 unsigned hitTestCount() const { return m_hitTestCount; } 54 unsigned hitTestCount() const { return m_hitTestCount; }
55 55
56 virtual const char* renderName() const override { return "RenderView"; } 56 virtual const char* renderName() const override { return "RenderView"; }
57 57
58 virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectRenderView || RenderBlockFlow::isOfType(type); } 58 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectRenderView || RenderBlockFlow::isOfType(type); }
59 59
60 virtual LayerType layerTypeRequired() const override { return NormalLayer; } 60 virtual LayerType layerTypeRequired() const override { return NormalLayer; }
61 61
62 virtual bool isChildAllowed(RenderObject*, const RenderStyle&) const overrid e; 62 virtual bool isChildAllowed(LayoutObject*, const RenderStyle&) const overrid e;
63 63
64 virtual void layout() override; 64 virtual void layout() override;
65 virtual void updateLogicalWidth() override; 65 virtual void updateLogicalWidth() override;
66 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const override; 66 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const override;
67 67
68 virtual LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const override; 68 virtual LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const override;
69 69
70 // The same as the FrameView's layoutHeight/layoutWidth but with null check guards. 70 // The same as the FrameView's layoutHeight/layoutWidth but with null check guards.
71 int viewHeight(IncludeScrollbarsInRect = ExcludeScrollbars) const; 71 int viewHeight(IncludeScrollbarsInRect = ExcludeScrollbars) const;
72 int viewWidth(IncludeScrollbarsInRect = ExcludeScrollbars) const; 72 int viewWidth(IncludeScrollbarsInRect = ExcludeScrollbars) const;
(...skipping 19 matching lines...) Expand all
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 };
102 void setSelection(RenderObject* start, int startPos, RenderObject*, int endP os, SelectionPaintInvalidationMode = PaintInvalidationNewXOROld); 102 void setSelection(LayoutObject* start, int startPos, LayoutObject*, int endP os, SelectionPaintInvalidationMode = PaintInvalidationNewXOROld);
103 void clearSelection(); 103 void clearSelection();
104 void setSelection(const FrameSelection&); 104 void setSelection(const FrameSelection&);
105 bool hasPendingSelection() const { return m_pendingSelection.m_hasPendingSel ection; } 105 bool hasPendingSelection() const { return m_pendingSelection.m_hasPendingSel ection; }
106 void commitPendingSelection(); 106 void commitPendingSelection();
107 RenderObject* selectionStart(); 107 LayoutObject* selectionStart();
108 RenderObject* selectionEnd(); 108 LayoutObject* selectionEnd();
109 IntRect selectionBounds(); 109 IntRect selectionBounds();
110 void selectionStartEnd(int& startPos, int& endPos); 110 void selectionStartEnd(int& startPos, int& endPos);
111 void invalidatePaintForSelection(); 111 void invalidatePaintForSelection();
112 112
113 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const override; 113 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const override;
114 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const overrid e; 114 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const overrid e;
115 115
116 virtual LayoutRect viewRect() const override; 116 virtual LayoutRect viewRect() const override;
117 117
118 bool shouldDoFullPaintInvalidationForNextLayout() const; 118 bool shouldDoFullPaintInvalidationForNextLayout() const;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 LayoutLayerModelObject* 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 LayoutLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const override; 173 virtual const LayoutObject* 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 LayoutObject* 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 LayoutObject* m_selectionStart;
193 RenderObject* m_selectionEnd; 193 LayoutObject* 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<LayerCompositor> m_compositor; 201 OwnPtr<LayerCompositor> m_compositor;
202 RefPtr<IntervalArena> m_intervalArena; 202 RefPtr<IntervalArena> m_intervalArena;
203 203
(...skipping 18 matching lines...) Expand all
222 222
223 Position m_start; 223 Position m_start;
224 Position m_end; 224 Position m_end;
225 Position m_extent; 225 Position m_extent;
226 EAffinity m_affinity; 226 EAffinity m_affinity;
227 bool m_hasPendingSelection : 1; 227 bool m_hasPendingSelection : 1;
228 bool m_shouldShowBlockCursor : 1; 228 bool m_shouldShowBlockCursor : 1;
229 } m_pendingSelection; 229 } m_pendingSelection;
230 }; 230 };
231 231
232 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); 232 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderView, isRenderView());
233 233
234 // Suspends the LayoutState cached offset and clipRect optimization. Used under transforms 234 // Suspends the LayoutState cached offset and clipRect optimization. Used under transforms
235 // that cannot be represented by LayoutState (common in SVG) and when manipulati ng the render 235 // that cannot be represented by LayoutState (common in SVG) and when manipulati ng the render
236 // tree during layout in ways that can trigger paint invalidation of a non-child (e.g. when a list item 236 // tree during layout in ways that can trigger paint invalidation of a non-child (e.g. when a list item
237 // moves its list marker around). Note that even when disabled, LayoutState is s till used to 237 // moves its list marker around). Note that even when disabled, LayoutState is s till used to
238 // store layoutDelta. 238 // store layoutDelta.
239 class ForceHorriblySlowRectMapping { 239 class ForceHorriblySlowRectMapping {
240 WTF_MAKE_NONCOPYABLE(ForceHorriblySlowRectMapping); 240 WTF_MAKE_NONCOPYABLE(ForceHorriblySlowRectMapping);
241 public: 241 public:
242 ForceHorriblySlowRectMapping(const PaintInvalidationState* paintInvalidation State) 242 ForceHorriblySlowRectMapping(const PaintInvalidationState* paintInvalidation State)
(...skipping 10 matching lines...) Expand all
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/RenderVideo.cpp ('k') | Source/core/rendering/RenderView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698