Different word wrapping between Chrome and Edge

698 views
Skip to first unread message

Bruce Dawson

unread,
Mar 24, 2016, 1:38:20 PM3/24/16
to Chromium-discuss
This web page behaves differently in Chrome versus Edge:

https://connect.microsoft.com/VisualStudio/feedback/details/2374731/pgo-build-generates-movaps-to-unaligned-address

In Chrome the Description field does not word wrap which can cause long sentences to be truncated, especially if your browser window is not extremely wide. In particular the sentence that starts with "The MACROBLOCK structure (defined in" gets truncated like a victim naming the murderer in a budget mystery film.

On Edge that line is word wrapped.

I can't tell if this is a browser bug, undefined behavior, or ???

The comments are consistently word wrapped in both browsers.

Bruce Dawson

unread,
Mar 24, 2016, 1:40:45 PM3/24/16
to Chromium-discuss
BTW, the Description section is wrapped in a <pre> tag - does the web standard say whether word wrapping should be applied there or not?

PhistucK

unread,
Mar 24, 2016, 2:01:29 PM3/24/16
to bruce...@chromium.org, Chromium-discuss
Well, that <pre> also has word-wrap: break-word; so this seems like the intentional behavior.


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

PhistucK

unread,
Mar 24, 2016, 2:04:19 PM3/24/16
to bruce...@chromium.org, Chromium-discuss
Oops. No. It truncates, so, no. I would expect it to wrap, but for me, it truncates. This is the end of one of the sentences for me -
declared with __declspec(align(16)) so it is reaso


PhistucK

Bruce Dawson

unread,
Mar 24, 2016, 2:07:04 PM3/24/16
to PhistucK, Chromium-discuss
Yep, truncates in Chromium. The point at which it truncates depends on how wide your browser window is.

So, possible bug then, given the presence of the word-wrap and break-word tags?

PhistucK

unread,
Mar 24, 2016, 2:17:15 PM3/24/16
to Bruce Dawson, Chromium-discuss
Not sure... It might just need white-space: pre-wrap;.


PhistucK

Primiano Tucci

unread,
Mar 24, 2016, 2:26:40 PM3/24/16
to phis...@gmail.com, Bruce Dawson, Chromium-discuss
I am not a CSS criminal mastermind, but I think that the issue there is that you have a <pre>, which is white-space: pre inside:
1. a fix-width container (workspace) 
2. a overflow-x: hidden container (MainContentSurround)

As such I think that line truncation is the expected behavior. MDN for says about pre: "Sequences of whitespace are preserved, lines are only broken at newline characters in the source and at <br> elements."

If the wrap was pre-wrap instead (https://jsfiddle.net/r057j0qf/) line-break should be expected.

Out of curiosity what is edge doing with these two jsfiddles?

Bruce Dawson

unread,
Mar 24, 2016, 2:32:29 PM3/24/16
to Primiano Tucci, PhistucK Productions, Chromium-discuss
Edge wraps the second jsfiddle (https://jsfiddle.net/r057j0qf/) onto seven lines. The first one is truncated to "this is a very long lin".

Primiano Tucci

unread,
Mar 25, 2016, 10:13:38 AM3/25/16
to Bruce Dawson, Chromium-discuss, PhistucK Productions
hmm this seems consistent with what chrome does and with specs. there must be some other nitty gritty css thing in that msdn page.
on a other thread (don't remember which, I am on a phone, I think a recent one on project-trim with esphren@ and eae@) somebody was mentioning some recent change of behavior in chrome  with white-space:pre and break-word. maybe that's what happening here 
Reply all
Reply to author
Forward
0 new messages