summaryrefslogtreecommitdiffstats
path: root/assets
Commit message (Collapse)AuthorAgeFilesLines
* IMAP/POP accounts now draw borders around unloaded inline imagesJames Lemieux2014-10-021-1/+1
| | | | | | | | | | | | | | | b/17663015 Gmail accomplishes this with javascript. The src of each img tag is replaced with an empty "data:" URL until the user acknowledges they are willing to load images. While the src is hidden, a CSS style is applied that draws a gray line border around the image perimeter. It was trivial to expand that script code to also mutate the src of img tags backed by "cid:" URLs so that IMAP/POP accounts gain the same behavior. Change-Id: I70122864c038583567f6f33634bb6d336e9a8629
* Add null check in JS before replacing message bodyAndrew Sapperstein2014-09-301-2/+8
| | | | | | Fixes b/13060462. Change-Id: I6c33e56cd3e99c2021d41accca2bd129429dbeee
* Disable checkbox/radio boxes in forms.Ray Chen2014-09-221-1/+3
| | | | | | | | | | | | We set all forms elements to readOnly but some input types only change states instead of editing values. This CL disabled all elements except submit button to explain to user that forms are disabled. b/17603340 Change-Id: I81954dc593428f373aa2feb269e15d5d2314076b
* Fix a typo in javascript.Ray Chen2014-09-161-1/+1
| | | | | | b/17183273 Change-Id: I735fd0b3088d176f3f61f72b4da11d858a4ed55b
* Disable POST forms in mail content.Ray Chen2014-09-151-1/+23
| | | | | | b/17183273 Change-Id: Ieb9113fd37d5c75bc0829f79b286a36c53c66b81
* Fix inline images in EmailJames Lemieux2014-08-211-0/+5
| | | | | | b/17070887 Change-Id: Ic92bb04c7ec146e96d61a1a60454af80490afa34
* Remove above attachment promo. b/16138036.Andrew Sapperstein2014-08-071-5/+0
| | | | Change-Id: I611f0f7e6eeea0247956e0f1a9f2ec3ec51c9eef
* Quantum CV - drafts. b/16138121Andrew Sapperstein2014-07-141-0/+10
| | | | | | | | | New assets, new red color for drafts. Super-collapsed becomes red when there's a draft. Conversation footer is hidden when last message is a draft. Change-Id: I89a58971a19475be79f56cae53934f3c7b2ab894 Missing: properly re-sizing the footer.
* conversation footer b/15595931Andrew Sapperstein2014-07-031-3/+1
| | | | Change-Id: I9eda1060f4e49a0448a321f603aec0a254daf86a
* Remove borders/cards from conversation view.Andrew Sapperstein2014-06-191-22/+1
| | | | | | b/15595931 Change-Id: I51b5ce1d9387d6354d421b0e399a2003c6e84c54
* Don't convert to strings only to convert to int.Andrew Sapperstein2014-05-131-4/+4
| | | | | | | | Fixes b/14812974. Instead of converting (now) floats to strings for passing via javascript, just pass them directly as ints. Then we don't have to do any parsing. Change-Id: Iaab27e46b3c6875fee203de389119b835fd27261
* Save to drive promo. b/7659807.Andrew Sapperstein2014-04-221-0/+9
| | | | | | | | | Provides a space above the attachment bars to show some additional content. Default behavior does nothing. Hooks have been added to allow resizing of the message footer. Change-Id: Ib950091d176311bdb06c7c7a466223beb997a7b5
* Properly restore scroll position on K+ b/13333564.Andrew Sapperstein2014-04-151-1/+8
| | | | | | | | | There's a bug in chromium webview that causes the scroll position to be improperly reported the first time onScrollChanged is called. This breaks rotation on K+ so we delay it until the content is ready on K. Change-Id: I57729ad5279a999ab523919c6059897813b1370e
* Show quoted text should be auto aligned.Andrew Sapperstein2014-03-201-0/+1
| | | | | | | | | Fixes b/13433568. dir="auto" uses the content of its text to set the direction. This makes the text show up on either the left or right aligned depending upon locale. Change-Id: Ifff7b6b7b6ffddbd386c14545bc094bbb9bee84d
* fix missing message text processing upon send (and as drafts mutate)Andy Huang2014-02-191-4/+10
| | | | | | | | | | | | | Fix message body processing when transitioning through the send flow. Previously, the message text was largely unprocessed, but it wasn't obvious like it is now with 980px viewports. Also move 'table-cell' wrapping from inside the message template to Java code so the in-place body replacement that happens during send can also use it. Bug: 13079016 Change-Id: I9a6a801c43b76c1714dfd2c8b41649fa6b9e90c8
* fix text sizing inaccuracy from 980px switchAndy Huang2014-02-101-2/+1
| | | | | | | | | | | | | The side margin was in CSS px, but goalWidth was in dp. This caused the goalWidth to be smaller than it should, which caused scrollWidth to be smaller, which caused each message's zoom factor to be larger, which caused text to be larger than it used to be. Now. goalWidth and documentWidth both have body margins accounted for in the proper units. Bug: 12579959 Change-Id: Ice36b48f381cf3171b092ba27152aa56b64f4100
* Render conversations to 980px viewportAndy Huang2014-02-071-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Expand all conversations to 980px width to allow double-tap to continue to work on newer Chromium builds. See https://codereview.chromium.org/18850005. cool side effects * much more usable double-tap zoom factor on KK+ (now "it just works") * better text rendering fidelity in complex layouts (text no longer escapes bounds as it tended to do before) * fixes text sizing edge cases where text was unexpectedly large and/or line heights messed with text rendering Initially enable these changes on both JB- and KK+ WebViews. Disable NARROW_COLUMNS layout on JB- to prevent very short columns. pros on JB-: better rendering fidelity like on KK+, consistency with KK+ cons on JB-: some power users will miss pinch-then-double-tap-to-reflow functionality Possible future improvement: use device-width viewport when full convo fits to inherit Chromium's new fast-click-handling behavior. Bug: 12579959 Bug: 10695551 Change-Id: I13f85a6df909a966fcd0862e5bd292ec6ae77212
* Delete dead code and two unused font files. \o/.Andrew Sapperstein2014-01-242-0/+0
| | | | Change-Id: I9934b8b20734e17ede4060dfbb57f87ed6c89aef
* View inline images in photo viewer. b/5555553.Andrew Sapperstein2014-01-071-2/+16
| | | | | | | | | | | | | | | | Uses the existing javascript image src rewriting step to build a mapping of urls to message ids. This mapping is passed into the InlineAttachmentViewIntentBuilder so that it can use this information along with the conversation id and account name to build attachment and attachment list uris so that a photo viewer open intent can be created. Additionally, SecureConversationViewController will need a different mechanism for this UI to work in Email/the eml viewer. Change-Id: If14800348fe2191d0633bf768b8cb4e9746f6578
* Delete dead code. b/11708307.Andrew Sapperstein2013-11-251-130/+0
| | | | Change-Id: I82cca1daa5c3fae375e72f24c76b68e44517e0f5
* Print list of attachments.Andrew Sapperstein2013-09-2710-0/+0
| | | | | | | Doesn't print attachment thumbnails for image attachments. b/10712542 Change-Id: I5202338f60ddeb35238fce9d79691ba3c7a29e89
* Use documentElement.scrollHeight unconditionally.Andrew Sapperstein2013-08-201-6/+2
| | | | | | Sometimes the other heights are too big. Change-Id: Ib60321a0afece97f4024765f8682f8fca7c1e484
* Fix b/10407366.Andrew Sapperstein2013-08-201-2/+6
| | | | | | | | | | | | We were occasionally using the wrong height of the html document to determine where to place the bottom footer. We're now using the proper place for the bottom of the webview. However, there are still some minor issues (a little bit of content being cut off due to some other improper use of offsetHeight). The fix for that issue will be tracked in b/10410912. Change-Id: I2f6dbd46f52db3809e14ddb3e3257ebbc0fbe0b4
* Conversation UI Visual Refresh: border fixes.Andrew Sapperstein2013-08-011-1/+23
| | | | | | | | Borders now expand and collapsed based upon the state of the messages above and below them. Also fixed a bug where replying to a message added an additional border. Change-Id: Ia90caf4ea595767a90213fe33b29e1bd75c0aca0
* Properly Update conv when new message added.Andrew Sapperstein2013-07-291-2/+4
| | | | | | | | | | Previously we weren't adding the right items. Need to not add a top border but add a border at the end. Additionally needed to change the javascript to also add the spacer for the bottom border. Change-Id: Ief82dca25c0c11b258cfe9a3d783d6c4f2e62974
* Fix table-layout emails, blacklist transforms by sender domainAndy Huang2013-04-241-0/+2
| | | | | | | | | | | | | Fix Twitter emails by overriding any 'table-layout' style when overriding table width to 'auto'. Add infrastructure to blacklist transforms by sender domain. Not actually used yet, because the Twitter email fix above is more generally useful and doesn't need to be special-cased. Bug: 8403536 Bug: 8685326 Change-Id: I9e72e8e6336c138674839724df57eef1f86a2d9b
* am 6a507c35: Merge "disable debug printing of message transforms" into ↵Andy Huang2013-04-221-9/+14
|\ | | | | | | | | | | | | jb-mr2-dev * commit '6a507c356cd64a3b289c2b51d0294e243c520b36': disable debug printing of message transforms
| * disable debug printing of message transformsAndy Huang2013-04-211-9/+14
| | | | | | | | | | Bug: 8576229 Change-Id: I61d515360242c63f1cb51abc5c15eb882a916166
* | undo the <td> transform if it didn't help at allAndy Huang2013-04-211-4/+21
|/ | | | | | | | The <td> width transform is somewhat risky, so if we reach the end of all transforms and the <td> change didn't help at all, undo it. Bug: 8676694 Change-Id: I1767855483b1c2a0c78defc53a1fc5ea8fdccb93
* report transform results to the conversation fragmentAndy Huang2013-03-141-37/+89
| | | | | | | Also print it out in the message body in tiny text when the transforms succeeded. Change-Id: I942f707b5f7251f7aa9043c48fc0aa794c753065
* refine some transformation rulesAndy Huang2013-03-131-20/+36
| | | | | | | | | | | Improve the div width->max-width rule: * apply it to <textarea>s to fix MOMA internal news emails * override any min-width value * switch from auto-width to 100% for empty textareas * implement undo of this rule Bug: 7400516 Change-Id: Ie72f7f80e9da8eb4c1a169e9b2bf56cf8a01c098
* don't re-apply the class-adding transformsAndy Huang2013-03-131-0/+3
| | | | | | | | Reapplying them was causing them to sometimes be backed out upon image load, leading to text growing and shrinking several times. Bug: 7400516 Change-Id: I5543361fd0aa60e233c27f28d243fbf037cbe1da
* remove the unpopular intra-word ruleAndy Huang2013-03-131-15/+0
| | | | | | | | | It kicked in too often to warrant fixing 1% of unbreakable long email signatures. Maybe we could bring it back if it could be properly scoped, but I haven't figured out a good scoping rule yet. Bug: 7400516 Change-Id: Id15ca8ec45783182d2c0fedd211a9b449ad12bb0
* add <img> transform for readabilityAndy Huang2013-03-131-16/+65
| | | | | | | | | | | | | | Shrink any <img> elements with an effective width wider than the document. Instead of setting the width outright to the document width, use "100%" + max-width so it can be smaller if the layout allows. Genericize the actionLog to be a list of functions, contexts, and parameters. I would normally use bind() but A) it may not be available on older WebKit builds, and B) it introduces an unnecessary closure. Bug: 7400516 Change-Id: I5ab7f81674f9e238e6dc5ea04669d282c0586066
* reverse ineffective HTML transforms, add aggressive <td> transformAndy Huang2013-03-081-18/+91
| | | | | | | | | | | | | | | | Reverse <table> and <td> transform work when the resulting width is unchanged, or significantly unchanged (below a threshold). Switch <table> and <td> transforms to use CSS !important overriding instead of modifying the elements inline. This is easier to reverse. Add another <td> transform to aggressively trigger word wrapping intra- word. This helps break long signatures, but it can render complex promotional email unreadable. I'll have to hide this behind a classifier that prevents this from running on complex messages. Bug: 7400516 Change-Id: Ia17bae2b28eeec9d1cd40d0292380ae5d660586d
* start munging wide <div> and <table> elementsAndy Huang2013-03-081-9/+57
| | | | | | | | | | | | | | | | | | Modify HTML content that is too wide if the experimental flag is on. Find <table> elements with a width wider than the body and remove the widths in the hope that the table would otherwise fit. Content authors often use this trick to prevent their content from growing too wide in a very wide desktop browser window. Failing that, find all <div> elements where a width is specified that is wider than the body, and turn the width into a max-width. Bug: 7400516 Change-Id: Ie4d3c2c4c50a191c30ee590dce71bc9bf6de8268
* make scroll position compensation more reliableAndy Huang2013-01-221-1/+5
| | | | | | | Not very elegant, but it seems to help on Nexus 10. Bug: 7400516 Change-Id: Iea7a67da63bb01bb58aad9c7b8035c90b33230e0
* counteract jumping in CSS-based message zoomingAndy Huang2013-01-171-16/+35
| | | | | | | | | | | | | | | Adjust scroll position after a zoom to counteract jumping. There's still a momentary flash, so it's not perfect yet. That might be suppressable with ingenuity (i.e. gross hacks). Suppress WebView input handling for an input sequence on POINTER_DOWN to prevent WebView from scrolling during a scale. I've chosen to implement message translation-during-scale manually, so the WebView must not move on its own during a scale, or else the translation will be doubly applied. Bug: 7400516 Change-Id: I54c347c37d28864441c8a3bca3395bdc86f6616f
* Set font sizes, colors, and types for subject/senders/ snippet. Set max ↵mindyp2013-01-032-0/+0
| | | | | | | | | | | | | | length for subject. Also, a fix for: b/7937635 Senders text displayed as "e": need to figure out why the single sender was being marked as elided at all so leaving the issue open Considering an option in which I divide the subject into 2 textviews and ellipsize based on length... Part of matching redlines. Change-Id: I109001fb1d52c032d489bf7d3a0a6e925a9d7f1a
* per-message zoom using JavaScript + CSS 3D transformsAndy Huang2012-12-121-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | When Auto-fit is off, disable built-in WebView zooming, which is only capable of zooming an entire document (the entire conversation). Use ScaleGestureDetector to trigger a CSS 3D transform to zoom in/out just a single message div. During the gesture, the elements above and below the message being scaled are untouched. This is ugly. TODO: they should either move away (tricky) or at least fade out. When the gesture is complete, to avoid leaving overlapping elements, we force-scale the height and reset the transform origin to the top left. TODO: auto-scroll to the correct place to counteract this perceived jump. Double-tap is not yet implemented. We'll have to do it ourselves. Bug: 7478834 Change-Id: I114e4977304c7060d499d116cc75bc0488967448
* Fix always show pictures for multi-message threadScott Kennedy2012-11-121-14/+17
| | | | | | | | | The always allow pictures button only affects a single message in the thread, so we need to propogate it to all other messages from the same sender. Bug: 7346217 Change-Id: I722ef284afd7b8853ddab622f54b86ebaaa5d463
* speculative fix for native WebView crashesAndy Huang2012-11-051-1/+0
| | | | | | | | | | | | | | | | | | | Towards the end of MR1, we saw more native crashes on conversation load. It's possible it was purely due to increased testing, but just in case it was due to loading animation changes, go back to Gmail1-style content-ready code. The document has a small div that initially has an "initial-load" class set on JB+. The class is no longer dynamically added in JS. The animation-start event listener remains as-is, configured on DOM parse (and not later upon DOM load). Give the animation a different name from the CSS class that triggers it, on the off-chance that this is crossing some wires. Bug: 7370125 Change-Id: I4f0f807fbb9e32e024b6c74a6d9684e7fb337695
* fix headers drawing mismatched with bodies upon send on tabletAndy Huang2012-10-251-0/+2
| | | | | | | | | | | | | | Two-pane layout runs a stray layout pass upon send (related to b/7409762). Prevent it from changing existing header positions until the new body geometry is determined. Fixing that exposed a separate issue, that conversations shorter than one screen tall would not draw the new header, ever. Add manual position refresh calls to newer JS calls that had previously depended on ContentSizeChangeListener. Bug: 7404104 Change-Id: I805fc9ab12878a95573316763986d84f89cfd2c0
* process super-collapsed contentAndy Huang2012-10-231-14/+23
| | | | | | | | | | | | | | Content within a super-collapsed block that was lazy-loaded wasn't being processed for images and quoted text like initially expanded content. Most images were caught by the regexp anyway, but we need this step for completeness, and so quoted text isn't out of control. Patch up other cases of content replacement to hide images as well. Bug: 7392191 Change-Id: Ib784ce52c9c477635a125f261a2b9717b20887d2
* optimize re-rendering a conversation for a single outgoing messageAndy Huang2012-10-221-0/+9
| | | | | | | | | | | | | | | | | | | Rather than rendering the conversation from scratch, look for the special case of a single new message from the user that is the last message, and just append the message HTML at the end of the existing conversation. To avoid stacking the new header on top of the previously last message, do not notify ConversationContainer of dataset change in this process. (An adapter dataset change means the container will toss out all overlay views and immediately render given the current spacers and adapter items. Do not want.) The overlays for the new message will be drawn later when JS notifies of a geometry change. Bug: 7378693 Change-Id: Ifd2d3da8c57f685bbeae18f3d42c60821a97368c
* disable zoom on empty-looking conversationsAndy Huang2012-10-161-2/+47
| | | | | | | | | | | | Disable zoom if all initially expanded messages are empty looking-- that is, if their whitespace-trimmed text content is zero-length. Begin to dynamically assemble the meta viewport tag, which will be useful for other advanced zoom-related tweaks. Bug: 7340665 Change-Id: I86112617c18013e74b38af06d8a058aad315e9ec
* toggle normalization & zoom on/offAndy Huang2012-10-131-10/+25
| | | | | | | | | | | | | | | and wire it all up to a pref that re-renders upon change. separately, make a few improvements to whitespace management when zoomed in with normalized mode: * place attachment overlays at the top of their regions * place overlays above the first expanded message at the top of the conversation, instead of the usual position just above the message. * impose a max zoom factor to limit excessive spacer whitespace Bug: 7312540 Change-Id: Iae3afff0ee81e4ba9367568e884a041780b24ebf
* When updating a message body, don't collapse quoted textAndy Huang2012-10-081-8/+14
| | | | | | | | | | | | | | | | | When a reply is sent and synced, the quoted text portion transitions from an expanded snippet to a collapsed one, which shrinks the conversation height and causes the scroll position to jump. It's not enough to just avoid processing reply bodies, because a reply to a wide message must also be normalized if the quoted text portion is visible. So when replacing a message body, switch the initial state of quoted text blocks from collapsed to expanded. Bug: 7246054 Change-Id: I5375beeb4209779e7cb7feaa570590a9cbc520da
* do not wait for DOM onload before starting content ready signalAndy Huang2012-10-071-18/+22
| | | | | | | | | | | | | | | Gmail1 started the content-ready animation right away; the initial state of the HTML had the animation already. Gmail2 was waiting for the DOM load event before even starting the animation, wasting a lot of time. Starting the animation right away had a race condition where the listener wasn't installed until later, so avoid any such race by starting the animation immediately after registering the listener. Bug: 7258363 Change-Id: I00fc06998a06e1e4dce0d490ead9fbc6fef63ae0
* coalesce image onload handlingAndy Huang2012-10-051-2/+33
| | | | | | | | | | | | | | | | Refine the image onload handling introduced in Idc1e1f21. It turns out that resizing is pretty slow, and image onload happens pretty often for threads or messages with lots of images (pretty common). Rather than immediately handle onload events, process affected Elements in a deferred handler to coalesce consecutive onload events. This will also debounce situations where a single message contains many images, as only one measure and resize should happen. Add timing logs to better diagnose conversation load issues. Bug: 7278331 Change-Id: I252cee9c69955d993aea20379fcdc0beb973e372