| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 return false; | 109 return false; |
| 110 | 110 |
| 111 // Next iterate over all the line boxes on the line. If we find a replaced
element that intersects | 111 // Next iterate over all the line boxes on the line. If we find a replaced
element that intersects |
| 112 // then we refuse to accommodate the ellipsis. Otherwise we're ok. | 112 // then we refuse to accommodate the ellipsis. Otherwise we're ok. |
| 113 return InlineFlowBox::canAccommodateEllipsis(ltr, blockEdge, ellipsisWidth); | 113 return InlineFlowBox::canAccommodateEllipsis(ltr, blockEdge, ellipsisWidth); |
| 114 } | 114 } |
| 115 | 115 |
| 116 LayoutUnit RootInlineBox::placeEllipsis(const AtomicString& ellipsisStr, bool l
tr, LayoutUnit blockLeftEdge, LayoutUnit blockRightEdge, LayoutUnit ellipsisWidt
h) | 116 LayoutUnit RootInlineBox::placeEllipsis(const AtomicString& ellipsisStr, bool l
tr, LayoutUnit blockLeftEdge, LayoutUnit blockRightEdge, LayoutUnit ellipsisWidt
h) |
| 117 { | 117 { |
| 118 // Create an ellipsis box. | 118 // Create an ellipsis box. |
| 119 EllipsisBox* ellipsisBox = new EllipsisBox(layoutObject(), ellipsisStr, this
, | 119 EllipsisBox* ellipsisBox = new EllipsisBox(this, ellipsisStr, this, |
| 120 ellipsisWidth, logicalHeight().toFloat(), x(), y(), !prevRootBox(), isHo
rizontal()); | 120 ellipsisWidth, logicalHeight().toFloat(), x(), y(), !prevRootBox(), isHo
rizontal()); |
| 121 | 121 |
| 122 if (!gEllipsisBoxMap) | 122 if (!gEllipsisBoxMap) |
| 123 gEllipsisBoxMap = new EllipsisBoxMap(); | 123 gEllipsisBoxMap = new EllipsisBoxMap(); |
| 124 gEllipsisBoxMap->add(this, ellipsisBox); | 124 gEllipsisBoxMap->add(this, ellipsisBox); |
| 125 setHasEllipsisBox(true); | 125 setHasEllipsisBox(true); |
| 126 | 126 |
| 127 // FIXME: Do we need an RTL version of this? | 127 // FIXME: Do we need an RTL version of this? |
| 128 if (ltr && (logicalLeft() + logicalWidth() + ellipsisWidth) <= blockRightEdg
e) { | 128 if (ltr && (logicalLeft() + logicalWidth() + ellipsisWidth) <= blockRightEdg
e) { |
| 129 ellipsisBox->setLogicalLeft(logicalLeft() + logicalWidth()); | 129 ellipsisBox->setLogicalLeft(logicalLeft() + logicalWidth()); |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 endBox = nullptr; | 753 endBox = nullptr; |
| 754 return nullptr; | 754 return nullptr; |
| 755 } | 755 } |
| 756 | 756 |
| 757 const char* RootInlineBox::boxName() const | 757 const char* RootInlineBox::boxName() const |
| 758 { | 758 { |
| 759 return "RootInlineBox"; | 759 return "RootInlineBox"; |
| 760 } | 760 } |
| 761 | 761 |
| 762 } // namespace blink | 762 } // namespace blink |
| OLD | NEW |