Граф коммитов

5 Коммитов

Автор SHA1 Сообщение Дата
Tom Tromey f993bb28d0 Bug 1401821 - nsTextFormatter "*" width argument comes before the actual argument; r=froydnj
Bug 1388789 introduced a bug breaking formats like "%*.f".  The problem
was that the next "natural" argument was taken before the "*" width
argument.

MozReview-Commit-ID: BZack9faY7a

--HG--
extra : rebase_source : a14485914ef9e29e38f29be6c1df1372ce5e722f
2017-09-21 09:43:28 -06:00
Tom Tromey 971dbd3853 Bug 1388789 - clean up \0 emission in nsTextFormatter; r=froydnj
nsTextFormatter unconditionally emitted a trailing \0, leading some code
elsewhere to have to work around this.  This changes the code to only
emit it in snprintf.

MozReview-Commit-ID: G3CBpAPp9Tn

--HG--
extra : rebase_source : 36666476a4f796e2553c9fa31daa54d245ae3b5f
2017-09-06 09:38:58 -06:00
Tom Tromey f2a652249e Bug 1388789 - make nsTextFormatter runtime type-safe; r=froydnj
Change nsTextFormatter functions to template functions, box their
arguments, and then make the formatter mostly impervious to type
mismatches.  Most formatting is done according to the type of the actual
argument.

MozReview-Commit-ID: H8WmyxFCb7s

--HG--
extra : rebase_source : ad98ad6243825f1a892fc6a641d155e239b12a6b
2017-09-01 14:03:56 -06:00
Tom Tromey 586209d1a8 Bug 1388789 - handle unrecognized escapes in nsTextFormatter; r=froydnj
nsTextFormatter tried to pass unrecognized escapes in the format string
through to the output.  However, if the format held a width or
precision, that text was not output.  It seems better to me to try to
preserve the format text as-is.

MozReview-Commit-ID: HoBykpfzK7C

--HG--
extra : rebase_source : 9b071db3800e3e75cabb4995a920818dfb35b03d
2017-09-01 08:31:49 -06:00
Eric Rahm f858baa31d Bug 1313482 - Convert XPCOM test TestTextFormatter to a gtest. r=froydnj
MozReview-Commit-ID: FQ5K3jvqb7c

--HG--
rename : xpcom/tests/TestTextFormatter.cpp => xpcom/tests/gtest/TestTextFormatter.cpp
2016-11-04 16:24:42 -07:00