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

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

Issue 924263002: Get rid of HitTestChildBlockBackground walk. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
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 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, HitTestFilter hitTestFilter)
1678 { 1678 {
1679 bool inside = false; 1679 bool inside = false;
1680 if (hitTestFilter != HitTestSelf) { 1680 if (hitTestFilter != HitTestSelf) {
1681 // First test the foreground layer (lines and inlines). 1681 // First test the foreground layer (lines and inlines).
1682 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf fset, HitTestForeground); 1682 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf fset, HitTestForeground);
1683
1684 // Finally test to see if the mouse is in the background (within a child block's background).
1685 if (!inside)
1686 inside = nodeAtPoint(request, result, locationInContainer, accumulat edOffset, HitTestChildBlockBackgrounds);
ojan 2015/02/14 03:25:49 If the hitTest is in a child block's background it
1687 } 1683 }
1688 1684
1689 // See if the mouse is inside us but not any of our descendants 1685 // See if the mouse is inside us but not any of our descendants
1690 if (hitTestFilter != HitTestDescendants && !inside) 1686 if (hitTestFilter != HitTestDescendants && !inside)
1691 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf fset, HitTestBlockBackground); 1687 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf fset, HitTestBlockBackground);
1692 1688
1693 return inside; 1689 return inside;
1694 } 1690 }
1695 1691
1696 void RenderObject::updateHitTestResult(HitTestResult& result, const LayoutPoint& point) 1692 void RenderObject::updateHitTestResult(HitTestResult& result, const LayoutPoint& point)
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1987 { 1983 {
1988 if (object1) { 1984 if (object1) {
1989 const blink::RenderObject* root = object1; 1985 const blink::RenderObject* root = object1;
1990 while (root->parent()) 1986 while (root->parent())
1991 root = root->parent(); 1987 root = root->parent();
1992 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 1988 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
1993 } 1989 }
1994 } 1990 }
1995 1991
1996 #endif 1992 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/tests/layout/document-elementFromPoint.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698