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

Side by Side Diff: sky/engine/core/rendering/RenderObject.cpp

Issue 924273002: Remove HitTestFilter. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase Created 5 years, 10 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 | « sky/engine/core/rendering/RenderObject.h ('k') | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 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) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 borderImage->removeClient(this); 1667 borderImage->removeClient(this);
1668 } 1668 }
1669 delete this; 1669 delete this;
1670 } 1670 }
1671 1671
1672 PositionWithAffinity RenderObject::positionForPoint(const LayoutPoint&) 1672 PositionWithAffinity RenderObject::positionForPoint(const LayoutPoint&)
1673 { 1673 {
1674 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); 1674 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM);
1675 } 1675 }
1676 1676
1677 bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffse t, HitTestFilter hitTestFilter) 1677 bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffse t)
1678 { 1678 {
1679 bool inside = false; 1679 // First test the foreground layer (lines and inlines).
1680 if (hitTestFilter != HitTestSelf) { 1680 bool inside = nodeAtPoint(request, result, locationInContainer, accumulatedO ffset, HitTestForeground);
1681 // First test the foreground layer (lines and inlines).
1682 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf fset, HitTestForeground);
1683 }
1684
1685 // See if the mouse is inside us but not any of our descendants 1681 // See if the mouse is inside us but not any of our descendants
1686 if (hitTestFilter != HitTestDescendants && !inside) 1682 if (!inside)
1687 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf fset, HitTestBlockBackground); 1683 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf fset, HitTestBlockBackground);
1688
1689 return inside; 1684 return inside;
1690 } 1685 }
1691 1686
1692 void RenderObject::updateHitTestResult(HitTestResult& result, const LayoutPoint& point) 1687 void RenderObject::updateHitTestResult(HitTestResult& result, const LayoutPoint& point)
1693 { 1688 {
1694 if (result.innerNode()) 1689 if (result.innerNode())
1695 return; 1690 return;
1696 1691
1697 Node* node = this->node(); 1692 Node* node = this->node();
1698 1693
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
1983 { 1978 {
1984 if (object1) { 1979 if (object1) {
1985 const blink::RenderObject* root = object1; 1980 const blink::RenderObject* root = object1;
1986 while (root->parent()) 1981 while (root->parent())
1987 root = root->parent(); 1982 root = root->parent();
1988 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 1983 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
1989 } 1984 }
1990 } 1985 }
1991 1986
1992 #endif 1987 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698