<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>86404</bug_id>
          
          <creation_ts>2012-05-14 14:29:50 -0700</creation_ts>
          <short_desc>first-letter not updated when :before content is inserted</short_desc>
          <delta_ts>2026-04-06 13:41:04 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>47815</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Abhishek Arya">inferno</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>arpitabahuguna</cc>
    
    <cc>hyatt</cc>
    
    <cc>igor.oliveira</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>kenrb</cc>
    
    <cc>mitz</cc>
    
    <cc>ntim</cc>
    
    <cc>samwcurry</cc>
    
    <cc>vijayan.bits</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>623337</commentid>
    <comment_count>0</comment_count>
    <who name="Abhishek Arya">inferno</who>
    <bug_when>2012-05-14 14:29:50 -0700</bug_when>
    <thetext>&lt;!DOCTYPE html&gt;
&lt;!-- You should see only one green box for letter &apos;A&apos;. &apos;B&apos; should be black. --&gt;
&lt;html style=&quot;font-family: ahem; font-size: 50px; -webkit-font-smoothing: none;&quot;&gt;
&lt;style&gt;
div:first-letter { color: green; }
.test:before { content: &apos;A&apos;; }
&lt;/style&gt;
&lt;body&gt;
&lt;div id=&quot;div1&quot;&gt;BCD&lt;/div&gt;
&lt;script&gt;
document.body.offsetTop;
document.getElementById(&apos;div1&apos;).setAttribute(&apos;class&apos;, &apos;test&apos;);
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;

Right now, you will see &apos;A&apos; and &apos;B&apos; both green.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>681791</commentid>
    <comment_count>1</comment_count>
    <who name="Arpita Bahuguna">arpitabahuguna</who>
    <bug_when>2012-07-30 02:10:56 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1942004</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-03-16 19:05:30 -0700</bug_when>
    <thetext>(In reply to Arpita Bahuguna from comment #1)
&gt; This issue is perhaps related to the FIXME mentioned in
&gt; RenderBlock::updateFirstLetter():
&gt;     // FIXME: We need to destroy the first-letter object if it is no longer
&gt; the first child. Need to find
&gt;     // an efficient way to check for that situation though before
&gt; implementing anything.
&gt; 
&gt; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2197362</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2026-04-06 13:41:04 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 47815 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>