Bug 122498

Summary: Extra whitespace after layout stage
Product: WebKit Reporter: Rob Płóciennik <r.plociennik>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, darin, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test case (.html)
none
Safari 15.5 matches other browsers none

Description Rob Płóciennik 2013-10-08 01:14:34 PDT
Using the following test case:

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

...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!