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

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

Issue 1158673008: Moving HitTest function to DeprecatedPaintLayerStackingNode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reviewer comments Created 5 years, 6 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) 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutP oint&) const; 223 void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutP oint&) const;
224 void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutR ect&) const; 224 void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutR ect&) const;
225 225
226 // Does the same as convertToLayerCoords() when not in multicol. For multico l, however, 226 // Does the same as convertToLayerCoords() when not in multicol. For multico l, however,
227 // convertToLayerCoords() calculates the offset in flow-thread coordinates ( what the layout 227 // convertToLayerCoords() calculates the offset in flow-thread coordinates ( what the layout
228 // engine uses internally), while this method calculates the visual coordina tes; i.e. it figures 228 // engine uses internally), while this method calculates the visual coordina tes; i.e. it figures
229 // out which column the layer starts in and adds in the offset. See 229 // out which column the layer starts in and adds in the offset. See
230 // http://www.chromium.org/developers/design-documents/multi-column-layout f or more info. 230 // http://www.chromium.org/developers/design-documents/multi-column-layout f or more info.
231 LayoutPoint visualOffsetFromAncestor(const DeprecatedPaintLayer* ancestorLay er) const; 231 LayoutPoint visualOffsetFromAncestor(const DeprecatedPaintLayer* ancestorLay er) const;
232 232
233 // The hitTest() method looks for mouse events by walking layers that inters ect the point from front to back.
234 bool hitTest(HitTestResult&);
235 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&);
236
237 // Pass offsetFromRoot if known. 233 // Pass offsetFromRoot if known.
238 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d amageRect, const DeprecatedPaintLayer* rootLayer, const LayoutPoint* offsetFromR oot = 0) const; 234 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d amageRect, const DeprecatedPaintLayer* rootLayer, const LayoutPoint* offsetFromR oot = 0) const;
239 235
240 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know n. 236 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know n.
241 LayoutRect physicalBoundingBox(const DeprecatedPaintLayer* ancestorLayer, co nst LayoutPoint* offsetFromRoot = 0) const; 237 LayoutRect physicalBoundingBox(const DeprecatedPaintLayer* ancestorLayer, co nst LayoutPoint* offsetFromRoot = 0) const;
242 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const D eprecatedPaintLayer* ancestorLayer, const LayoutPoint& offsetFromRoot) const; 238 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const D eprecatedPaintLayer* ancestorLayer, const LayoutPoint& offsetFromRoot) const;
243 LayoutRect fragmentsBoundingBox(const DeprecatedPaintLayer* ancestorLayer) c onst; 239 LayoutRect fragmentsBoundingBox(const DeprecatedPaintLayer* ancestorLayer) c onst;
244 240
245 LayoutRect boundingBoxForCompositingOverlapTest() const; 241 LayoutRect boundingBoxForCompositingOverlapTest() const;
246 242
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 }; 521 };
526 522
527 enum TransparencyClipBoxMode { 523 enum TransparencyClipBoxMode {
528 DescendantsOfTransparencyClipBox, 524 DescendantsOfTransparencyClipBox,
529 RootOfTransparencyClipBox 525 RootOfTransparencyClipBox
530 }; 526 };
531 527
532 static LayoutRect transparencyClipBox(const DeprecatedPaintLayer*, const Dep recatedPaintLayer* rootLayer, TransparencyClipBoxBehavior transparencyBehavior, 528 static LayoutRect transparencyClipBox(const DeprecatedPaintLayer*, const Dep recatedPaintLayer* rootLayer, TransparencyClipBoxBehavior transparencyBehavior,
533 TransparencyClipBoxMode transparencyMode, const LayoutSize& subPixelAccu mulation, PaintBehavior = 0); 529 TransparencyClipBoxMode transparencyMode, const LayoutSize& subPixelAccu mulation, PaintBehavior = 0);
534 530
531 DeprecatedPaintLayer* hitTestLayer(DeprecatedPaintLayer* rootLayer, Deprecat edPaintLayer* containerLayer, HitTestResult&,
Julien - ping for review 2015/06/05 00:46:54 I would assume we would want to pass |const Deprec
chadarmstrong 2015/06/05 17:24:34 Acknowledged.
532 const LayoutRect& hitTestRect, const HitTestLocation&, bool appliedTrans form,
533 const HitTestingTransformState* = 0, double* zOffset = 0);
534
535 private: 535 private:
536 // Bounding box in the coordinates of this layer. 536 // Bounding box in the coordinates of this layer.
537 LayoutRect logicalBoundingBox() const; 537 LayoutRect logicalBoundingBox() const;
538 538
539 bool hasOverflowControls() const; 539 bool hasOverflowControls() const;
540 540
541 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 541 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
542 542
543 // Returns true if the position changed. 543 // Returns true if the position changed.
544 bool updateLayerPosition(); 544 bool updateLayerPosition();
545 545
546 void updateLayerPositionRecursive(); 546 void updateLayerPositionRecursive();
547 void updateLayerPositionsAfterScrollRecursive(const DoubleSize& scrollDelta, bool paintInvalidationContainerWasScrolled); 547 void updateLayerPositionsAfterScrollRecursive(const DoubleSize& scrollDelta, bool paintInvalidationContainerWasScrolled);
548 548
549 void setNextSibling(DeprecatedPaintLayer* next) { m_next = next; } 549 void setNextSibling(DeprecatedPaintLayer* next) { m_next = next; }
550 void setPreviousSibling(DeprecatedPaintLayer* prev) { m_previous = prev; } 550 void setPreviousSibling(DeprecatedPaintLayer* prev) { m_previous = prev; }
551 void setFirstChild(DeprecatedPaintLayer* first) { m_first = first; } 551 void setFirstChild(DeprecatedPaintLayer* first) { m_first = first; }
552 void setLastChild(DeprecatedPaintLayer* last) { m_last = last; } 552 void setLastChild(DeprecatedPaintLayer* last) { m_last = last; }
553 553
554 void updateHasSelfPaintingLayerDescendant() const; 554 void updateHasSelfPaintingLayerDescendant() const;
555 DeprecatedPaintLayer* hitTestLayer(DeprecatedPaintLayer* rootLayer, Deprecat edPaintLayer* containerLayer, HitTestResult&,
556 const LayoutRect& hitTestRect, const HitTestLocation&, bool appliedTrans form,
557 const HitTestingTransformState* = 0, double* zOffset = 0);
558 DeprecatedPaintLayer* hitTestLayerByApplyingTransform(DeprecatedPaintLayer* rootLayer, DeprecatedPaintLayer* containerLayer, HitTestResult&, 555 DeprecatedPaintLayer* hitTestLayerByApplyingTransform(DeprecatedPaintLayer* rootLayer, DeprecatedPaintLayer* containerLayer, HitTestResult&,
559 const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingT ransformState* = 0, double* zOffset = 0, 556 const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingT ransformState* = 0, double* zOffset = 0,
560 const LayoutPoint& translationOffset = LayoutPoint()); 557 const LayoutPoint& translationOffset = LayoutPoint());
561 DeprecatedPaintLayer* hitTestChildren(ChildrenIteration, DeprecatedPaintLaye r* rootLayer, HitTestResult&, 558 DeprecatedPaintLayer* hitTestChildren(ChildrenIteration, DeprecatedPaintLaye r* rootLayer, HitTestResult&,
562 const LayoutRect& hitTestRect, const HitTestLocation&, 559 const LayoutRect& hitTestRect, const HitTestLocation&,
563 const HitTestingTransformState*, double* zOffsetForDescendants, double* zOffset, 560 const HitTestingTransformState*, double* zOffsetForDescendants, double* zOffset,
564 const HitTestingTransformState* unflattenedTransformState, bool depthSor tDescendants); 561 const HitTestingTransformState* unflattenedTransformState, bool depthSor tDescendants);
565 DeprecatedPaintLayer* hitTestPaginatedChildLayer(DeprecatedPaintLayer* child Layer, DeprecatedPaintLayer* rootLayer, HitTestResult&, 562 DeprecatedPaintLayer* hitTestPaginatedChildLayer(DeprecatedPaintLayer* child Layer, DeprecatedPaintLayer* rootLayer, HitTestResult&,
566 const LayoutRect& hitTestRect, const HitTestLocation&, 563 const LayoutRect& hitTestRect, const HitTestLocation&,
567 const HitTestingTransformState*, double* zOffset); 564 const HitTestingTransformState*, double* zOffset);
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 719
723 } // namespace blink 720 } // namespace blink
724 721
725 #ifndef NDEBUG 722 #ifndef NDEBUG
726 // Outside the WebCore namespace for ease of invocation from gdb. 723 // Outside the WebCore namespace for ease of invocation from gdb.
727 void showLayerTree(const blink::DeprecatedPaintLayer*); 724 void showLayerTree(const blink::DeprecatedPaintLayer*);
728 void showLayerTree(const blink::LayoutObject*); 725 void showLayerTree(const blink::LayoutObject*);
729 #endif 726 #endif
730 727
731 #endif // Layer_h 728 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698