Bug 139199 - [Quirks mode only] "Do not trim trailing whitespace followed by <br>" quirk causes lines to stretch
Summary: [Quirks mode only] "Do not trim trailing whitespace followed by <br>" quirk c...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
: 233261 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-02 14:32 PST by Said Abou-Hallawa
Modified: 2023-04-23 11:38 PDT (History)
16 users (show)

See Also:


Attachments
Safari-Rendering (15.87 KB, image/png)
2014-12-02 14:32 PST, Said Abou-Hallawa
no flags Details
FireFox Rendering (43.66 KB, image/png)
2014-12-02 14:32 PST, Said Abou-Hallawa
no flags Details
Test Case (310 bytes, text/html)
2015-02-05 13:03 PST, Benjamin Poulain
no flags Details
Patch (5.25 KB, patch)
2023-04-21 08:54 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (124.25 KB, patch)
2023-04-22 06:17 PDT, zalan
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (561.59 KB, patch)
2023-04-22 07:26 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (1.04 MB, patch)
2023-04-22 09:24 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (1.05 MB, patch)
2023-04-22 14:46 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (1.06 MB, patch)
2023-04-22 19:40 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2014-12-02 14:32:08 PST
Created attachment 242447 [details]
Safari-Rendering

Open the following html in WebKit:

<html>
<body>
  <img height="10" width="100" style="border: 1px solid blue">
  <br/>
  <img height="100" width="10" style="border: 1px solid purple">
  <br/>
  <img height="10" width="100%" style="border: 1px solid blue">
  <br/>
  <img height="100" width="10" style="border: 1px solid purple">
</body>
</html>

Result: The first two image rectangles do not touch with other image rectangles. But the last two rectangles touch each other.
Expected: In FireFox and IE, the four image rectangles touch each other. It looks like in WebKit, when <br/> forces a new line creation (the first two images), the descent of the font is added to the line runs height. But when the a new line is created because of wrapping (the third image), nothing is added to the runs height.
Comment 1 Said Abou-Hallawa 2014-12-02 14:32:36 PST
Created attachment 242449 [details]
FireFox Rendering
Comment 2 Radar WebKit Bug Importer 2014-12-02 14:33:40 PST
<rdar://problem/19119909>
Comment 3 Benjamin Poulain 2015-02-05 13:03:05 PST
Created attachment 246125 [details]
Test Case
Comment 4 Ahmad Saleem 2023-04-21 07:56:47 PDT
I am still able to reproduce this bug in Safari Technology Preview 168 and WebKit ToT similar to attached reference screenshots while Chrome Canary 115 and Firefox Nightly 114 match each other.
Comment 5 zalan 2023-04-21 08:54:30 PDT
Created attachment 466030 [details]
Patch
Comment 6 zalan 2023-04-21 08:55:08 PDT
Let's remove this legacy quirk and see what breaks (needs rebaseline)
Comment 7 zalan 2023-04-21 10:57:34 PDT
lolz, now I know why I chose to implement this quirk in IFC.
Comment 8 zalan 2023-04-22 06:17:11 PDT
Created attachment 466041 [details]
Patch
Comment 9 zalan 2023-04-22 07:26:23 PDT
Created attachment 466043 [details]
Patch
Comment 10 zalan 2023-04-22 09:24:58 PDT
Created attachment 466044 [details]
Patch
Comment 11 zalan 2023-04-22 14:46:42 PDT
Created attachment 466047 [details]
Patch
Comment 12 zalan 2023-04-22 19:40:01 PDT
Created attachment 466049 [details]
Patch
Comment 13 Antti Koivisto 2023-04-23 08:59:18 PDT
Comment on attachment 466049 [details]
Patch

nice <br>
Comment 14 zalan 2023-04-23 09:53:42 PDT
(In reply to Antti Koivisto from comment #13)
> Comment on attachment 466049 [details]
> Patch
> 
> nice <br>
Comment 15 EWS 2023-04-23 10:48:52 PDT
Committed 263291@main (20416c8f90ab): <https://commits.webkit.org/263291@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 466049 [details].
Comment 16 zalan 2023-04-23 11:38:50 PDT
*** Bug 233261 has been marked as a duplicate of this bug. ***