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

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: still long way to go Created 5 years, 4 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 const DeprecatedPaintLayer* root() const 133 const DeprecatedPaintLayer* root() const
134 { 134 {
135 const DeprecatedPaintLayer* curr = this; 135 const DeprecatedPaintLayer* curr = this;
136 while (curr->parent()) 136 while (curr->parent())
137 curr = curr->parent(); 137 curr = curr->parent();
138 return curr; 138 return curr;
139 } 139 }
140 140
141 const LayoutPoint& location() const { ASSERT(!m_needsPositionUpdate); return m_location; } 141 const LayoutPoint& location() const { ASSERT(!m_needsPositionUpdate); return m_location; }
142 // Note: This function is only needed during the transition period to SPv2.
143 // Once we have eliminated layer-based hit testing and clipping,
144 // we can cache the unscrolled location instead.
145 LayoutPoint locationSansOverflowScroll() const;
pdr. 2015/08/25 20:47:55 Super nit: locationWithoutOverflowScroll.
trchen 2015/08/26 07:39:04 Acknowledged. Probably will de-dupe the function a
142 // FIXME: size() should ASSERT(!m_needsPositionUpdate) as well, but that fai ls in some tests, 146 // FIXME: size() should ASSERT(!m_needsPositionUpdate) as well, but that fai ls in some tests,
143 // for example, fast/repaint/clipped-relative.html. 147 // for example, fast/repaint/clipped-relative.html.
144 const IntSize& size() const { return m_size; } 148 const IntSize& size() const { return m_size; }
145 void setSizeHackForLayoutTreeAsText(const IntSize& size) { m_size = size; } 149 void setSizeHackForLayoutTreeAsText(const IntSize& size) { m_size = size; }
146 150
147 LayoutRect rect() const { return LayoutRect(location(), LayoutSize(size())); } 151 LayoutRect rect() const { return LayoutRect(location(), LayoutSize(size())); }
148 152
149 bool isRootLayer() const { return m_isRootLayer; } 153 bool isRootLayer() const { return m_isRootLayer; }
150 154
151 DeprecatedPaintLayerCompositor* compositor() const; 155 DeprecatedPaintLayerCompositor* compositor() const;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 221
218 bool hasAncestorWithFilterOutsets() const; 222 bool hasAncestorWithFilterOutsets() const;
219 223
220 bool canUseConvertToLayerCoords() const 224 bool canUseConvertToLayerCoords() const
221 { 225 {
222 // These LayoutObjects have an impact on their layers without the layout Objects knowing about it. 226 // These LayoutObjects have an impact on their layers without the layout Objects knowing about it.
223 return !layoutObject()->hasTransformRelatedProperty() && !layoutObject() ->isSVGRoot(); 227 return !layoutObject()->hasTransformRelatedProperty() && !layoutObject() ->isSVGRoot();
224 } 228 }
225 229
226 void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutP oint&) const; 230 void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutP oint&) const;
231 void convertToLayerCoordsSansOverflowScroll(const DeprecatedPaintLayer* ance storLayer, LayoutPoint&) const;
227 void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutR ect&) const; 232 void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutR ect&) const;
228 233
229 // Does the same as convertToLayerCoords() when not in multicol. For multico l, however, 234 // Does the same as convertToLayerCoords() when not in multicol. For multico l, however,
230 // convertToLayerCoords() calculates the offset in flow-thread coordinates ( what the layout 235 // convertToLayerCoords() calculates the offset in flow-thread coordinates ( what the layout
231 // engine uses internally), while this method calculates the visual coordina tes; i.e. it figures 236 // engine uses internally), while this method calculates the visual coordina tes; i.e. it figures
232 // out which column the layer starts in and adds in the offset. See 237 // out which column the layer starts in and adds in the offset. See
233 // http://www.chromium.org/developers/design-documents/multi-column-layout f or more info. 238 // http://www.chromium.org/developers/design-documents/multi-column-layout f or more info.
234 LayoutPoint visualOffsetFromAncestor(const DeprecatedPaintLayer* ancestorLay er) const; 239 LayoutPoint visualOffsetFromAncestor(const DeprecatedPaintLayer* ancestorLay er) const;
235 240
236 // The hitTest() method looks for mouse events by walking layers that inters ect the point from front to back. 241 // The hitTest() method looks for mouse events by walking layers that inters ect the point from front to back.
237 bool hitTest(HitTestResult&); 242 bool hitTest(HitTestResult&);
238 243
239 // Pass offsetFromRoot if known. 244 // Pass offsetFromRoot if known.
240 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d amageRect, const DeprecatedPaintLayer* rootLayer, const LayoutPoint* offsetFromR oot = 0) const; 245 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d amageRect, const DeprecatedPaintLayer* rootLayer, const LayoutPoint* offsetFromR oot = 0) const;
241 246
242 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know n. 247 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know n.
243 LayoutRect physicalBoundingBox(const DeprecatedPaintLayer* ancestorLayer, co nst LayoutPoint* offsetFromRoot = 0) const; 248 LayoutRect physicalBoundingBox(const DeprecatedPaintLayer* ancestorLayer, co nst LayoutPoint* offsetFromRoot = 0) const;
244 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const D eprecatedPaintLayer* ancestorLayer, const LayoutPoint& offsetFromRoot) const; 249 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const L ayoutPoint& offsetFromRoot) const;
245 LayoutRect fragmentsBoundingBox(const DeprecatedPaintLayer* ancestorLayer) c onst; 250 LayoutRect fragmentsBoundingBox(const DeprecatedPaintLayer* ancestorLayer) c onst;
246 251
247 LayoutRect boundingBoxForCompositingOverlapTest() const; 252 LayoutRect boundingBoxForCompositingOverlapTest() const;
248 253
249 // If true, this layer's children are included in its bounds for overlap tes ting. 254 // If true, this layer's children are included in its bounds for overlap tes ting.
250 // We can't rely on the children's positions if this layer has a filter that could have moved the children's pixels around. 255 // We can't rely on the children's positions if this layer has a filter that could have moved the children's pixels around.
251 bool overlapBoundsIncludeChildren() const { return hasFilter() && layoutObje ct()->style()->filter().hasFilterThatMovesPixels(); } 256 bool overlapBoundsIncludeChildren() const { return hasFilter() && layoutObje ct()->style()->filter().hasFilterThatMovesPixels(); }
252 257
253 enum CalculateBoundsOptions { 258 enum CalculateBoundsOptions {
254 ApplyBoundsChickenEggHacks, 259 ApplyBoundsChickenEggHacks,
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 724
720 } // namespace blink 725 } // namespace blink
721 726
722 #ifndef NDEBUG 727 #ifndef NDEBUG
723 // Outside the WebCore namespace for ease of invocation from gdb. 728 // Outside the WebCore namespace for ease of invocation from gdb.
724 void showLayerTree(const blink::DeprecatedPaintLayer*); 729 void showLayerTree(const blink::DeprecatedPaintLayer*);
725 void showLayerTree(const blink::LayoutObject*); 730 void showLayerTree(const blink::LayoutObject*);
726 #endif 731 #endif
727 732
728 #endif // Layer_h 733 #endif // Layer_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/paint/DeprecatedPaintLayer.cpp » ('j') | Source/core/paint/DeprecatedPaintLayer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698