| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 LayoutUnit blockRightEdge, | 113 LayoutUnit blockRightEdge, |
| 114 LayoutUnit ellipsisWidth) { | 114 LayoutUnit ellipsisWidth) { |
| 115 // Create an ellipsis box. | 115 // Create an ellipsis box. |
| 116 EllipsisBox* ellipsisBox = | 116 EllipsisBox* ellipsisBox = |
| 117 new EllipsisBox(getLineLayoutItem(), ellipsisStr, this, ellipsisWidth, | 117 new EllipsisBox(getLineLayoutItem(), ellipsisStr, this, ellipsisWidth, |
| 118 logicalHeight().toFloat(), x().toInt(), y().toInt(), | 118 logicalHeight().toFloat(), x().toInt(), y().toInt(), |
| 119 !prevRootBox(), isHorizontal()); | 119 !prevRootBox(), isHorizontal()); |
| 120 | 120 |
| 121 if (!gEllipsisBoxMap) | 121 if (!gEllipsisBoxMap) |
| 122 gEllipsisBoxMap = new EllipsisBoxMap(); | 122 gEllipsisBoxMap = new EllipsisBoxMap(); |
| 123 gEllipsisBoxMap->add(this, ellipsisBox); | 123 gEllipsisBoxMap->insert(this, ellipsisBox); |
| 124 setHasEllipsisBox(true); | 124 setHasEllipsisBox(true); |
| 125 | 125 |
| 126 // FIXME: Do we need an RTL version of this? | 126 // FIXME: Do we need an RTL version of this? |
| 127 if (ltr && | 127 if (ltr && |
| 128 (logicalLeft() + logicalWidth() + ellipsisWidth) <= blockRightEdge) { | 128 (logicalLeft() + logicalWidth() + ellipsisWidth) <= blockRightEdge) { |
| 129 ellipsisBox->setLogicalLeft(logicalLeft() + logicalWidth()); | 129 ellipsisBox->setLogicalLeft(logicalLeft() + logicalWidth()); |
| 130 return logicalWidth() + ellipsisWidth; | 130 return logicalWidth() + ellipsisWidth; |
| 131 } | 131 } |
| 132 | 132 |
| 133 // Now attempt to find the nearest glyph horizontally and place just to the | 133 // Now attempt to find the nearest glyph horizontally and place just to the |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 } | 776 } |
| 777 endBox = nullptr; | 777 endBox = nullptr; |
| 778 return nullptr; | 778 return nullptr; |
| 779 } | 779 } |
| 780 | 780 |
| 781 const char* RootInlineBox::boxName() const { | 781 const char* RootInlineBox::boxName() const { |
| 782 return "RootInlineBox"; | 782 return "RootInlineBox"; |
| 783 } | 783 } |
| 784 | 784 |
| 785 } // namespace blink | 785 } // namespace blink |
| OLD | NEW |