Closed Bug 440594 Opened 16 years ago Closed 15 years ago

Emoticons lack trailing space

Categories

(MailNews Core :: Backend, defect, P2)

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird 3.0b2

People

(Reporter: base12, Assigned: mkmelin)

References

Details

(Keywords: polish, regression)

Attachments

(5 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.0.1pre) Gecko/2008061902 SeaMonkey/2.0a1pre equivalent to Firefox/2.0.0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.0.1pre) Gecko/2008061902

When an emoticon is displayed in an e-mail, it should be followed by a space before any continuing text.

Reproducible: Always

Steps to Reproduce:
1.Compose an e-mail.
2.Include the text "Here is an :-) emoticon."
3.Send the message to yourself and read it.
Actual Results:  
The text "Here is an :-) emoticon." reads "Here is an <smiley>emoticon."

Expected Results:  
The text "Here is an :-) emoticon." should read "Here is an <smiley> emoticon."
{{
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Here is an :-) emoticon.
}}


[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.15pre) Gecko/2008041003 Thunderbird/2.0.0.15pre] (nightly) (W2Ksp4)
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a5pre) Gecko/20070515 SeaMonkey/1.5a] (nightly) (W2Ksp4)

display with space.


[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.0.1pre) Gecko/2008062003 Thunderbird/3.0a2pre] (nightly) (W2Ksp4)
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.0.1pre) Gecko/2008062001 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)

Confirming bug.
Assignee: mail → nobody
Status: UNCONFIRMED → NEW
Component: MailNews: Main Mail Window → MailNews: Backend
Ever confirmed: true
Keywords: regression
Product: Mozilla Application Suite → Core
QA Contact: backend
Target Milestone: --- → mozilla1.9
Version: unspecified → Trunk
Flags: blocking-thunderbird3?
I don't see this, is is windows only (which would be odd)? Screenshot?
Target Milestone: mozilla1.9 → ---
Product: Core → MailNews Core
Flags: blocking-thunderbird3? → blocking-thunderbird3-
Attached image "No space" image
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1a2pre) Gecko/2008080519 SeaMonkey/2.0a1pre] (home, optim default) (W2Ksp4)
Regressed between
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a6pre) Gecko/2007062001 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)
and
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a6pre) Gecko/2007062101 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)

<http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=MozillaTinderboxAll&branch=HEAD&branchtype=match&sortby=Date&hours=2&date=explicit&mindate=2007-06-20+01&maxdate=2007-06-21+02&cvsroot=%2Fcvsroot>
My guess would be
{{
2007-06-20 12:49	roc+%cs.cmu.edu 	...  	Bug 385123. Don't insert spaces after holes while we build a textrun. r=vlad
}}
Blocks: 385123
Severity: trivial → minor
Flags: wanted-thunderbird3?
I see it on linux now - sent myself the "Here is an :-) emoticon.". Requesting blocking1.9.1 since it seems a core regression and it makes us look bad.
Flags: blocking1.9.1?
OS: Windows XP → All
Hardware: PC → All
roc: do you know if this is regression from bug 385123 per se, or did we rely on some bug?
I don't know. Do you have an HTML testcase that doesn't display as it should?
This is approximately what we convert it to internally to display.
(In reply to comment #8)
> html testcase showing the missing space after the smiley

[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a5pre) Gecko/20070515 SeaMonkey/1.5a] (nightly) (W2Ksp4)
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b2pre) Gecko/20081017 SeaMonkey/2.0a2pre] (nightly) (W2Ksp4)

I confirm that this testcase is good to test this bug :-)
Our rendering of that testcase is correct as far as I can tell. The span with the :-) text is display:none, so the spaces on either side should collapse together.
Attached file alternative markup
Can you produce markup like this instead? With :before and content:url(...), the image is actually in the content stream so it prevents whitespace collapsing across the emoticon.
Ok, relying on a bug then. Just need to fix the css then.

<http://mxr.mozilla.org/comm-central/search?string=moz-smiley-s&find=\.css&findi=\.css&filter=^[^\0]*%24&hitlimit=&tree=comm-central>
Flags: wanted-thunderbird3?
Flags: wanted-thunderbird3+
Flags: blocking1.9.1?
Keywords: helpwanted
Priority: -- → P2
Target Milestone: --- → Thunderbird 3.0b1
Flags: wanted-seamonkey2?
Keywords: polish
Attached patch proposed fix (obsolete) — Splinter Review
Update the css... (diff -uw coming up)
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Attachment #355614 - Flags: superreview?(neil)
Attachment #355614 - Flags: review?(philringnalda)
(I also moved frown ;} to ;\n})
Keywords: helpwanted
Target Milestone: Thunderbird 3.0b1 → Thunderbird 3.0b2
Attached patch proposed fix (diff -uw) (obsolete) — Splinter Review
Comment on attachment 355614 [details] [diff] [review]
proposed fix

>+span.moz-smiley-s7,
>+span.moz-smiley-s8,
>+span.moz-smiley-s9,
>+span.moz-smiley-s10,
>+span.moz-smiley-s11,
>+span.moz-smiley-s12,
>+span.moz-smiley-s13,
>+span.moz-smiley-s14,
>+span.moz-smiley-s15,
>+span.moz-smiley-s16
> {
>   font-size: 17px;
>-  padding-left: 20px; 
>-  margin-left: 2px; 
>   margin-top: 2px;
>-  background-repeat: no-repeat; 
>   -moz-user-select: all;
>-  background-position: center center;
> }
This didn't give me desirable results. As you can see the background used to be centred. To replicate that, I suggest the following, which seems to work reasonably well here, thus avoiding having to repeat it for each smiley:
{
  display: inline-block;
  vertical-align: middle;
  -moz-user-select: all;
}
Attached patch proposed fix, v2Splinter Review
Attachment #355614 - Attachment is obsolete: true
Attachment #355617 - Attachment is obsolete: true
Attachment #355781 - Flags: superreview?(neil)
Attachment #355781 - Flags: review?(philringnalda)
Attachment #355614 - Flags: superreview?(neil)
Attachment #355614 - Flags: review?(philringnalda)
This new css also makes resizing text also resize smileys properly.
Attachment #355781 - Flags: superreview?(neil) → superreview+
Attachment #355781 - Flags: review?(philringnalda) → review+
Comment on attachment 355781 [details] [diff] [review]
proposed fix, v2

Nice.
changeset:   1589:39f70e0c4b3c
http://hg.mozilla.org/comm-central/rev/39f70e0c4b3c

->FIXED
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Flags: wanted-seamonkey2?
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090110 SeaMonkey/2.0a3pre] (experimental/_m-c_, home, optim default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/6acaaa957e0a
 +http://hg.mozilla.org/comm-central/rev/865f907bb16b)

V.Fixed
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.