OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2008 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 truncatedWidth = blockRightEdge - blockLeftEdge; | 149 truncatedWidth = blockRightEdge - blockLeftEdge; |
150 } | 150 } |
151 return result; | 151 return result; |
152 } | 152 } |
153 | 153 |
154 void RootInlineBox::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOf
fset, LayoutUnit lineTop, LayoutUnit lineBottom) | 154 void RootInlineBox::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOf
fset, LayoutUnit lineTop, LayoutUnit lineBottom) |
155 { | 155 { |
156 RootInlineBoxPainter(*this).paint(paintInfo, paintOffset, lineTop, lineBotto
m); | 156 RootInlineBoxPainter(*this).paint(paintInfo, paintOffset, lineTop, lineBotto
m); |
157 } | 157 } |
158 | 158 |
159 bool RootInlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
sult, const HitTestLocation& locationInContainer, const LayoutPoint& accumulated
Offset, LayoutUnit lineTop, LayoutUnit lineBottom) | 159 bool RootInlineBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& lo
cationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, Lay
outUnit lineBottom) |
160 { | 160 { |
161 if (hasEllipsisBox() && visibleToHitTestRequest(request)) { | 161 if (hasEllipsisBox() && visibleToHitTestRequest(result.hitTestRequest())) { |
162 if (ellipsisBox()->nodeAtPoint(request, result, locationInContainer, acc
umulatedOffset, lineTop, lineBottom)) { | 162 if (ellipsisBox()->nodeAtPoint(result, locationInContainer, accumulatedO
ffset, lineTop, lineBottom)) { |
163 layoutObject().updateHitTestResult(result, locationInContainer.point
() - toLayoutSize(accumulatedOffset)); | 163 layoutObject().updateHitTestResult(result, locationInContainer.point
() - toLayoutSize(accumulatedOffset)); |
164 return true; | 164 return true; |
165 } | 165 } |
166 } | 166 } |
167 return InlineFlowBox::nodeAtPoint(request, result, locationInContainer, accu
mulatedOffset, lineTop, lineBottom); | 167 return InlineFlowBox::nodeAtPoint(result, locationInContainer, accumulatedOf
fset, lineTop, lineBottom); |
168 } | 168 } |
169 | 169 |
170 void RootInlineBox::adjustPosition(FloatWillBeLayoutUnit dx, FloatWillBeLayoutUn
it dy) | 170 void RootInlineBox::adjustPosition(FloatWillBeLayoutUnit dx, FloatWillBeLayoutUn
it dy) |
171 { | 171 { |
172 InlineFlowBox::adjustPosition(dx, dy); | 172 InlineFlowBox::adjustPosition(dx, dy); |
173 LayoutUnit blockDirectionDelta = isHorizontal() ? dy : dx; // The block dire
ction delta is a LayoutUnit. | 173 LayoutUnit blockDirectionDelta = isHorizontal() ? dy : dx; // The block dire
ction delta is a LayoutUnit. |
174 m_lineTop += blockDirectionDelta; | 174 m_lineTop += blockDirectionDelta; |
175 m_lineBottom += blockDirectionDelta; | 175 m_lineBottom += blockDirectionDelta; |
176 m_lineTopWithLeading += blockDirectionDelta; | 176 m_lineTopWithLeading += blockDirectionDelta; |
177 m_lineBottomWithLeading += blockDirectionDelta; | 177 m_lineBottomWithLeading += blockDirectionDelta; |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 endBox = 0; | 848 endBox = 0; |
849 return 0; | 849 return 0; |
850 } | 850 } |
851 | 851 |
852 const char* RootInlineBox::boxName() const | 852 const char* RootInlineBox::boxName() const |
853 { | 853 { |
854 return "RootInlineBox"; | 854 return "RootInlineBox"; |
855 } | 855 } |
856 | 856 |
857 } // namespace blink | 857 } // namespace blink |
OLD | NEW |