| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. | 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. |
| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 RenderStyle* style = m_renderer->style(isFirstLineStyle()); | 139 RenderStyle* style = m_renderer->style(isFirstLineStyle()); |
| 140 LayoutUnit mtx = adjustedLocation.x() + m_logicalWidth - markupBox->x(); | 140 LayoutUnit mtx = adjustedLocation.x() + m_logicalWidth - markupBox->x(); |
| 141 LayoutUnit mty = adjustedLocation.y() + style->fontMetrics().ascent() -
(markupBox->y() + markupBox->renderer()->style(isFirstLineStyle())->fontMetrics(
).ascent()); | 141 LayoutUnit mty = adjustedLocation.y() + style->fontMetrics().ascent() -
(markupBox->y() + markupBox->renderer()->style(isFirstLineStyle())->fontMetrics(
).ascent()); |
| 142 if (markupBox->nodeAtPoint(request, result, locationInContainer, LayoutP
oint(mtx, mty), lineTop, lineBottom)) { | 142 if (markupBox->nodeAtPoint(request, result, locationInContainer, LayoutP
oint(mtx, mty), lineTop, lineBottom)) { |
| 143 renderer()->updateHitTestResult(result, locationInContainer.point()
- LayoutSize(mtx, mty)); | 143 renderer()->updateHitTestResult(result, locationInContainer.point()
- LayoutSize(mtx, mty)); |
| 144 return true; | 144 return true; |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 | 147 |
| 148 LayoutRect boundsRect(adjustedLocation, LayoutSize(m_logicalWidth, m_height)
); | 148 LayoutRect boundsRect(adjustedLocation, LayoutSize(m_logicalWidth, m_height)
); |
| 149 if (visibleToHitTesting() && boundsRect.intersects(HitTestLocation::rectForP
oint(locationInContainer.point(), 0, 0, 0, 0))) { | 149 if (visibleToHitTestRequest(request) && boundsRect.intersects(HitTestLocatio
n::rectForPoint(locationInContainer.point(), 0, 0, 0, 0))) { |
| 150 renderer()->updateHitTestResult(result, locationInContainer.point() - to
LayoutSize(adjustedLocation)); | 150 renderer()->updateHitTestResult(result, locationInContainer.point() - to
LayoutSize(adjustedLocation)); |
| 151 if (!result.addNodeToRectBasedTestResult(renderer()->node(), request, lo
cationInContainer, boundsRect)) | 151 if (!result.addNodeToRectBasedTestResult(renderer()->node(), request, lo
cationInContainer, boundsRect)) |
| 152 return true; | 152 return true; |
| 153 } | 153 } |
| 154 | 154 |
| 155 return false; | 155 return false; |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace WebCore | 158 } // namespace WebCore |
| OLD | NEW |