<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@apple.com" title="Said Abou-Hallawa <sabouhallawa@apple.com>"> <span class="fn">Said Abou-Hallawa</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=262666&action=diff" name="attach_262666" title="Patch">attachment 262666</a> <a href="attachment.cgi?id=262666&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=262666&action=review">https://bugs.webkit.org/attachment.cgi?id=262666&action=review</a>
<span class="quote">> Source/WebCore/rendering/RenderBox.cpp:1336
> + 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 "RenderTextControlSingleLine::paintBackground()" to the base class "RenderBox::paintBackground()". Your approach actually flows from the base class "RenderBox::paintBackground()" to the derived class "RenderTextControlSingleLine::adjustedBackgroundPaintRect" and then back to the base class again "RenderBox::paintBackground()"."RenderBox::paintBackground()".</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>