Chromium Code Reviews| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 142 float RootInlineBox::placeEllipsisBox(bool ltr, float blockLeftEdge, float block RightEdge, float ellipsisWidth, float &truncatedWidth, bool& foundBox) | 142 float RootInlineBox::placeEllipsisBox(bool ltr, float blockLeftEdge, float block RightEdge, float ellipsisWidth, float &truncatedWidth, bool& foundBox) |
| 143 { | 143 { |
| 144 float result = InlineFlowBox::placeEllipsisBox(ltr, blockLeftEdge, blockRigh tEdge, ellipsisWidth, truncatedWidth, foundBox); | 144 float result = InlineFlowBox::placeEllipsisBox(ltr, blockLeftEdge, blockRigh tEdge, ellipsisWidth, truncatedWidth, foundBox); |
| 145 if (result == -1) { | 145 if (result == -1) { |
| 146 result = ltr ? blockRightEdge - ellipsisWidth : blockLeftEdge; | 146 result = ltr ? blockRightEdge - ellipsisWidth : blockLeftEdge; |
| 147 truncatedWidth = blockRightEdge - blockLeftEdge; | 147 truncatedWidth = blockRightEdge - blockLeftEdge; |
| 148 } | 148 } |
| 149 return result; | 149 return result; |
| 150 } | 150 } |
| 151 | 151 |
| 152 void RootInlineBox::paintEllipsisBox(PaintInfo& paintInfo, const LayoutPoint& pa intOffset, LayoutUnit lineTop, LayoutUnit lineBottom) const | 152 void RootInlineBox::paintEllipsisBox(PaintInfo& paintInfo, const LayoutPoint& pa intOffset, LayoutUnit lineTop, LayoutUnit lineBottom, Vector<RenderBox*> layers) const |
|
esprehn
2015/02/05 23:47:00
reference.
| |
| 153 { | 153 { |
| 154 if (hasEllipsisBox()) | 154 if (hasEllipsisBox()) |
| 155 ellipsisBox()->paint(paintInfo, paintOffset, lineTop, lineBottom); | 155 ellipsisBox()->paint(paintInfo, paintOffset, lineTop, lineBottom, layers ); |
| 156 } | 156 } |
| 157 | 157 |
| 158 void RootInlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom) | 158 void RootInlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, Vector<RenderBox*> layers) |
| 159 { | 159 { |
| 160 InlineFlowBox::paint(paintInfo, paintOffset, lineTop, lineBottom); | 160 InlineFlowBox::paint(paintInfo, paintOffset, lineTop, lineBottom, layers); |
| 161 paintEllipsisBox(paintInfo, paintOffset, lineTop, lineBottom); | 161 paintEllipsisBox(paintInfo, paintOffset, lineTop, lineBottom, layers); |
| 162 } | 162 } |
| 163 | 163 |
| 164 bool RootInlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re sult, const HitTestLocation& locationInContainer, const LayoutPoint& accumulated Offset, LayoutUnit lineTop, LayoutUnit lineBottom) | 164 bool RootInlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re sult, const HitTestLocation& locationInContainer, const LayoutPoint& accumulated Offset, LayoutUnit lineTop, LayoutUnit lineBottom) |
| 165 { | 165 { |
| 166 if (hasEllipsisBox() && visibleToHitTestRequest(request)) { | 166 if (hasEllipsisBox() && visibleToHitTestRequest(request)) { |
| 167 if (ellipsisBox()->nodeAtPoint(request, result, locationInContainer, acc umulatedOffset, lineTop, lineBottom)) { | 167 if (ellipsisBox()->nodeAtPoint(request, result, locationInContainer, acc umulatedOffset, lineTop, lineBottom)) { |
| 168 renderer().updateHitTestResult(result, locationInContainer.point() - toLayoutSize(accumulatedOffset)); | 168 renderer().updateHitTestResult(result, locationInContainer.point() - toLayoutSize(accumulatedOffset)); |
| 169 return true; | 169 return true; |
| 170 } | 170 } |
| 171 } | 171 } |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 803 } | 803 } |
| 804 | 804 |
| 805 #ifndef NDEBUG | 805 #ifndef NDEBUG |
| 806 const char* RootInlineBox::boxName() const | 806 const char* RootInlineBox::boxName() const |
| 807 { | 807 { |
| 808 return "RootInlineBox"; | 808 return "RootInlineBox"; |
| 809 } | 809 } |
| 810 #endif | 810 #endif |
| 811 | 811 |
| 812 } // namespace blink | 812 } // namespace blink |
| OLD | NEW |