OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 } | 1005 } |
1006 } | 1006 } |
1007 } | 1007 } |
1008 // Check any culled ancestor of the final children tested. | 1008 // Check any culled ancestor of the final children tested. |
1009 while (culledParent && culledParent != layoutObject()) { | 1009 while (culledParent && culledParent != layoutObject()) { |
1010 if (culledParent->isLayoutInline() && toLayoutInline(culledParent)->hitT
estCulledInline(request, result, locationInContainer, accumulatedOffset)) | 1010 if (culledParent->isLayoutInline() && toLayoutInline(culledParent)->hitT
estCulledInline(request, result, locationInContainer, accumulatedOffset)) |
1011 return true; | 1011 return true; |
1012 culledParent = culledParent->parent(); | 1012 culledParent = culledParent->parent(); |
1013 } | 1013 } |
1014 | 1014 |
| 1015 if (layoutObject().style()->hasBorderRadius()) { |
| 1016 LayoutRect borderRect = logicalFrameRect(); |
| 1017 borderRect.moveBy(accumulatedOffset); |
| 1018 FloatRoundedRect border = layoutObject().style()->getRoundedBorderFor(bo
rderRect, includeLogicalLeftEdge(), includeLogicalRightEdge()); |
| 1019 if (!locationInContainer.intersects(border)) |
| 1020 return false; |
| 1021 } |
| 1022 |
1015 // Now check ourselves. Pixel snap hit testing. | 1023 // Now check ourselves. Pixel snap hit testing. |
1016 LayoutRect frameRect(roundedFrameRect()); | 1024 LayoutRect frameRect(roundedFrameRect()); |
1017 LayoutUnit minX = frameRect.x(); | 1025 LayoutUnit minX = frameRect.x(); |
1018 LayoutUnit minY = frameRect.y(); | 1026 LayoutUnit minY = frameRect.y(); |
1019 LayoutUnit width = frameRect.width(); | 1027 LayoutUnit width = frameRect.width(); |
1020 LayoutUnit height = frameRect.height(); | 1028 LayoutUnit height = frameRect.height(); |
1021 | 1029 |
1022 // Constrain our hit testing to the line top and bottom if necessary. | 1030 // Constrain our hit testing to the line top and bottom if necessary. |
1023 bool noQuirksMode = layoutObject().document().inNoQuirksMode(); | 1031 bool noQuirksMode = layoutObject().document().inNoQuirksMode(); |
1024 if (!noQuirksMode && !hasTextChildren() && !(descendantsHaveSameLineHeightAn
dBaseline() && hasTextDescendants())) { | 1032 if (!noQuirksMode && !hasTextChildren() && !(descendantsHaveSameLineHeightAn
dBaseline() && hasTextDescendants())) { |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 ASSERT(child->prevOnLine() == prev); | 1307 ASSERT(child->prevOnLine() == prev); |
1300 prev = child; | 1308 prev = child; |
1301 } | 1309 } |
1302 ASSERT(prev == m_lastChild); | 1310 ASSERT(prev == m_lastChild); |
1303 #endif | 1311 #endif |
1304 } | 1312 } |
1305 | 1313 |
1306 #endif | 1314 #endif |
1307 | 1315 |
1308 } // namespace blink | 1316 } // namespace blink |
OLD | NEW |