| 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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 // Check if the point is outside radii. | 1072 // Check if the point is outside radii. |
| 1073 if (style()->hasBorderRadius()) { | 1073 if (style()->hasBorderRadius()) { |
| 1074 LayoutRect borderRect = borderBoxRect(); | 1074 LayoutRect borderRect = borderBoxRect(); |
| 1075 borderRect.moveBy(adjustedLocation); | 1075 borderRect.moveBy(adjustedLocation); |
| 1076 RoundedRect border = style()->getRoundedBorderFor(borderRect); | 1076 RoundedRect border = style()->getRoundedBorderFor(borderRect); |
| 1077 if (!locationInContainer.intersects(border)) | 1077 if (!locationInContainer.intersects(border)) |
| 1078 return false; | 1078 return false; |
| 1079 } | 1079 } |
| 1080 | 1080 |
| 1081 // Now hit test our background | 1081 // Now hit test our background |
| 1082 if (hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChild
BlockBackground) { | 1082 if (hitTestAction == HitTestBlockBackground) { |
| 1083 LayoutRect boundsRect(adjustedLocation, size()); | 1083 LayoutRect boundsRect(adjustedLocation, size()); |
| 1084 if (visibleToHitTestRequest(request) && locationInContainer.intersects(b
oundsRect)) { | 1084 if (visibleToHitTestRequest(request) && locationInContainer.intersects(b
oundsRect)) { |
| 1085 updateHitTestResult(result, locationInContainer.point() - localOffse
t); | 1085 updateHitTestResult(result, locationInContainer.point() - localOffse
t); |
| 1086 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn
Container, boundsRect)) | 1086 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn
Container, boundsRect)) |
| 1087 return true; | 1087 return true; |
| 1088 } | 1088 } |
| 1089 } | 1089 } |
| 1090 | 1090 |
| 1091 return false; | 1091 return false; |
| 1092 } | 1092 } |
| 1093 | 1093 |
| 1094 bool RenderBlock::hitTestContents(const HitTestRequest& request, HitTestResult&
result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulat
edOffset, HitTestAction hitTestAction) | 1094 bool RenderBlock::hitTestContents(const HitTestRequest& request, HitTestResult&
result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulat
edOffset, HitTestAction hitTestAction) |
| 1095 { | 1095 { |
| 1096 // Hit test our children. | |
| 1097 HitTestAction childHitTest = hitTestAction; | |
| 1098 if (hitTestAction == HitTestChildBlockBackgrounds) | |
| 1099 childHitTest = HitTestChildBlockBackground; | |
| 1100 for (RenderBox* child = lastChildBox(); child; child = child->previousSiblin
gBox()) { | 1096 for (RenderBox* child = lastChildBox(); child; child = child->previousSiblin
gBox()) { |
| 1101 if (!child->hasSelfPaintingLayer() && child->nodeAtPoint(request, result
, locationInContainer, accumulatedOffset, childHitTest)) | 1097 if (!child->hasSelfPaintingLayer() && child->nodeAtPoint(request, result
, locationInContainer, accumulatedOffset, hitTestAction)) |
| 1102 return true; | 1098 return true; |
| 1103 } | 1099 } |
| 1104 | 1100 |
| 1105 return false; | 1101 return false; |
| 1106 } | 1102 } |
| 1107 | 1103 |
| 1108 Position RenderBlock::positionForBox(InlineBox *box, bool start) const | 1104 Position RenderBlock::positionForBox(InlineBox *box, bool start) const |
| 1109 { | 1105 { |
| 1110 if (!box) | 1106 if (!box) |
| 1111 return Position(); | 1107 return Position(); |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1767 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 1763 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
| 1768 { | 1764 { |
| 1769 showRenderObject(); | 1765 showRenderObject(); |
| 1770 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 1766 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 1771 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 1767 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 1772 } | 1768 } |
| 1773 | 1769 |
| 1774 #endif | 1770 #endif |
| 1775 | 1771 |
| 1776 } // namespace blink | 1772 } // namespace blink |
| OLD | NEW |