NEW 86404
first-letter not updated when :before content is inserted
https://bugs.webkit.org/show_bug.cgi?id=86404
Summary first-letter not updated when :before content is inserted
Abhishek Arya
Reported 2012-05-14 14:29:50 PDT
<!DOCTYPE html> <!-- You should see only one green box for letter 'A'. 'B' should be black. --> <html style="font-family: ahem; font-size: 50px; -webkit-font-smoothing: none;"> <style> div:first-letter { color: green; } .test:before { content: 'A'; } </style> <body> <div id="div1">BCD</div> <script> document.body.offsetTop; document.getElementById('div1').setAttribute('class', 'test'); </script> </body> </html> Right now, you will see 'A' and 'B' both green.
Attachments
Arpita Bahuguna
Comment 1 2012-07-30 02:10:56 PDT
This issue is perhaps related to the FIXME mentioned in RenderBlock::updateFirstLetter(): // FIXME: We need to destroy the first-letter object if it is no longer the first child. Need to find // an efficient way to check for that situation though before implementing anything. Shall try and upload a patch for the same.
Ahmad Saleem
Comment 2 2023-03-16 19:05:30 PDT
(In reply to Arpita Bahuguna from comment #1) > This issue is perhaps related to the FIXME mentioned in > RenderBlock::updateFirstLetter(): > // FIXME: We need to destroy the first-letter object if it is no longer > the first child. Need to find > // an efficient way to check for that situation though before > implementing anything. > > Shall try and upload a patch for the same. We still have this FIXME - https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderBlock.cpp#2668
Note You need to log in before you can comment on or make changes to this bug.