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

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

Issue 1032823003: Refactor HitTestResult to store the HitTestRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 // most callsites want localToParentTransform() instead. 506 // most callsites want localToParentTransform() instead.
507 virtual AffineTransform localTransform() const; 507 virtual AffineTransform localTransform() const;
508 508
509 // Returns the full transform mapping from local coordinates to local coords for the parent SVG renderer 509 // Returns the full transform mapping from local coordinates to local coords for the parent SVG renderer
510 // This includes any viewport transforms and x/y offsets as well as the tran sform="" value off the element. 510 // This includes any viewport transforms and x/y offsets as well as the tran sform="" value off the element.
511 virtual const AffineTransform& localToParentTransform() const; 511 virtual const AffineTransform& localToParentTransform() const;
512 512
513 // SVG uses FloatPoint precise hit testing, and passes the point in parent 513 // SVG uses FloatPoint precise hit testing, and passes the point in parent
514 // coordinates instead of in paint invalidaiton container coordinates. Event ually the 514 // coordinates instead of in paint invalidaiton container coordinates. Event ually the
515 // rest of the rendering tree will move to a similar model. 515 // rest of the rendering tree will move to a similar model.
516 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F loatPoint& pointInParent, HitTestAction); 516 virtual bool nodeAtFloatPoint(HitTestResult&, const FloatPoint& pointInParen t, HitTestAction);
517 517
518 bool isAnonymous() const { return m_bitfields.isAnonymous(); } 518 bool isAnonymous() const { return m_bitfields.isAnonymous(); }
519 bool isAnonymousBlock() const 519 bool isAnonymousBlock() const
520 { 520 {
521 // This function is kept in sync with anonymous block creation condition s in 521 // This function is kept in sync with anonymous block creation condition s in
522 // LayoutBlock::createAnonymousBlock(). This includes creating an anonym ous 522 // LayoutBlock::createAnonymousBlock(). This includes creating an anonym ous
523 // LayoutBlock having a BLOCK or BOX display. Other classes such as Layo utTextFragment 523 // LayoutBlock having a BLOCK or BOX display. Other classes such as Layo utTextFragment
524 // are not LayoutBlocks and will return false. See https://bugs.webkit.o rg/show_bug.cgi?id=56709. 524 // are not LayoutBlocks and will return false. See https://bugs.webkit.o rg/show_bug.cgi?id=56709.
525 return isAnonymous() && (style()->display() == BLOCK || style()->display () == BOX) && style()->styleType() == NOPSEUDO && isLayoutBlock() && !isListMark er() && !isLayoutFlowThread() && !isLayoutMultiColumnSet() 525 return isAnonymous() && (style()->display() == BLOCK || style()->display () == BOX) && style()->styleType() == NOPSEUDO && isLayoutBlock() && !isListMark er() && !isLayoutFlowThread() && !isLayoutMultiColumnSet()
526 && !isLayoutFullScreen() 526 && !isLayoutFullScreen()
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 // Used for element state updates that cannot be fixed with a 732 // Used for element state updates that cannot be fixed with a
733 // paint invalidation and do not need a relayout. 733 // paint invalidation and do not need a relayout.
734 virtual void updateFromElement() { } 734 virtual void updateFromElement() { }
735 735
736 virtual void addAnnotatedRegions(Vector<AnnotatedRegionValue>&); 736 virtual void addAnnotatedRegions(Vector<AnnotatedRegionValue>&);
737 void collectAnnotatedRegions(Vector<AnnotatedRegionValue>&); 737 void collectAnnotatedRegions(Vector<AnnotatedRegionValue>&);
738 738
739 CompositingState compositingState() const; 739 CompositingState compositingState() const;
740 virtual CompositingReasons additionalCompositingReasons() const; 740 virtual CompositingReasons additionalCompositingReasons() const;
741 741
742 bool hitTest(const HitTestRequest&, HitTestResult&, const HitTestLocation& l ocationInContainer, const LayoutPoint& accumulatedOffset, HitTestFilter = HitTes tAll); 742 bool hitTest(HitTestResult&, const HitTestLocation& locationInContainer, con st LayoutPoint& accumulatedOffset, HitTestFilter = HitTestAll);
743 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&); 743 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&);
744 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion); 744 virtual bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInCo ntainer, const LayoutPoint& accumulatedOffset, HitTestAction);
745 745
746 virtual PositionWithAffinity positionForPoint(const LayoutPoint&); 746 virtual PositionWithAffinity positionForPoint(const LayoutPoint&);
747 PositionWithAffinity createPositionWithAffinity(int offset, EAffinity); 747 PositionWithAffinity createPositionWithAffinity(int offset, EAffinity);
748 PositionWithAffinity createPositionWithAffinity(const Position&); 748 PositionWithAffinity createPositionWithAffinity(const Position&);
749 749
750 virtual void dirtyLinesFromChangedChild(LayoutObject*); 750 virtual void dirtyLinesFromChangedChild(LayoutObject*);
751 751
752 // Set the style of the object and update the state of the object accordingl y. 752 // Set the style of the object and update the state of the object accordingl y.
753 void setStyle(PassRefPtr<LayoutStyle>); 753 void setStyle(PassRefPtr<LayoutStyle>);
754 754
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 void showTree(const blink::LayoutObject*); 1661 void showTree(const blink::LayoutObject*);
1662 void showLineTree(const blink::LayoutObject*); 1662 void showLineTree(const blink::LayoutObject*);
1663 void showLayoutTree(const blink::LayoutObject* object1); 1663 void showLayoutTree(const blink::LayoutObject* object1);
1664 // We don't make object2 an optional parameter so that showLayoutTree 1664 // We don't make object2 an optional parameter so that showLayoutTree
1665 // can be called from gdb easily. 1665 // can be called from gdb easily.
1666 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 1666 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
1667 1667
1668 #endif 1668 #endif
1669 1669
1670 #endif // LayoutObject_h 1670 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698