Some grammar in webkit and chrome have different display . When use white-space:pre and the label not have content. Chrome and webkit have different display. Then I see the https://developer.mozilla.org/en-US/docs/Web/CSS/white-space,I think might be save the white space. WebKitGTK version is 2.36.3
Created attachment 460537 [details] the two file only change white-space :pre
Created attachment 460609 [details] Test reduction It looks like we ignore the white-space style change when the content is whitespace only.
(In reply to 2843035794 from comment #0) > Some grammar in webkit and chrome have different display . > When use white-space:pre and the label not have content. > Chrome and webkit have different display. > Then I see the > https://developer.mozilla.org/en-US/docs/Web/CSS/white-space,I think might > be save the white space. You are right, white-space handling has a bug in WebKit. Thank you for filing it.
1. initially we don't create a renderer (RenderText) for the collapsed whitespace content 2. however when style changes to "yes, please preserve whitespace", we don't recover from it by constructing a RenderText object.
This looks like a RenderTreeUpdater::updateRenderTree() issue -> Antti.
<rdar://problem/96295935>