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

Side by Side Diff: Source/core/paint/DeprecatedPaintLayer.h

Issue 1284203004: Generate scroll/clip display item hierarchy for SPv2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: stripped localPaintingInfo cleanup and fixed-pos workarounds 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 const DeprecatedPaintLayerReflectionInfo* reflectionInfo() const { return m_ reflectionInfo.get(); } 145 const DeprecatedPaintLayerReflectionInfo* reflectionInfo() const { return m_ reflectionInfo.get(); }
146 146
147 const DeprecatedPaintLayer* root() const 147 const DeprecatedPaintLayer* root() const
148 { 148 {
149 const DeprecatedPaintLayer* curr = this; 149 const DeprecatedPaintLayer* curr = this;
150 while (curr->parent()) 150 while (curr->parent())
151 curr = curr->parent(); 151 curr = curr->parent();
152 return curr; 152 return curr;
153 } 153 }
154 154
155 const LayoutPoint& location() const { ASSERT(!m_needsPositionUpdate); return m_location; } 155 enum LocationQueryBehavior {
156 IncludeScroll,
157 ExcludeScroll
158 };
159 LayoutPoint location(LocationQueryBehavior behavior = IncludeScroll) const { ASSERT(!m_needsPositionUpdate); return behavior == IncludeScroll ? m_location : locationExcludingOverflowScroll(); }
160 // Note: This function is only needed during the transition period to SPv2.
161 // Once we have eliminated layer-based hit testing and clipping,
162 // we can cache the unscrolled location instead.
163 LayoutPoint locationExcludingOverflowScroll() const;
156 // FIXME: size() should ASSERT(!m_needsPositionUpdate) as well, but that fai ls in some tests, 164 // FIXME: size() should ASSERT(!m_needsPositionUpdate) as well, but that fai ls in some tests,
157 // for example, fast/repaint/clipped-relative.html. 165 // for example, fast/repaint/clipped-relative.html.
158 const IntSize& size() const { return m_size; } 166 const IntSize& size() const { return m_size; }
159 void setSizeHackForLayoutTreeAsText(const IntSize& size) { m_size = size; } 167 void setSizeHackForLayoutTreeAsText(const IntSize& size) { m_size = size; }
160 168
161 LayoutRect rect() const { return LayoutRect(location(), LayoutSize(size())); } 169 LayoutRect rect() const { return LayoutRect(location(), LayoutSize(size())); }
162 170
163 bool isRootLayer() const { return m_isRootLayer; } 171 bool isRootLayer() const { return m_isRootLayer; }
164 172
165 DeprecatedPaintLayerCompositor* compositor() const; 173 DeprecatedPaintLayerCompositor* compositor() const;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 DeprecatedPaintLayer* enclosingLayerForPaintInvalidationCrossingFrameBoundar ies() const; 238 DeprecatedPaintLayer* enclosingLayerForPaintInvalidationCrossingFrameBoundar ies() const;
231 239
232 bool hasAncestorWithFilterOutsets() const; 240 bool hasAncestorWithFilterOutsets() const;
233 241
234 bool canUseConvertToLayerCoords() const 242 bool canUseConvertToLayerCoords() const
235 { 243 {
236 // These LayoutObjects have an impact on their layers without the layout Objects knowing about it. 244 // These LayoutObjects have an impact on their layers without the layout Objects knowing about it.
237 return !layoutObject()->hasTransformRelatedProperty() && !layoutObject() ->isSVGRoot(); 245 return !layoutObject()->hasTransformRelatedProperty() && !layoutObject() ->isSVGRoot();
238 } 246 }
239 247
240 void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutP oint&) const; 248 void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutP oint&, LocationQueryBehavior = IncludeScroll) const;
241 void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutR ect&) const; 249 void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutR ect&) const;
242 250
243 // Does the same as convertToLayerCoords() when not in multicol. For multico l, however, 251 // Does the same as convertToLayerCoords() when not in multicol. For multico l, however,
244 // convertToLayerCoords() calculates the offset in flow-thread coordinates ( what the layout 252 // convertToLayerCoords() calculates the offset in flow-thread coordinates ( what the layout
245 // engine uses internally), while this method calculates the visual coordina tes; i.e. it figures 253 // engine uses internally), while this method calculates the visual coordina tes; i.e. it figures
246 // out which column the layer starts in and adds in the offset. See 254 // out which column the layer starts in and adds in the offset. See
247 // http://www.chromium.org/developers/design-documents/multi-column-layout f or more info. 255 // http://www.chromium.org/developers/design-documents/multi-column-layout f or more info.
248 LayoutPoint visualOffsetFromAncestor(const DeprecatedPaintLayer* ancestorLay er) const; 256 LayoutPoint visualOffsetFromAncestor(const DeprecatedPaintLayer* ancestorLay er) const;
249 257
250 // The hitTest() method looks for mouse events by walking layers that inters ect the point from front to back. 258 // The hitTest() method looks for mouse events by walking layers that inters ect the point from front to back.
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 758
751 } // namespace blink 759 } // namespace blink
752 760
753 #ifndef NDEBUG 761 #ifndef NDEBUG
754 // Outside the WebCore namespace for ease of invocation from gdb. 762 // Outside the WebCore namespace for ease of invocation from gdb.
755 void showLayerTree(const blink::DeprecatedPaintLayer*); 763 void showLayerTree(const blink::DeprecatedPaintLayer*);
756 void showLayerTree(const blink::LayoutObject*); 764 void showLayerTree(const blink::LayoutObject*);
757 #endif 765 #endif
758 766
759 #endif // Layer_h 767 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698