<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Backgrounds bleed out of natively rendered text fields"
   href="https://bugs.webkit.org/show_bug.cgi?id=149843#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Backgrounds bleed out of natively rendered text fields"
   href="https://bugs.webkit.org/show_bug.cgi?id=149843">bug 149843</a>
              from <span class="vcard"><a class="email" href="mailto:sabouhallawa&#64;apple.com" title="Said Abou-Hallawa &lt;sabouhallawa&#64;apple.com&gt;"> <span class="fn">Said Abou-Hallawa</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=262666&amp;action=diff" name="attach_262666" title="Patch">attachment 262666</a> <a href="attachment.cgi?id=262666&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=262666&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=262666&amp;action=review</a>

<span class="quote">&gt; Source/WebCore/rendering/RenderBox.cpp:1336
&gt; +    paintFillLayers(paintInfo, style().visitedDependentColor(CSSPropertyBackgroundColor), style().backgroundLayers(), adjustedBackgroundPaintRect(paintInfo.context(), paintRect), bleedAvoidance);</span >

Should not we make paintBackground() itself virtual and make RenderTextControlSingleLine overrides it? I think RenderTextControlSingleLine:: paintBackground() will only have to make a copy of paintRect, adjust it using shrinkRectByOneDevicePixel() and then call the base class function paintBackground(). I think this approach is clearer since the sequence of calls goes from the derived class &quot;RenderTextControlSingleLine::paintBackground()&quot; to the base class &quot;RenderBox::paintBackground()&quot;.  Your approach actually flows from the base class &quot;RenderBox::paintBackground()&quot; to the derived class &quot;RenderTextControlSingleLine::adjustedBackgroundPaintRect&quot; and then back to the base class again &quot;RenderBox::paintBackground()&quot;.&quot;RenderBox::paintBackground()&quot;.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>