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

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

Issue 1179223002: Implement autoplay gesture override experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: linker errors on win/mac... Created 5 years, 3 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
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 24 matching lines...) Expand all
35 #include "platform/PODFreeListArena.h" 35 #include "platform/PODFreeListArena.h"
36 #include "platform/RuntimeEnabledFeatures.h" 36 #include "platform/RuntimeEnabledFeatures.h"
37 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
38 #include "platform/scroll/ScrollableArea.h" 38 #include "platform/scroll/ScrollableArea.h"
39 #include "wtf/OwnPtr.h" 39 #include "wtf/OwnPtr.h"
40 40
41 namespace blink { 41 namespace blink {
42 42
43 class DeprecatedPaintLayerCompositor; 43 class DeprecatedPaintLayerCompositor;
44 class LayoutQuote; 44 class LayoutQuote;
45 class LayoutMedia;
45 46
46 // The root of the layout tree, corresponding to the CSS initial containing bloc k. 47 // The root of the layout tree, corresponding to the CSS initial containing bloc k.
47 // It's dimensions match that of the logical viewport (which may be different fr om 48 // It's dimensions match that of the logical viewport (which may be different fr om
48 // the visible viewport in fixed-layout mode), and it is always at position (0,0 ) 49 // the visible viewport in fixed-layout mode), and it is always at position (0,0 )
49 // relative to the document (and so isn't necessarily in view). 50 // relative to the document (and so isn't necessarily in view).
50 class CORE_EXPORT LayoutView final : public LayoutBlockFlow { 51 class CORE_EXPORT LayoutView final : public LayoutBlockFlow {
51 public: 52 public:
52 explicit LayoutView(Document*); 53 explicit LayoutView(Document*);
53 ~LayoutView() override; 54 ~LayoutView() override;
54 void willBeDestroyed() override; 55 void willBeDestroyed() override;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 void pushLayoutState(LayoutState& layoutState) { m_layoutState = &layoutStat e; } 183 void pushLayoutState(LayoutState& layoutState) { m_layoutState = &layoutStat e; }
183 void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState ->next(); } 184 void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState ->next(); }
184 void invalidateTreeIfNeeded(PaintInvalidationState&) final; 185 void invalidateTreeIfNeeded(PaintInvalidationState&) final;
185 186
186 LayoutRect visualOverflowRect() const override; 187 LayoutRect visualOverflowRect() const override;
187 188
188 // Invalidates paint for the entire view, including composited descendants, but not including child frames. 189 // Invalidates paint for the entire view, including composited descendants, but not including child frames.
189 // It is very likely you do not want to call this method. 190 // It is very likely you do not want to call this method.
190 void setShouldDoFullPaintInvalidationForViewAndAllDescendants(); 191 void setShouldDoFullPaintInvalidationForViewAndAllDescendants();
191 192
193 // Some LayoutMedias want to know about their viewport visibility for
194 // crbug.com/487345,402044 . This facility will be removed once those
195 // experiments complete.
196 void registerMediaForPositionChangeNotification(LayoutMedia*);
197 void unregisterMediaForPositionChangeNotification(LayoutMedia*);
198 // Notify all registered LayoutMedias that their position on-screen might
199 // have changed.
200 void sendMediaPositionChangeNotifications();
201
192 private: 202 private:
193 void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const override; 203 void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const override;
194 204
195 template <typename Strategy> 205 template <typename Strategy>
196 void commitPendingSelectionAlgorithm(); 206 void commitPendingSelectionAlgorithm();
197 207
198 const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ances torToStopAt, LayoutGeometryMap&) const override; 208 const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ances torToStopAt, LayoutGeometryMap&) const override;
199 void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const ove rride; 209 void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const ove rride;
200 void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOf fset) const override; 210 void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOf fset) const override;
201 211
(...skipping 25 matching lines...) Expand all
227 RefPtr<IntervalArena> m_intervalArena; 237 RefPtr<IntervalArena> m_intervalArena;
228 238
229 LayoutQuote* m_layoutQuoteHead; 239 LayoutQuote* m_layoutQuoteHead;
230 unsigned m_layoutCounterCount; 240 unsigned m_layoutCounterCount;
231 241
232 unsigned m_hitTestCount; 242 unsigned m_hitTestCount;
233 unsigned m_hitTestCacheHits; 243 unsigned m_hitTestCacheHits;
234 OwnPtrWillBePersistent<HitTestCache> m_hitTestCache; 244 OwnPtrWillBePersistent<HitTestCache> m_hitTestCache;
235 245
236 OwnPtrWillBePersistent<PendingSelection> m_pendingSelection; 246 OwnPtrWillBePersistent<PendingSelection> m_pendingSelection;
247
248 Vector<LayoutMedia*> m_mediaForPositionNotification;
237 }; 249 };
238 250
239 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); 251 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView());
240 252
241 // Suspends the PaintInvalidationState cached offset and clipRect optimization. Used under transforms 253 // Suspends the PaintInvalidationState cached offset and clipRect optimization. Used under transforms
242 // that cannot be represented by PaintInvalidationState (common in SVG) and when paint invalidation 254 // that cannot be represented by PaintInvalidationState (common in SVG) and when paint invalidation
243 // containers don't follow the common tree-walk algorithm (e.g. when an absolute positioned descendant 255 // containers don't follow the common tree-walk algorithm (e.g. when an absolute positioned descendant
244 // is nested under a relatively positioned inline-block child). 256 // is nested under a relatively positioned inline-block child).
245 class ForceHorriblySlowRectMapping { 257 class ForceHorriblySlowRectMapping {
246 STACK_ALLOCATED(); 258 STACK_ALLOCATED();
(...skipping 13 matching lines...) Expand all
260 m_paintInvalidationState->m_cachedOffsetsEnabled = true; 272 m_paintInvalidationState->m_cachedOffsetsEnabled = true;
261 } 273 }
262 private: 274 private:
263 const PaintInvalidationState* m_paintInvalidationState; 275 const PaintInvalidationState* m_paintInvalidationState;
264 bool m_didDisable; 276 bool m_didDisable;
265 }; 277 };
266 278
267 } // namespace blink 279 } // namespace blink
268 280
269 #endif // LayoutView_h 281 #endif // LayoutView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698