<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:zalan@apple.com" title="zalan <zalan@apple.com>"> <span class="fn">zalan</span></a>
</span> changed
<a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - Make paintTextWithShadows a member function (TextPainter)."
href="https://bugs.webkit.org/show_bug.cgi?id=151979">bug 151979</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>ASSIGNED
</td>
</tr>
<tr>
<td style="text-align:right;">Assignee</td>
<td>webkit-unassigned@lists.webkit.org
</td>
<td>zalan@apple.com
</td>
</tr>
<tr>
<td style="text-align:right;">Attachment #266840 Flags</td>
<td>
</td>
<td>review?
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - Make paintTextWithShadows a member function (TextPainter)."
href="https://bugs.webkit.org/show_bug.cgi?id=151979#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - Make paintTextWithShadows a member function (TextPainter)."
href="https://bugs.webkit.org/show_bug.cgi?id=151979">bug 151979</a>
from <span class="vcard"><a class="email" href="mailto:zalan@apple.com" title="zalan <zalan@apple.com>"> <span class="fn">zalan</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=266840&action=diff" name="attach_266840" title="Patch">attachment 266840</a> <a href="attachment.cgi?id=266840&action=edit" title="Patch">[details]</a></span>
Patch
Simplified version:
void TextPainter::paintTextWithShadows(const ShadowData* shadow, const FontCascade& font, const TextRun& textRun, const AtomicString& emphasisMark,
int emphasisMarkOffset, int startOffset, int endOffset, const FloatPoint& textOrigin, bool stroked)
{
if (!shadow) {
drawTextOrEmphasisMarks(font, textRun, emphasisMark, emphasisMarkOffset, textOrigin, startOffset, endOffset);
return;
}
Color fillColor = m_context.fillColor();
bool opaque = !fillColor.hasAlpha();
bool lastShadowIterationShouldDrawText = !stroked && opaque;
if (!opaque)
m_context.setFillColor(Color::black);
while (shadow) {
ShadowApplier shadowApplier(m_context, shadow, m_boxRect, lastShadowIterationShouldDrawText, opaque, m_textBoxIsHorizontal ? Horizontal : Vertical);
if (!shadowApplier.nothingToDraw())
drawTextOrEmphasisMarks(font, textRun, emphasisMark, emphasisMarkOffset, textOrigin + shadowApplier.extraOffset(), startOffset, endOffset);
shadow = shadow->next();
}
if (!lastShadowIterationShouldDrawText) {
if (!opaque)
m_context.setFillColor(fillColor);
drawTextOrEmphasisMarks(font, textRun, emphasisMark, emphasisMarkOffset, textOrigin, startOffset, endOffset);
}
}</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>