summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorAndy Huang <ath@google.com>2014-02-19 18:29:43 -0800
committerAndy Huang <ath@google.com>2014-02-19 18:29:43 -0800
commit986776bbd046c9569a4abb67501819bee61e7194 (patch)
treeafd3f805873335724b4b367aa240b2349747b710 /assets
parentea4578697b52e43fd7be86882c77c92057c2e250 (diff)
downloadandroid_packages_apps_UnifiedEmail-986776bbd046c9569a4abb67501819bee61e7194.tar.gz
android_packages_apps_UnifiedEmail-986776bbd046c9569a4abb67501819bee61e7194.tar.bz2
android_packages_apps_UnifiedEmail-986776bbd046c9569a4abb67501819bee61e7194.zip
fix missing message text processing upon send (and as drafts mutate)
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
Diffstat (limited to 'assets')
-rw-r--r--assets/script.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/assets/script.js b/assets/script.js
index 17086823b..bbfa5e5c8 100644
--- a/assets/script.js
+++ b/assets/script.js
@@ -734,6 +734,14 @@ function replaceSuperCollapsedBlock(startIndex) {
measurePositions();
}
+function processNewMessageBody(msgContentDiv) {
+ processQuotedText(msgContentDiv, true /* showElided */);
+ hideUnsafeImages([msgContentDiv]);
+ if (up(msgContentDiv, "mail-message").classList.contains("expanded")) {
+ normalizeElementWidths([msgContentDiv]);
+ }
+}
+
function replaceMessageBodies(messageIds) {
var i;
var id;
@@ -743,8 +751,7 @@ function replaceMessageBodies(messageIds) {
id = messageIds[i];
msgContentDiv = document.querySelector("#" + id + " > .mail-message-content");
msgContentDiv.innerHTML = window.mail.getMessageBody(id);
- processQuotedText(msgContentDiv, true /* showElided */);
- hideUnsafeImages([msgContentDiv]);
+ processNewMessageBody(msgContentDiv);
}
measurePositions();
}
@@ -757,8 +764,7 @@ function appendMessageHtml() {
var border = msg.children[1]; // get the border spacer as well
document.body.appendChild(body);
document.body.appendChild(border);
- processQuotedText(msg, true /* showElided */);
- hideUnsafeImages(msg.getElementsByClassName("mail-message-content"));
+ processNewMessageBody(body.querySelector(".mail-message-content"));
measurePositions();
}