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

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

Issue 730653002: Sky: update the HTMLIFrameElement's geometry during paint invalidation rather (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: esprehn 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"
29 #include "platform/scroll/ScrollableArea.h" 30 #include "platform/scroll/ScrollableArea.h"
30 #include "wtf/OwnPtr.h" 31 #include "wtf/OwnPtr.h"
31 32
32 namespace blink { 33 namespace blink {
33 34
34 class RenderLayerCompositor; 35 class RenderLayerCompositor;
35 36
36 // The root of the render tree, corresponding to the CSS initial containing bloc k. 37 // The root of the render tree, corresponding to the CSS initial containing bloc k.
37 // It's dimensions match that of the logical viewport (which may be different fr om 38 // It's dimensions match that of the logical viewport (which may be different fr om
38 // the visible viewport in fixed-layout mode), and it is always at position (0,0 ) 39 // 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
121 122
122 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const override; 123 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const override;
123 124
124 double layoutViewportWidth() const; 125 double layoutViewportWidth() const;
125 double layoutViewportHeight() const; 126 double layoutViewportHeight() const;
126 127
127 void pushLayoutState(LayoutState&); 128 void pushLayoutState(LayoutState&);
128 void popLayoutState(); 129 void popLayoutState();
129 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override final; 130 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override final;
130 131
132 void addIFrame(RenderIFrame* iframe);
133 void removeIFrame(RenderIFrame* iframe);
134
131 private: 135 private:
132 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, const PaintInvalidationState* = 0) const override; 136 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, const PaintInvalidationState* = 0) const override;
133 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const override; 137 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const override;
134 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst override; 138 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst override;
135 139
136 bool shouldInvalidatePaint(const LayoutRect&) const; 140 bool shouldInvalidatePaint(const LayoutRect&) const;
137 141
138 void layoutContent(); 142 void layoutContent();
139 #if ENABLE(ASSERT) 143 #if ENABLE(ASSERT)
140 void checkLayoutState(); 144 void checkLayoutState();
(...skipping 13 matching lines...) Expand all
154 158
155 int m_selectionStartPos; 159 int m_selectionStartPos;
156 int m_selectionEndPos; 160 int m_selectionEndPos;
157 161
158 LayoutState* m_layoutState; 162 LayoutState* m_layoutState;
159 OwnPtr<RenderLayerCompositor> m_compositor; 163 OwnPtr<RenderLayerCompositor> m_compositor;
160 164
161 unsigned m_renderCounterCount; 165 unsigned m_renderCounterCount;
162 166
163 unsigned m_hitTestCount; 167 unsigned m_hitTestCount;
168
169 WTF::HashSet<RenderIFrame*> m_iframes;
164 }; 170 };
165 171
166 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); 172 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView());
167 173
168 // Suspends the LayoutState cached offset and clipRect optimization. Used under transforms 174 // Suspends the LayoutState cached offset and clipRect optimization. Used under transforms
169 // that cannot be represented by LayoutState (common in SVG) and when manipulati ng the render 175 // that cannot be represented by LayoutState (common in SVG) and when manipulati ng the render
170 // tree during layout in ways that can trigger paint invalidation of a non-child (e.g. when a list item 176 // tree during layout in ways that can trigger paint invalidation of a non-child (e.g. when a list item
171 // moves its list marker around). Note that even when disabled, LayoutState is s till used to 177 // moves its list marker around). Note that even when disabled, LayoutState is s till used to
172 // store layoutDelta. 178 // store layoutDelta.
173 class ForceHorriblySlowRectMapping { 179 class ForceHorriblySlowRectMapping {
(...skipping 13 matching lines...) Expand all
187 m_paintInvalidationState->m_cachedOffsetsEnabled = true; 193 m_paintInvalidationState->m_cachedOffsetsEnabled = true;
188 } 194 }
189 private: 195 private:
190 const PaintInvalidationState* m_paintInvalidationState; 196 const PaintInvalidationState* m_paintInvalidationState;
191 bool m_didDisable; 197 bool m_didDisable;
192 }; 198 };
193 199
194 } // namespace blink 200 } // namespace blink
195 201
196 #endif // RenderView_h 202 #endif // RenderView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698