Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/WebKit/Source/core/layout/line/InlineTextBox.h

Issue 2699393002: Place ellipsis correctly inside inline-blocks (Closed)
Patch Set: bug 133700 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 Apple Inc. 4 * Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 Apple Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 private: 178 private:
179 void setTruncation(unsigned); 179 void setTruncation(unsigned);
180 180
181 void clearTruncation() final; 181 void clearTruncation() final;
182 LayoutUnit placeEllipsisBox(bool flowIsLTR, 182 LayoutUnit placeEllipsisBox(bool flowIsLTR,
183 LayoutUnit visibleLeftEdge, 183 LayoutUnit visibleLeftEdge,
184 LayoutUnit visibleRightEdge, 184 LayoutUnit visibleRightEdge,
185 LayoutUnit ellipsisWidth, 185 LayoutUnit ellipsisWidth,
186 LayoutUnit& truncatedWidth, 186 LayoutUnit& truncatedWidth,
187 bool& foundBox) final; 187 bool& foundBox,
188 LayoutUnit logicalLeftOffset) final;
188 189
189 public: 190 public:
190 bool isLineBreak() const final; 191 bool isLineBreak() const final;
191 192
192 void setExpansion(int newExpansion) { 193 void setExpansion(int newExpansion) {
193 m_logicalWidth -= expansion(); 194 m_logicalWidth -= expansion();
194 InlineBox::setExpansion(newExpansion); 195 InlineBox::setExpansion(newExpansion);
195 m_logicalWidth += newExpansion; 196 m_logicalWidth += newExpansion;
196 } 197 }
197 198
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 (expansion() && nextLeafChild() ? TextRun::AllowTrailingExpansion 238 (expansion() && nextLeafChild() ? TextRun::AllowTrailingExpansion
238 : TextRun::ForbidTrailingExpansion); 239 : TextRun::ForbidTrailingExpansion);
239 } 240 }
240 }; 241 };
241 242
242 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); 243 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox);
243 244
244 } // namespace blink 245 } // namespace blink
245 246
246 #endif // InlineTextBox_h 247 #endif // InlineTextBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698