| Index: ui/base/text/text_elider.cc
|
| diff --git a/ui/base/text/text_elider.cc b/ui/base/text/text_elider.cc
|
| index 76dbb719946a0e4dec9cf6736fdc78a03cd284ce..ed7b4d30cf7b0bf9452e8089e28d89e3d24e84c8 100644
|
| --- a/ui/base/text/text_elider.cc
|
| +++ b/ui/base/text/text_elider.cc
|
| @@ -7,7 +7,7 @@
|
| // Note that several of the functions declared in text_elider.h are implemented
|
| // in this file using helper classes in an unnamed namespace.
|
|
|
| -#include "ui/base/text/text_elider.h"
|
| +#include "ui/gfx/text_elider.h"
|
|
|
| #include <string>
|
| #include <vector>
|
| @@ -814,7 +814,7 @@ class RectangleText {
|
| RectangleText(const gfx::FontList& font_list,
|
| int available_pixel_width,
|
| int available_pixel_height,
|
| - ui::WordWrapBehavior wrap_behavior,
|
| + gfx::WordWrapBehavior wrap_behavior,
|
| std::vector<string16>* lines)
|
| : font_list_(font_list),
|
| line_height_(font_list.GetHeight()),
|
| @@ -882,7 +882,7 @@ class RectangleText {
|
| const int available_pixel_height_;
|
|
|
| // The wrap behavior for words that are too long to fit on a single line.
|
| - const ui::WordWrapBehavior wrap_behavior_;
|
| + const gfx::WordWrapBehavior wrap_behavior_;
|
|
|
| // The current running width.
|
| int current_width_;
|
| @@ -938,8 +938,8 @@ int RectangleText::Finalize() {
|
| }
|
| if (last_line_ended_in_lf_)
|
| lines_->push_back(string16());
|
| - return (insufficient_width_ ? ui::INSUFFICIENT_SPACE_HORIZONTAL : 0) |
|
| - (insufficient_height_ ? ui::INSUFFICIENT_SPACE_VERTICAL : 0);
|
| + return (insufficient_width_ ? gfx::INSUFFICIENT_SPACE_HORIZONTAL : 0) |
|
| + (insufficient_height_ ? gfx::INSUFFICIENT_SPACE_VERTICAL : 0);
|
| }
|
|
|
| void RectangleText::AddLine(const string16& line) {
|
| @@ -984,8 +984,8 @@ int RectangleText::WrapWord(const string16& word) {
|
| bool first_fragment = true;
|
| while (!insufficient_height_ && !text.empty()) {
|
| string16 fragment =
|
| - ui::ElideText(text, font_list_, available_pixel_width_,
|
| - ui::TRUNCATE_AT_END);
|
| + gfx::ElideText(text, font_list_, available_pixel_width_,
|
| + gfx::TRUNCATE_AT_END);
|
| // At least one character has to be added at every line, even if the
|
| // available space is too small.
|
| if(fragment.empty())
|
| @@ -1009,17 +1009,17 @@ int RectangleText::AddWordOverflow(const string16& word) {
|
| lines_added++;
|
| }
|
|
|
| - if (wrap_behavior_ == ui::IGNORE_LONG_WORDS) {
|
| + if (wrap_behavior_ == gfx::IGNORE_LONG_WORDS) {
|
| current_line_ = word;
|
| current_width_ = available_pixel_width_;
|
| - } else if (wrap_behavior_ == ui::WRAP_LONG_WORDS) {
|
| + } else if (wrap_behavior_ == gfx::WRAP_LONG_WORDS) {
|
| lines_added += WrapWord(word);
|
| } else {
|
| - const ui::ElideBehavior elide_behavior =
|
| - (wrap_behavior_ == ui::ELIDE_LONG_WORDS ? ui::ELIDE_AT_END :
|
| - ui::TRUNCATE_AT_END);
|
| + const gfx::ElideBehavior elide_behavior =
|
| + (wrap_behavior_ == gfx::ELIDE_LONG_WORDS ? gfx::ELIDE_AT_END :
|
| + gfx::TRUNCATE_AT_END);
|
| const string16 elided_word =
|
| - ui::ElideText(word, font_list_, available_pixel_width_, elide_behavior);
|
| + gfx::ElideText(word, font_list_, available_pixel_width_, elide_behavior);
|
| AddToCurrentLine(elided_word);
|
| insufficient_width_ = true;
|
| }
|
| @@ -1039,7 +1039,7 @@ int RectangleText::AddWord(const string16& word) {
|
| // Append the non-trimmed word, in case more words are added after.
|
| AddToCurrentLine(word);
|
| } else {
|
| - lines_added = AddWordOverflow(wrap_behavior_ == ui::IGNORE_LONG_WORDS ?
|
| + lines_added = AddWordOverflow(wrap_behavior_ == gfx::IGNORE_LONG_WORDS ?
|
| trimmed : word);
|
| }
|
| return lines_added;
|
|
|