summaryrefslogtreecommitdiff
path: root/src/com/android/mail/utils/HtmlUtils.java
Commit message (Collapse)AuthorAgeFilesLines
* Change logging level of htmlToSpan so we can see it in bugreportsJin Cao2014-08-261-1/+1
| | | | Change-Id: I74cd6e48c74d8775f0e588ee6c941cf3602649c5
* Add logging for htmlToSpanJin Cao2014-07-221-0/+4
| | | | | | | | | Add logging for htmlToSpan to check the length of input/output. b/16489004 Change-Id: I40e0ea1f1b4799a2d021f42dc98bcef54f6e3aff
* Refactor SpannedConverter to use PlainTextConverterJin Cao2014-07-031-75/+17
| | | | | | | | | | Change SpannedConverter so it only handles the spans and use the DefaultPlainTextConverter to handle all of the underlying text string. b/15838526 Change-Id: I94c986a2efc4e67985415d4539e4601b0ebe7e63
* Use AbsoluteSizeSpan instead of RelativeSizeSpanJin Cao2014-06-261-4/+7
| | | | | | | | | Since Html.toHtml only checks for AbsoluteSizeSpan, we'll use that instead of RelativeSizeSpan. b/15909781 Change-Id: Ifd68ca2b3d9f93af0e49c35f88e2efb4bd35ca76
* HtmlUtils cleanup to use HTML4 constantsJin Cao2014-06-241-50/+33
| | | | | | | Instead of hardcoding strings, we use HTML4 constants for all comparisons. Change-Id: I818ba731b71996b60ec886e90855d32cac93bfd9
* improve whitespace handling on resumed HTML draftsAndy Huang2014-06-231-5/+28
| | | | | | | | | | HTML whitespace needs to be trimmed and collapsed. (except in <pre> cases, support for which is filed as b/15838526). Quick/dirty code copy from HtmlTree.PlainTextConverter. (Full implementation to come in b/15838526.) Bug: 15830162 Change-Id: I0b8f9d7457d6d2d262eee90951467f7da9b83e6f
* support for subclass-custom span convert behaviorAndy Huang2014-06-181-12/+7
| | | | | | | support pluggable HtmlTree.Converter behavior. Bug: 15429227 Change-Id: I6e7f8a65f9dfe3085399300b99a6fea0f2525cfb
* Minimum html support using Html class (no ol/ul)Jin Cao2014-06-171-0/+275
Support basic html in ComposeActivity using Html and HtmlTree class. - Extended HtmlTree to take in any arbitrary html -> object converter so we can use it to convert html to spanned as well as plaintext. - Added custom SpannedConverter to feed into HtmlTree. - Added async task to load Utils.htmlToSpan in the background. - Moved ComposeActivity#sendOrSaveInternal to a handler thread in case Utils.spanToHtml takes a long time. Note that we only support a subset of the html tags. To see the full list of tags we currently support, refer to HtmlUtils#SpannedConverter. Performance: About 3x faster than using Html.fromHtml (yay!). Performance should not be an issue for >99% of the users. b/7406122 Change-Id: I484d7fc7d2f36c4724d9e4cb90fa1d65eadcb903