[webkit-reviews] review granted: [Bug 239689] Setting white-space to non-default value dynamically on a blank (whitespace/new line) does not work correctly : [Attachment 470415] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 18 07:15:52 PDT 2024


Antti Koivisto <koivisto at iki.fi> has granted  review:
Bug 239689: Setting white-space to non-default value dynamically on a blank
(whitespace/new line) does not work correctly
https://bugs.webkit.org/show_bug.cgi?id=239689

Attachment 470415: Patch

https://bugs.webkit.org/attachment.cgi?id=470415&action=review




--- Comment #13 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 470415
  --> https://bugs.webkit.org/attachment.cgi?id=470415
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=470415&action=review

> Source/WebCore/style/StyleTreeResolver.cpp:975
> +		   if (!node.renderer() && containsOnlyASCIIWhitespace &&
parent.style.preserveNewline())
> +		       return true;

This could test !text->renderer() for consistency.
This really needs to be done only when parent.style.preserveNewline() changes
value. We could set a bit in the parent struct when that happens and test for
that.


More information about the webkit-reviews mailing list