Bug 20666

Summary: WebKit shows horizontal scrollbar when other browsers do not in div
Product: WebKit Reporter: Alexei Svitkine <myrd>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, bfulgham, simon.fraser, zalan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
test case none

Description Alexei Svitkine 2008-09-05 08:38:18 PDT
Take a look at the attached text case.

Firefox, Opera and IE do not show a horizontal scroll bar in the div, but Webkit (latest nightly and Safari 3.1) does.

The issue is that the URL:

http://hl.udogs.net/files/Uploads/%20User%20Uploads/Zaknafein%20Uploads/FLHscreenshotGameFilms/king.pdf

Does not wrap, and remains on one line, causing the need for the scroll bar. Yet, all other text in the div wraps to the viewable width of the div.

This is inconsistent. If a horizontal scroll bar is displayed, then it does not make sense for the other text to wrap to the viewable width (rather than the scrollable width).

However, the correct behavior, it seems, is to wrap the URL along with the other text. Firefox and Opera wrap it on the / character, while IE wraps it at the % character (which seems worse than /).

Webkit should behave similarly to FF and Opera.
Comment 1 Alexei Svitkine 2008-09-05 08:49:57 PDT
Created attachment 23194 [details]
test case
Comment 2 Ahmad Saleem 2022-12-30 15:39:14 PST
I am able to reproduce this issue in Safari 16.2 & STP160 where it show horizontal scrollbar because "URL" and some text is not wrapped while in case of Firefox Nightly 110, it does not show horizontal scrollbar.

NOTE - Chrome Canary 111, Safari 16.2 & STP160 all show scrollbar.

Just updating the status to "New" and tagging few others to confirms whether it is something need to be fixed or Firefox need to change behavior. Thanks!
Comment 3 zalan 2022-12-30 18:17:14 PST
It looks like Gecko sees '\' as a soft wrap opportunity.