<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Replace all RenderTheme::popupInternalPadding methods with a single one returning a LengthBox"
href="https://bugs.webkit.org/show_bug.cgi?id=156098">bug 156098</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;">Attachment #275375 Flags</td>
<td>review?
</td>
<td>review+
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Replace all RenderTheme::popupInternalPadding methods with a single one returning a LengthBox"
href="https://bugs.webkit.org/show_bug.cgi?id=156098#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Replace all RenderTheme::popupInternalPadding methods with a single one returning a LengthBox"
href="https://bugs.webkit.org/show_bug.cgi?id=156098">bug 156098</a>
from <span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=275375&action=diff" name="attach_275375" title="Try to fix mac builds">attachment 275375</a> <a href="attachment.cgi?id=275375&action=edit" title="Try to fix mac builds">[details]</a></span>
Try to fix mac builds
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=275375&action=review">https://bugs.webkit.org/attachment.cgi?id=275375&action=review</a>
<span class="quote">> Source/WebCore/rendering/RenderTheme.h:187
> + virtual LengthBox popupInternalPaddingBox(const RenderStyle&) const { return LengthBox(0); }</span >
Not sure this function needs the word “Box” in its name. Also could write:
return { 0 };
Instead of return LengthBox(0);
<span class="quote">> Source/WebCore/rendering/RenderThemeGtk.cpp:767
> + return LengthBox(0);</span >
Again, I prefer:
return { 0 };
<span class="quote">> Source/WebCore/rendering/RenderThemeGtk.cpp:782
> + return LengthBox(borderWidth.top + focusWidth, borderWidth.right + focusWidth + (style.direction() == LTR ? minArrowSize : 0),
> + borderWidth.bottom + focusWidth, borderWidth.left + focusWidth + (style.direction() == RTL ? minArrowSize : 0));</span >
I like the syntax where we just write:
return { a, b, c, d };
Rather than naming the type LengthBox.
<span class="quote">> Source/WebCore/rendering/RenderThemeIOS.mm:535
> + return LengthBox(0, MenuListButtonPaddingRight + style.borderTopWidth(), 0, 0);
> + return LengthBox(0);</span >
Ditto.
<span class="quote">> Source/WebCore/rendering/RenderThemeMac.mm:1374
> + return LengthBox(popupButtonPadding(controlSizeForFont(style))[topPadding] * style.effectiveZoom(),
> + popupButtonPadding(controlSizeForFont(style))[rightPadding] * style.effectiveZoom(),
> + popupButtonPadding(controlSizeForFont(style))[bottomPadding] * style.effectiveZoom(),
> + popupButtonPadding(controlSizeForFont(style))[leftPadding] * style.effectiveZoom());</span >
Ditto.
<span class="quote">> Source/WebCore/rendering/RenderThemeMac.mm:1381
> + return LengthBox(styledPopupPaddingTop * style.effectiveZoom(),
> + static_cast<int>(ceilf(arrowWidth + (arrowPaddingLeft + arrowPaddingRight + paddingBeforeSeparator) * style.effectiveZoom())),
> + styledPopupPaddingBottom * style.effectiveZoom(), styledPopupPaddingLeft * style.effectiveZoom());</span >
Ditto.
<span class="quote">> Source/WebCore/rendering/RenderThemeMac.mm:1384
> + return LengthBox(0);</span >
Ditto.</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>