Bug 247722 - Mismatched whitespace widths cause a wrong width of inline box
Summary: Mismatched whitespace widths cause a wrong width of inline box
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-10 01:33 PST by Ahmad Saleem
Modified: 2022-12-21 14:26 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2022-11-10 01:33:14 PST
Hi Team,

This is another blink commit, which we can merge to fix few more edge cases of whitespace in inline box.

Blink Commit - https://src.chromium.org/viewvc/blink?view=revision&revision=195307

Webkit Source - https://github.com/WebKit/WebKit/blob/7a292520f6b12e8d4d9001d1480474b5c83cb0f8/Source/WebCore/rendering/RenderBlockFlow.cpp#L4099

Just wanted to create a bug report before trying.

Thanks!
Comment 1 Karl Dubost 2022-11-10 04:17:21 PST
Ahmad,

I am not sure there is anything to do here.
At least with regards to the test available in the chromium project.
The test as-is passes on Safari Technical Preview 157, Firefox Nightly 108, Chromium 109
Comment 2 Ahmad Saleem 2022-11-10 05:06:14 PST
(In reply to Karl Dubost from comment #1)
> Ahmad,
> 
> I am not sure there is anything to do here.
> At least with regards to the test available in the chromium project.
> The test as-is passes on Safari Technical Preview 157, Firefox Nightly 108,
> Chromium 109

This change led to failing following:

Test Case - https://github.com/WebKit/WebKit/blob/main/LayoutTests/fast/text/simple-line-layout-fallback-space-glyph.html

@Alan - we have following in expected file of above:

<!-- webkit-test-runner [ InlineFormattingContextIntegrationEnabled=false ] -->

Does this fix bug in legacy pipeline?
Comment 3 Ahmad Saleem 2022-11-10 05:06:28 PST
https://github.com/WebKit/WebKit/pull/6342
Comment 4 Radar WebKit Bug Importer 2022-11-17 01:34:16 PST
<rdar://problem/102456945>
Comment 5 Ahmad Saleem 2022-11-17 08:13:24 PST
As discussed with Alan on PR, it seems that it has some pre-requisite, which I will look into later but for time being I have closed my PR because the longer, it will be the more issue it might have and can have merge conflicts etc. So I am going to still investigate about what is the pre-requisite of this and then will try to land both in one go. Thanks!
Comment 6 Ahmad Saleem 2022-12-16 09:11:43 PST
(In reply to Ahmad Saleem from comment #0)
> Hi Team,
> 
> This is another blink commit, which we can merge to fix few more edge cases
> of whitespace in inline box.
> 
> Blink Commit -
> https://src.chromium.org/viewvc/blink?view=revision&revision=195307
> 
> Webkit Source -
> https://github.com/WebKit/WebKit/blob/
> 7a292520f6b12e8d4d9001d1480474b5c83cb0f8/Source/WebCore/rendering/
> RenderBlockFlow.cpp#L4099
> 
> Just wanted to create a bug report before trying.
> 
> Thanks!

This was regression fix from this change:

https://src.chromium.org/viewvc/blink?revision=192404&view=revision

^ I am not sure whether we have an issue about float conversion issue or not.

Link - https://github.com/WebKit/WebKit/blob/703f285930dc2b9c229d5630872d7bd52858171d/Source/WebCore/rendering/RenderText.cpp#L809
Comment 7 zalan 2022-12-21 14:26:37 PST
Yeah, I don't think this applies to us (also IFC does not use this codepath for computing preferred widths anymore.)