servo / servo

Servo, the embeddable, independent, memory-safe, modular, parallel web rendering engine

Home Page:https://servo.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spaces sometimes obey the `white-space` of the block container, not the inline element

Loirooriol opened this issue · comments

<!DOCTYPE html>
<div style="width: 0; white-space: nowrap">aa<span style="white-space: normal"> </span>bb</div>
<div style="width: 0; white-space: nowrap">a<span style="white-space: normal">a </span>bb</div>
<div style="width: 0; white-space: nowrap">aa<span style="white-space: normal"> b</span>b</div>
<div style="width: 0; white-space: nowrap">a<span style="white-space: normal">a b</span>b</div>
<hr>
<div style="width: 0; white-space: normal">aa<span style="white-space: nowrap"> </span>bb</div>
<div style="width: 0; white-space: normal">a<span style="white-space: nowrap">a </span>bb</div>
<div style="width: 0; white-space: normal">aa<span style="white-space: nowrap"> b</span>b</div>
<div style="width: 0; white-space: normal">a<span style="white-space: nowrap">a b</span>b</div>
Servo 2020 Servo 2013 Gecko, Blink, WebKit

The logic for InlineFormattingContextState.white_space seems wrong.