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

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

Issue 1175623002: Revert of Moving HitTest function to DeprecatedPaintLayerStackingNode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « Source/core/layout/LayoutView.cpp ('k') | Source/core/paint/DeprecatedPaintLayer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
233 // Pass offsetFromRoot if known. 237 // Pass offsetFromRoot if known.
234 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d amageRect, const DeprecatedPaintLayer* rootLayer, const LayoutPoint* offsetFromR oot = 0) const; 238 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d amageRect, const DeprecatedPaintLayer* rootLayer, const LayoutPoint* offsetFromR oot = 0) const;
235 239
236 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know n. 240 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know n.
237 LayoutRect physicalBoundingBox(const DeprecatedPaintLayer* ancestorLayer, co nst LayoutPoint* offsetFromRoot = 0) const; 241 LayoutRect physicalBoundingBox(const DeprecatedPaintLayer* ancestorLayer, co nst LayoutPoint* offsetFromRoot = 0) const;
238 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const D eprecatedPaintLayer* ancestorLayer, const LayoutPoint& offsetFromRoot) const; 242 LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const D eprecatedPaintLayer* ancestorLayer, const LayoutPoint& offsetFromRoot) const;
239 LayoutRect fragmentsBoundingBox(const DeprecatedPaintLayer* ancestorLayer) c onst; 243 LayoutRect fragmentsBoundingBox(const DeprecatedPaintLayer* ancestorLayer) c onst;
240 244
241 LayoutRect boundingBoxForCompositingOverlapTest() const; 245 LayoutRect boundingBoxForCompositingOverlapTest() const;
242 246
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 }; 525 };
522 526
523 enum TransparencyClipBoxMode { 527 enum TransparencyClipBoxMode {
524 DescendantsOfTransparencyClipBox, 528 DescendantsOfTransparencyClipBox,
525 RootOfTransparencyClipBox 529 RootOfTransparencyClipBox
526 }; 530 };
527 531
528 static LayoutRect transparencyClipBox(const DeprecatedPaintLayer*, const Dep recatedPaintLayer* rootLayer, TransparencyClipBoxBehavior transparencyBehavior, 532 static LayoutRect transparencyClipBox(const DeprecatedPaintLayer*, const Dep recatedPaintLayer* rootLayer, TransparencyClipBoxBehavior transparencyBehavior,
529 TransparencyClipBoxMode transparencyMode, const LayoutSize& subPixelAccu mulation, PaintBehavior = 0); 533 TransparencyClipBoxMode transparencyMode, const LayoutSize& subPixelAccu mulation, PaintBehavior = 0);
530 534
531 DeprecatedPaintLayer* hitTestLayer(DeprecatedPaintLayer* rootLayer, Deprecat edPaintLayer* containerLayer, HitTestResult&,
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);
555 DeprecatedPaintLayer* hitTestLayerByApplyingTransform(DeprecatedPaintLayer* rootLayer, DeprecatedPaintLayer* containerLayer, HitTestResult&, 558 DeprecatedPaintLayer* hitTestLayerByApplyingTransform(DeprecatedPaintLayer* rootLayer, DeprecatedPaintLayer* containerLayer, HitTestResult&,
556 const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingT ransformState* = 0, double* zOffset = 0, 559 const LayoutRect& hitTestRect, const HitTestLocation&, const HitTestingT ransformState* = 0, double* zOffset = 0,
557 const LayoutPoint& translationOffset = LayoutPoint()); 560 const LayoutPoint& translationOffset = LayoutPoint());
558 DeprecatedPaintLayer* hitTestChildren(ChildrenIteration, DeprecatedPaintLaye r* rootLayer, HitTestResult&, 561 DeprecatedPaintLayer* hitTestChildren(ChildrenIteration, DeprecatedPaintLaye r* rootLayer, HitTestResult&,
559 const LayoutRect& hitTestRect, const HitTestLocation&, 562 const LayoutRect& hitTestRect, const HitTestLocation&,
560 const HitTestingTransformState*, double* zOffsetForDescendants, double* zOffset, 563 const HitTestingTransformState*, double* zOffsetForDescendants, double* zOffset,
561 const HitTestingTransformState* unflattenedTransformState, bool depthSor tDescendants); 564 const HitTestingTransformState* unflattenedTransformState, bool depthSor tDescendants);
562 DeprecatedPaintLayer* hitTestPaginatedChildLayer(DeprecatedPaintLayer* child Layer, DeprecatedPaintLayer* rootLayer, HitTestResult&, 565 DeprecatedPaintLayer* hitTestPaginatedChildLayer(DeprecatedPaintLayer* child Layer, DeprecatedPaintLayer* rootLayer, HitTestResult&,
563 const LayoutRect& hitTestRect, const HitTestLocation&, 566 const LayoutRect& hitTestRect, const HitTestLocation&,
564 const HitTestingTransformState*, double* zOffset); 567 const HitTestingTransformState*, double* zOffset);
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 722
720 } // namespace blink 723 } // namespace blink
721 724
722 #ifndef NDEBUG 725 #ifndef NDEBUG
723 // Outside the WebCore namespace for ease of invocation from gdb. 726 // Outside the WebCore namespace for ease of invocation from gdb.
724 void showLayerTree(const blink::DeprecatedPaintLayer*); 727 void showLayerTree(const blink::DeprecatedPaintLayer*);
725 void showLayerTree(const blink::LayoutObject*); 728 void showLayerTree(const blink::LayoutObject*);
726 #endif 729 #endif
727 730
728 #endif // Layer_h 731 #endif // Layer_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutView.cpp ('k') | Source/core/paint/DeprecatedPaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698