Bug 122498 - Extra whitespace after layout stage
Summary: Extra whitespace after layout stage
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2013-10-08 01:14 PDT by Rob Płóciennik
Modified: 2022-08-18 13:18 PDT (History)
5 users (show)

See Also:

Test case (.html) (185 bytes, text/html)
2013-10-08 05:05 PDT, Rob Płóciennik
no flags Details
Safari 15.5 matches other browsers (189.45 KB, image/png)
2022-06-02 22:01 PDT, Ahmad Saleem
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Płóciennik 2013-10-08 01:14:34 PDT
Using the following test case:

    <body contenteditable="true">
        <font color="#1b6f11">
                <span style="background-color: rgb(191,35,28);">Test1</span></font>

...a visible whitespace is appended to the first line, placed between </font> and <br>.

According to the 'white-space' processing model at https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html: '3. If 'white-space' is set to 'normal' or 'nowrap', linefeed characters are transformed for rendering purpose into one of the following characters: a space character, a zero width space character (U+200B), or no character (i.e., not rendered), according to UA-specific algorithms based on the content script.' As each line is being laid out, however: '3. If a space (U+0020) at the end of a line has 'white-space' set to 'normal', 'nowrap', or 'pre-line', it is also removed.'.
Comment 1 Rob Płóciennik 2013-10-08 05:05:30 PDT
Created attachment 213681 [details]
Test case (.html)

Added the test case in form of a file for convenience.
Comment 2 Ahmad Saleem 2022-06-02 22:01:46 PDT
Created attachment 459992 [details]
Safari 15.5 matches other browsers

There is no difference in rendering across all browser as shown in attached screenshot.

I am not able to reproduce this bug in Safari 15.5 on macOS 12.4. Although, if I am testing incorrectly or interpreting "expected results" wrong, please retest accordingly. Thanks!