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

Side by Side Diff: sky/engine/core/rendering/RenderView.h

Issue 737523002: Sky: Move iframe geometry updates to FrameView::updateLayout instead of (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: . Created 6 years, 1 month 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) 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,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 * 19 *
20 */ 20 */
21 21
22 #ifndef RenderView_h 22 #ifndef RenderView_h
23 #define RenderView_h 23 #define RenderView_h
24 24
25 #include "core/frame/FrameView.h" 25 #include "core/frame/FrameView.h"
26 #include "core/rendering/LayoutState.h" 26 #include "core/rendering/LayoutState.h"
27 #include "core/rendering/PaintInvalidationState.h" 27 #include "core/rendering/PaintInvalidationState.h"
28 #include "core/rendering/RenderBlockFlow.h" 28 #include "core/rendering/RenderBlockFlow.h"
29 #include "core/rendering/RenderIFrame.h"
30 #include "platform/scroll/ScrollableArea.h" 29 #include "platform/scroll/ScrollableArea.h"
31 #include "wtf/OwnPtr.h" 30 #include "wtf/OwnPtr.h"
32 31
33 namespace blink { 32 namespace blink {
34 33
35 class RenderLayerCompositor; 34 class RenderLayerCompositor;
36 35
37 // The root of the render tree, corresponding to the CSS initial containing bloc k. 36 // The root of the render tree, corresponding to the CSS initial containing bloc k.
38 // It's dimensions match that of the logical viewport (which may be different fr om 37 // It's dimensions match that of the logical viewport (which may be different fr om
39 // the visible viewport in fixed-layout mode), and it is always at position (0,0 ) 38 // the visible viewport in fixed-layout mode), and it is always at position (0,0 )
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 121
123 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const override; 122 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const override;
124 123
125 double layoutViewportWidth() const; 124 double layoutViewportWidth() const;
126 double layoutViewportHeight() const; 125 double layoutViewportHeight() const;
127 126
128 void pushLayoutState(LayoutState&); 127 void pushLayoutState(LayoutState&);
129 void popLayoutState(); 128 void popLayoutState();
130 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override final; 129 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override final;
131 130
132 void addIFrame(RenderIFrame* iframe);
133 void removeIFrame(RenderIFrame* iframe);
134
135 private: 131 private:
136 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, const PaintInvalidationState* = 0) const override; 132 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, const PaintInvalidationState* = 0) const override;
137 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const override; 133 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const override;
138 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst override; 134 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst override;
139 135
140 bool shouldInvalidatePaint(const LayoutRect&) const; 136 bool shouldInvalidatePaint(const LayoutRect&) const;
141 137
142 void layoutContent(); 138 void layoutContent();
143 #if ENABLE(ASSERT) 139 #if ENABLE(ASSERT)
144 void checkLayoutState(); 140 void checkLayoutState();
(...skipping 13 matching lines...) Expand all
158 154
159 int m_selectionStartPos; 155 int m_selectionStartPos;
160 int m_selectionEndPos; 156 int m_selectionEndPos;
161 157
162 LayoutState* m_layoutState; 158 LayoutState* m_layoutState;
163 OwnPtr<RenderLayerCompositor> m_compositor; 159 OwnPtr<RenderLayerCompositor> m_compositor;
164 160
165 unsigned m_renderCounterCount; 161 unsigned m_renderCounterCount;
166 162
167 unsigned m_hitTestCount; 163 unsigned m_hitTestCount;
168
169 WTF::HashSet<RenderIFrame*> m_iframes;
170 }; 164 };
171 165
172 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); 166 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView());
173 167
174 // Suspends the LayoutState cached offset and clipRect optimization. Used under transforms 168 // Suspends the LayoutState cached offset and clipRect optimization. Used under transforms
175 // that cannot be represented by LayoutState (common in SVG) and when manipulati ng the render 169 // that cannot be represented by LayoutState (common in SVG) and when manipulati ng the render
176 // tree during layout in ways that can trigger paint invalidation of a non-child (e.g. when a list item 170 // tree during layout in ways that can trigger paint invalidation of a non-child (e.g. when a list item
177 // moves its list marker around). Note that even when disabled, LayoutState is s till used to 171 // moves its list marker around). Note that even when disabled, LayoutState is s till used to
178 // store layoutDelta. 172 // store layoutDelta.
179 class ForceHorriblySlowRectMapping { 173 class ForceHorriblySlowRectMapping {
(...skipping 13 matching lines...) Expand all
193 m_paintInvalidationState->m_cachedOffsetsEnabled = true; 187 m_paintInvalidationState->m_cachedOffsetsEnabled = true;
194 } 188 }
195 private: 189 private:
196 const PaintInvalidationState* m_paintInvalidationState; 190 const PaintInvalidationState* m_paintInvalidationState;
197 bool m_didDisable; 191 bool m_didDisable;
198 }; 192 };
199 193
200 } // namespace blink 194 } // namespace blink
201 195
202 #endif // RenderView_h 196 #endif // RenderView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698