| OLD | NEW |
| 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. 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 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 return max<LayoutUnit>(0, height); | 1066 return max<LayoutUnit>(0, height); |
| 1067 } | 1067 } |
| 1068 | 1068 |
| 1069 // Hit Testing | 1069 // Hit Testing |
| 1070 bool RenderBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result
, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffs
et, HitTestAction action) | 1070 bool RenderBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result
, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffs
et, HitTestAction action) |
| 1071 { | 1071 { |
| 1072 LayoutPoint adjustedLocation = accumulatedOffset + location(); | 1072 LayoutPoint adjustedLocation = accumulatedOffset + location(); |
| 1073 | 1073 |
| 1074 // Check kids first. | 1074 // Check kids first. |
| 1075 for (RenderObject* child = slowLastChild(); child; child = child->previousSi
bling()) { | 1075 for (RenderObject* child = slowLastChild(); child; child = child->previousSi
bling()) { |
| 1076 if (!child->hasLayer() && child->nodeAtPoint(request, result, locationIn
Container, adjustedLocation, action)) { | 1076 if ((!child->hasLayer() || !toRenderLayerModelObject(child)->layer()->is
SelfPaintingLayer()) && child->nodeAtPoint(request, result, locationInContainer,
adjustedLocation, action)) { |
| 1077 updateHitTestResult(result, locationInContainer.point() - toLayoutSi
ze(adjustedLocation)); | 1077 updateHitTestResult(result, locationInContainer.point() - toLayoutSi
ze(adjustedLocation)); |
| 1078 return true; | 1078 return true; |
| 1079 } | 1079 } |
| 1080 } | 1080 } |
| 1081 | 1081 |
| 1082 // Check our bounds next. For this purpose always assume that we can only be
hit in the | 1082 // Check our bounds next. For this purpose always assume that we can only be
hit in the |
| 1083 // foreground phase (which is true for replaced elements like images). | 1083 // foreground phase (which is true for replaced elements like images). |
| 1084 LayoutRect boundsRect = borderBoxRect(); | 1084 LayoutRect boundsRect = borderBoxRect(); |
| 1085 boundsRect.moveBy(adjustedLocation); | 1085 boundsRect.moveBy(adjustedLocation); |
| 1086 if (visibleToHitTestRequest(request) && action == HitTestForeground && locat
ionInContainer.intersects(boundsRect)) { | 1086 if (visibleToHitTestRequest(request) && action == HitTestForeground && locat
ionInContainer.intersects(boundsRect)) { |
| (...skipping 3608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4695 return 0; | 4695 return 0; |
| 4696 | 4696 |
| 4697 if (!layoutState && !flowThreadContainingBlock()) | 4697 if (!layoutState && !flowThreadContainingBlock()) |
| 4698 return 0; | 4698 return 0; |
| 4699 | 4699 |
| 4700 RenderBlock* containerBlock = containingBlock(); | 4700 RenderBlock* containerBlock = containingBlock(); |
| 4701 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4701 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
| 4702 } | 4702 } |
| 4703 | 4703 |
| 4704 } // namespace WebCore | 4704 } // namespace WebCore |
| OLD | NEW |