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

Side by Side Diff: Source/core/layout/LayoutView.h

Issue 1209133002: Traverse into child LayoutViews during invalidateTreeIfNeeded (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 double layoutViewportWidth() const; 177 double layoutViewportWidth() const;
178 double layoutViewportHeight() const; 178 double layoutViewportHeight() const;
179 179
180 void pushLayoutState(LayoutState& layoutState) { m_layoutState = &layoutStat e; } 180 void pushLayoutState(LayoutState& layoutState) { m_layoutState = &layoutStat e; }
181 void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState ->next(); } 181 void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState ->next(); }
182 virtual void invalidateTreeIfNeeded(PaintInvalidationState&) override final; 182 virtual void invalidateTreeIfNeeded(PaintInvalidationState&) override final;
183 183
184 virtual LayoutRect visualOverflowRect() const override; 184 virtual LayoutRect visualOverflowRect() const override;
185 185
186 bool forceCheckForPaintInvalidationByParent() const { return !isPaintInvalid ationContainer() && m_forceCheckForPaintInvalidationByParent; }
187 void setForceCheckForPaintInvalidationByParent(bool b) { ASSERT(!isPaintInva lidationContainer()); m_forceCheckForPaintInvalidationByParent = b; }
188 bool paintInvalidationCachedOffsetsEnabledByParent() const { return isPaintI nvalidationContainer() || m_paintInvalidationCachedOffsetsEnabledByParent; }
189 void setPaintInvalidationCachedOffsetsEnabledByParent(bool b) { ASSERT(!isPa intInvalidationContainer()); m_paintInvalidationCachedOffsetsEnabledByParent = b ; }
190
186 private: 191 private:
187 virtual void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidati onContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wa sFixed = nullptr, const PaintInvalidationState* = nullptr) const override; 192 virtual void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidati onContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wa sFixed = nullptr, const PaintInvalidationState* = nullptr) const override;
188 193
189 template <typename Strategy> 194 template <typename Strategy>
190 void commitPendingSelectionAlgorithm(); 195 void commitPendingSelectionAlgorithm();
191 196
192 virtual const LayoutObject* pushMappingToContainer(const LayoutBoxModelObjec t* ancestorToStopAt, LayoutGeometryMap&) const override; 197 virtual const LayoutObject* pushMappingToContainer(const LayoutBoxModelObjec t* ancestorToStopAt, LayoutGeometryMap&) const override;
193 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst override; 198 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst override;
194 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const override; 199 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const override;
195 200
(...skipping 24 matching lines...) Expand all
220 RefPtr<IntervalArena> m_intervalArena; 225 RefPtr<IntervalArena> m_intervalArena;
221 226
222 LayoutQuote* m_layoutQuoteHead; 227 LayoutQuote* m_layoutQuoteHead;
223 unsigned m_layoutCounterCount; 228 unsigned m_layoutCounterCount;
224 229
225 unsigned m_hitTestCount; 230 unsigned m_hitTestCount;
226 unsigned m_hitTestCacheHits; 231 unsigned m_hitTestCacheHits;
227 OwnPtrWillBePersistent<HitTestCache> m_hitTestCache; 232 OwnPtrWillBePersistent<HitTestCache> m_hitTestCache;
228 233
229 OwnPtrWillBePersistent<PendingSelection> m_pendingSelection; 234 OwnPtrWillBePersistent<PendingSelection> m_pendingSelection;
235
236 // Set during parent LayoutView's paint invalidation. Checked during its own paint invalidation.
237 // They are ignored if this LayoutView is paint invalidation container.
238 bool m_forceCheckForPaintInvalidationByParent;
239 bool m_paintInvalidationCachedOffsetsEnabledByParent;
230 }; 240 };
231 241
232 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); 242 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView());
233 243
234 // Suspends the LayoutState cached offset and clipRect optimization. Used under transforms 244 // 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 layout 245 // that cannot be represented by LayoutState (common in SVG) and when manipulati ng the layout
236 // tree during layout in ways that can trigger paint invalidation of a non-child (e.g. when a list item 246 // 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 247 // moves its list marker around). Note that even when disabled, LayoutState is s till used to
238 // store layoutDelta. 248 // store layoutDelta.
239 class ForceHorriblySlowRectMapping { 249 class ForceHorriblySlowRectMapping {
(...skipping 13 matching lines...) Expand all
253 m_paintInvalidationState->m_cachedOffsetsEnabled = true; 263 m_paintInvalidationState->m_cachedOffsetsEnabled = true;
254 } 264 }
255 private: 265 private:
256 const PaintInvalidationState* m_paintInvalidationState; 266 const PaintInvalidationState* m_paintInvalidationState;
257 bool m_didDisable; 267 bool m_didDisable;
258 }; 268 };
259 269
260 } // namespace blink 270 } // namespace blink
261 271
262 #endif // LayoutView_h 272 #endif // LayoutView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698