Created attachment 258890 [details]
HTML file showing horizontal scrollbar when initial-letter is used.
When a paragraph contains an initial-letter, it appears the line box containing the first line of ordinary text is not shortened by the width of the initial letter. This results in the first line of text overflowing, and a horizontal scrollbar is always present regardless of the width of the window.
Test file attached; the problem is more obvious when the paragraph is justified.
Hi there, I have this issue too on my blog:
Created attachment 263305 [details]
Comment on attachment 263305 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=263305&action=review
> + This because of the sunken behaviour of initial-letter.
"This is because of"
> + const RenderStyle& style = newFloat.renderer().style();
> + float newLeft = m_block.logicalRightForFloat(&newFloat);
Could keep going and make logicalRight/LeftForFloat take references instead of pointers, but I guess that could be another patch. :)
Created attachment 263309 [details]
Comment on attachment 263309 [details]
Clearing flags on attachment: 263309
Committed r191195: <http://trac.webkit.org/changeset/191195>
All reviewed patches have been landed. Closing bug.
This needs some iOS and Win rebaselining.
Dang. I'm quite disappointed that this did not make it into Safari 9.1. I'd started teaching it in my 2016 conference talk on layouts, and people are excited about drop and raised caps. There's no way we can use Initial Letter until this bug fix ships. I'm going to have to pull it from my talk, since Fall 2016 is the earliest I'd expect this to ship now...
Anything any of us can do to help? Are there additional bugs that have to be fixed first? Any reason that someone can reveal about why this fix was not shipped? I'm all for using things early, when few browsers support, with progressive enhancement techniques. But this bug is a blocker. There's no way to use -webkit-initial-letter until this is fixed in Safari.
(In reply to comment #9)
> Anything any of us can do to help?
The main thing you can do is to file bugs, either here or (more effectively) at bugreport.apple.com expressing your desire to have this bug fixed. The report should describe the impact of not fixing the bug to allow us to judge impact.