summaryrefslogtreecommitdiffstats
path: root/ui/base/text
Commit message (Collapse)AuthorAgeFilesLines
* Bring up of ui/text/elider on iOS.noyau@chromium.org2012-10-181-2/+16
| | | | | | | | | | | | Unfortunately there is an issue with font metrics on the platform that cause some tests to fail. See crbug.com/154019 for details. BUG=None Review URL: https://chromiumcodereview.appspot.com/11038059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162814 0039d316-1c4b-4281-b951-d872f2087c98
* Fix wrong truncation of notification popup messages in ash.kinaba@chromium.org2012-10-171-1/+1
| | | | | | | | | | | | | | views::Label control first calculates the size of the text, and then tries to render the text in the exact size of rectangle. If < is used instead of <= in the patched line, the control flows to the BreakIterator mode, that sometimes computes a larger width value and causes truncation. BUG=155663 Review URL: https://codereview.chromium.org/11150013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162308 0039d316-1c4b-4281-b951-d872f2087c98
* ui: No need to typedef testing::Test in unittests.tfarina@chromium.org2012-07-271-1/+1
| | | | | | | | | | | TEST() macro should be used instead. TEST=ui_unittests R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10808072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148710 0039d316-1c4b-4281-b951-d872f2087c98
* Move files related to registry-controlled domains into a new ↵pam@chromium.org2012-07-201-1/+1
| | | | | | | | | | | | net/base/registry_controlled_domains/ subdirectory. This includes net/base/registry_controlled_domain.* and net/base/effective_tld_names* BUG=138047 TEST=covered by existing tests Review URL: https://chromiumcodereview.appspot.com/10796033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147641 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-113-3/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Modify ui::ElideRectangleText() to honor trailing newlines.asvitkine@chromium.org2012-05-152-20/+34
| | | | | | | | | | | | | | | | Trailing whitespace without a \n character is still trimmed away. Adds additional tests for this. Also, makes the code use ContainsOnlyWhitespace() from base and makes the implementation of ContainsOnlyWhitespace() shorter (based on the code that was in text_elider.cc.) BUG=126297 TEST=New tests in text_elider_unittest.cc Review URL: https://chromiumcodereview.appspot.com/10386016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137061 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply 130248 - Add full support for filesystem URLs. Trying to get the ↵apavlov@chromium.org2012-04-031-2/+2
| | | | | | | | | | build into the right state. TBR=pfeldman Review URL: https://chromiumcodereview.appspot.com/9956101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130363 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 130248 - Add full support for filesystem URLs.sergeyu@chromium.org2012-04-031-2/+2
| | | | | | | | | | | | | | BUG=114484 TEST=existing filesystem tests don't break Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=128753 Review URL: https://chromiumcodereview.appspot.com/7811006 TBR=ericu@google.com Review URL: https://chromiumcodereview.appspot.com/9950079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130293 0039d316-1c4b-4281-b951-d872f2087c98
* Add full support for filesystem URLs.ericu@google.com2012-04-021-2/+2
| | | | | | | | | | | BUG=114484 TEST=existing filesystem tests don't break Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=128753 Review URL: https://chromiumcodereview.appspot.com/7811006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130248 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 128753 - Add full support for filesystem URLs.ericu@google.com2012-03-241-2/+2
| | | | | | | | | | | | BUG=114484 TEST=existing filesystem tests don't break Review URL: https://chromiumcodereview.appspot.com/7811006 TBR=ericu@google.com Review URL: https://chromiumcodereview.appspot.com/9808101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128757 0039d316-1c4b-4281-b951-d872f2087c98
* Add full support for filesystem URLs.ericu@google.com2012-03-241-2/+2
| | | | | | | | | BUG=114484 TEST=existing filesystem tests don't break Review URL: https://chromiumcodereview.appspot.com/7811006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128753 0039d316-1c4b-4281-b951-d872f2087c98
* Elide long emails in the wrench and profile menus.gab@chromium.org2012-03-163-12/+159
| | | | | | | | | | | | | | | NOTE: This CL now only adds eliding functionality, but doesn't use it in the UI just yet. Refer to bug 113133 for details (refer to comment 22 for a screenshot of the result: http://code.google.com/p/chromium/issues/detail?id=113133#c22). BUG=113133 TEST=Make sure ui_unittests (ElideEmail and ElideEmailMoreSpace) pass. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=126445 Review URL: http://codereview.chromium.org/9489011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127175 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 126445 - Elide long emails in the wrench and profile menus.shess@chromium.org2012-03-133-159/+12
| | | | | | | | | | | | | | | | NOTE: This CL now only adds eliding functionality, but doesn't use it in the UI just yet. Refer to bug 113133 for details (refer to comment 22 for a screenshot of the result: http://code.google.com/p/chromium/issues/detail?id=113133#c22). BUG=113133 TEST=Make sure ui_unittests (ElideEmail and ElideEmailMoreSpace) pass. Review URL: http://codereview.chromium.org/9489011 TBR=gab@chromium.org Review URL: https://chromiumcodereview.appspot.com/9693058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126451 0039d316-1c4b-4281-b951-d872f2087c98
* Elide long emails in the wrench and profile menus.gab@chromium.org2012-03-133-12/+159
| | | | | | | | | | | | | NOTE: This CL now only adds eliding functionality, but doesn't use it in the UI just yet. Refer to bug 113133 for details (refer to comment 22 for a screenshot of the result: http://code.google.com/p/chromium/issues/detail?id=113133#c22). BUG=113133 TEST=Make sure ui_unittests (ElideEmail and ElideEmailMoreSpace) pass. Review URL: http://codereview.chromium.org/9489011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126445 0039d316-1c4b-4281-b951-d872f2087c98
* Change kB to KB for consistency.dgozman@chromium.org2012-03-051-5/+5
| | | | | | | | | BUG=chromium-os:22812 TEST=Open task manager or downloads, and observe KB instead of kB. Review URL: http://codereview.chromium.org/9490008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124947 0039d316-1c4b-4281-b951-d872f2087c98
* Support for password entry fields, with all charactersbenrg@chromium.org2012-03-023-0/+137
| | | | | | | | | | | | | | | | | | | | displayed as '*', was implemented in NativeTextfieldViews via TextfieldViewsModel::GetVisibleText() (issue 5857002), but the refactoring into RenderText (issue 7265011) removed all calls of that method. I moved the password handling code into RenderText because I think it's logically a visual style (although RenderText also contains a lot of model-related stuff right now). RenderText now has a password property (in earlier patchsets it was an attribute in StyleRange). BUG=105054 TEST=unit tests and manual testing of the wifi login dialog Review URL: https://chromiumcodereview.appspot.com/8747001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124611 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored RunTest into RunUrlTest in text_elider_unitest.gab@chromium.org2012-02-292-6/+6
| | | | | | | | | | | | | | This function was only used for the Url eliding tests, so it makes it clearer. Also fixed a typo. BUG= TEST=Make sure ui_unittests still pass. Review URL: http://codereview.chromium.org/9455074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124201 0039d316-1c4b-4281-b951-d872f2087c98
* Some style cleanups for text_elider.asvitkine@chromium.org2012-01-173-176/+197
| | | | | | | | | | | These were brought up during my C++ readability review. BUG=none TEST=existing unit tests Review URL: http://codereview.chromium.org/9226009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117912 0039d316-1c4b-4281-b951-d872f2087c98
* Add utility function to wrap a paragraph of text.asvitkine@chromium.org2011-12-153-0/+441
| | | | | | | | | | | | | | | | | | | | | | This is needed for my upcoming change to use this functionality in a new CanvasSkia text drawing implementation. This is exposed as a standalone function in text_elider.h but implemented using an internal helper class in text_elider.cc. This is similar to how the existing |ElideRectangleString()| is implemented. The new function provides four modes of dealing with long words when wrapping text which correspond to the different ways the current implementation of |CanvasSkia::DrawStringInt()| can wrap text, based on the input flags. BUG=105550 TEST=New unit tests added to text_elider_unittest.cc Review URL: http://codereview.chromium.org/8234003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114727 0039d316-1c4b-4281-b951-d872f2087c98
* Fix |ElideText()| to handle UTF16 surrogate pairs correctly.asvitkine@chromium.org2011-12-152-26/+115
| | | | | | | | | BUG=107703 TEST=New unit test in text_elider_unittest.cc. Review URL: http://codereview.chromium.org/8910018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114705 0039d316-1c4b-4281-b951-d872f2087c98
* Change signature of |ui::ElideText()|. Add a truncate mode.asvitkine@chromium.org2011-12-123-28/+66
| | | | | | | | | | | | | | | The new truncate mode is needed by my upcoming changes to rewrite CanvasSkia::DrawText(). Part of the change is changing the binary search code to a more traditional form that also makes the truncate mode work correctly. This is covered by the new unit tests. BUG=105550 TEST=New and existing tests in text_elider_unittest.cc. Review URL: http://codereview.chromium.org/8917011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114063 0039d316-1c4b-4281-b951-d872f2087c98
* Misc ui/base/text_elider cleanup.asvitkine@chromium.org2011-11-282-12/+14
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/8690004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111713 0039d316-1c4b-4281-b951-d872f2087c98
* net: Move UnescapeRule into the net namespace.tfarina@chromium.org2011-11-151-2/+2
| | | | | | | | | | | BUG=64263 TEST=None R=willchan@chromium.org Review URL: http://codereview.chromium.org/8552002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110085 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the remaining 6 exit time destructors and 2 static initializers from ui/thakis@chromium.org2011-11-041-6/+4
| | | | | | | | | | BUG=101600,94925 TEST=none Review URL: http://codereview.chromium.org/8475006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108688 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of unused variable reported by clang.dmaclach@chromium.org2011-11-031-2/+0
| | | | | | | | | | BUG=None TEST=Build Review URL: http://codereview.chromium.org/8372068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108410 0039d316-1c4b-4281-b951-d872f2087c98
* Add a gyp flag to enable dcheck by default in release withoutnsylvain@chromium.org2011-09-201-2/+2
| | | | | | | | | having the pass a flag. This will be used on the try bots. BUG=96753 Review URL: http://codereview.chromium.org/7719007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102017 0039d316-1c4b-4281-b951-d872f2087c98
* Remove base/scoped_ptr.hakalin@chromium.org2011-09-181-1/+1
| | | | | | | | | | | Fix remaining users to use base/memory/scoped_ptr.h. BUG= TEST= Review URL: http://codereview.chromium.org/7930009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101715 0039d316-1c4b-4281-b951-d872f2087c98
* content: Move render_widget_host_view_gtk to content/ try 2.erg@google.com2011-08-233-0/+99
| | | | | | | | | | | | | | | | | | | | This was r97750, which was reverted at r97756. This patch, in addition to all the other things it did, marks OwnedWidgetGtk for export and moves it to the ui:: namespace. Original list of things this patch does: - OwnedWidgetGtk now goes in ui/base/gtk/ - TruncateString moved from l10n_util:: to ui:: - GtkIMContextWrapper has part of its code split into chrome/ (IDC using code goes in RenderViewContextMenu) and the rest go in content/ (gtk using code goes with GtkIMContextWrapper). - gtk_key_bindings_handler[_unittest] now goes in content, as it's a utility class to RenderWidgetHostGtk. BUG=93804 TEST=existing unit tests Original Review URL: http://codereview.chromium.org/7669040 Review URL: http://codereview.chromium.org/7708021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97889 0039d316-1c4b-4281-b951-d872f2087c98
* (shlib failure) Revert 97750 - content: Move render_widget_host_view_gtk to ↵erg@google.com2011-08-223-99/+0
| | | | | | | | | | | | | | | | | | | | content/ This also moves some other files: - OwnedWidgetGtk now goes in ui/base/gtk/ - TruncateString moved from l10n_util:: to ui:: - GtkIMContextWrapper has part of its code split into chrome/ (IDC using code goes in RenderViewContextMenu) and the rest go in content/ (gtk using code goes with GtkIMContextWrapper). - gtk_key_bindings_handler[_unittest] now goes in content, as it's a utility class to RenderWidgetHostGtk. BUG=93804 TEST=existing unit tests Review URL: http://codereview.chromium.org/7669040 TBR=erg@google.com Review URL: http://codereview.chromium.org/7708017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97756 0039d316-1c4b-4281-b951-d872f2087c98
* content: Move render_widget_host_view_gtk to content/erg@google.com2011-08-223-0/+99
| | | | | | | | | | | | | | | This also moves some other files: - OwnedWidgetGtk now goes in ui/base/gtk/ - TruncateString moved from l10n_util:: to ui:: - GtkIMContextWrapper has part of its code split into chrome/ (IDC using code goes in RenderViewContextMenu) and the rest go in content/ (gtk using code goes with GtkIMContextWrapper). - gtk_key_bindings_handler[_unittest] now goes in content, as it's a utility class to RenderWidgetHostGtk. BUG=93804 TEST=existing unit tests Review URL: http://codereview.chromium.org/7669040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97750 0039d316-1c4b-4281-b951-d872f2087c98
* Rename UI_API to UI_EXPORT.darin@chromium.org2011-08-062-25/+25
| | | | | | | R=rvargas@chromium.org Review URL: http://codereview.chromium.org/7569005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95730 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce ui.dll / libui.so for the component build.darin@chromium.org2011-07-172-20/+25
| | | | | | | R=ben@chromium.org Review URL: http://codereview.chromium.org/7328011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92819 0039d316-1c4b-4281-b951-d872f2087c98
* Rename app_strings to ui_strings.tfarina@chromium.org2011-07-071-1/+1
| | | | | | | | | | | BUG=72317 TEST=None R=rsesek@chromium.org, tony@chromium.org Review URL: http://codereview.chromium.org/7210060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91704 0039d316-1c4b-4281-b951-d872f2087c98
* Download shelf text fails to truncate if file has very long extensionkeishi@google.com2011-07-072-1/+13
| | | | | | | | | | | | | Moved patch to new issue from my google account BUG=79968 TEST= Review URL: http://codereview.chromium.org/7253034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91646 0039d316-1c4b-4281-b951-d872f2087c98
* Localize strings, speeds.avi@chromium.org2011-06-223-0/+244
| | | | | | | | | BUG=86527 TEST=run in non-English. For European languages, during a download the decimal separators should be commas (e.g. "0,0 MB"). (The speeds are in strings files and might take a little time to run through the translation machinery.) Review URL: http://codereview.chromium.org/7189076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90092 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize member variables.jhawkins@chromium.org2011-06-221-1/+1
| | | | | | | | | | | | CID=9269,13399,14520 BUG=none TEST=none R=vandebo@chromium.org Review URL: http://codereview.chromium.org/7216031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89966 0039d316-1c4b-4281-b951-d872f2087c98
* ElideUrl now passes tests on all platforms. ElideUrl has been cleaned up and ↵groby@chromium.org2011-05-262-72/+90
| | | | | | | | | | | | uses width of total string instead of sum of widths of substring, addressing subtle kerning/ligature issues. BUG=8061 TEST=none Review URL: http://codereview.chromium.org/7064036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86912 0039d316-1c4b-4281-b951-d872f2087c98
* base/i18n: Pass |str| as const reference in BreakIterator::Init().tfarina@chromium.org2011-05-251-2/+2
| | | | | | | | | | | BUG=None TEST=out/Debug/base_unittests --gtest_filter=BreakIteratorTest.* R=tsepez@chromium.org,evan@chromium.org Review URL: http://codereview.chromium.org/7008005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86689 0039d316-1c4b-4281-b951-d872f2087c98
* base/i18n: Put break_iterator* into namespace i18n.tfarina@chromium.org2011-05-161-2/+4
| | | | | | | | | | | BUG=None TEST=None R=brettw@chromium.org Review URL: http://codereview.chromium.org/7034012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85525 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate wstring from base/utf_offset_string_conversions.h, ↵pkasting@chromium.org2011-05-031-4/+2
| | | | | | | | | | net/base/escape.h, and net/base/net_util.h, and reduce the API surfaces in various places slightly where possible. BUG=23581 TEST=none Review URL: http://codereview.chromium.org/6898026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83948 0039d316-1c4b-4281-b951-d872f2087c98
* Update bug reference.avi@chromium.org2011-03-301-1/+1
| | | | | | | | | BUG=77883 TEST=no code change Review URL: http://codereview.chromium.org/6756022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79815 0039d316-1c4b-4281-b951-d872f2087c98
* Lengthy alerts have line breaks in them on all platforms. Only do thistsepez@chromium.org2011-03-293-23/+115
| | | | | | | | | | | where we can't trust the window system to behave properly. Even so, only break long words, assuming that spaces are properly triggering breaks. BUG=77231 TEST=Goto URL javascript:alert(""It looks like you're in the middle of composing another message. Are you sure you want to continue? This may affect any unsaved drafts."); and ensure no break between "unsaved" and "drafts". Review URL: http://codereview.chromium.org/6696074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79692 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Elides the beginning of tab titles that have common prefixes. mad@chromium.org2011-03-113-5/+5
| | | | | | | | | BUG=69304 TEST=Make sure the tab titles are displayed as spec'd, and that there isn't any performance issues. Review URL: http://codereview.chromium.org/6579050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77860 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstrings from ui/base/text_elider.h functions.tony@chromium.org2011-03-083-13/+12
| | | | | | | | | | | The last param is for languages, which is already a std::string in most places. BUG=23581 Review URL: http://codereview.chromium.org/6627061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77219 0039d316-1c4b-4281-b951-d872f2087c98
* Convert ElideString to use string16 instead of wstring.tony@chromium.org2011-02-223-157/+158
| | | | | | | | BUG=23581 Review URL: http://codereview.chromium.org/6526027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75641 0039d316-1c4b-4281-b951-d872f2087c98
* Change includes of gfx/* to ui/gfx/*sail@chromium.org2011-02-053-3/+3
| | | | | | | | | BUG=71063 TEST=compiled Review URL: http://codereview.chromium.org/6312156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73890 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of random other files to src/ui/baseben@chromium.org2011-01-203-0/+1226
BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6257006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71970 0039d316-1c4b-4281-b951-d872f2087c98