mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 06:45:33 +00:00
Bug 1429307 - return zero padding for checkbox/radio instead of deflating the padding and border on android. r=mats
MozReview-Commit-ID: 1GkPK9ngrH6 --HG-- extra : rebase_source : 57a4b1040843eaf0adc605055b4638b02a4fc04a
This commit is contained in:
parent
970bcebf39
commit
3d47a863c4
@ -179,8 +179,8 @@ nsNativeThemeAndroid::DrawWidgetBackground(gfxContext* aContext,
|
||||
{
|
||||
EventStates eventState = GetContentState(aFrame, aWidgetType);
|
||||
nsRect rect(aRect);
|
||||
rect.Deflate(aFrame->GetUsedBorderAndPadding());
|
||||
ClampRectAndMoveToCenter(rect);
|
||||
|
||||
switch (aWidgetType) {
|
||||
case NS_THEME_RADIO:
|
||||
PaintRadioControl(aFrame, aContext->GetDrawTarget(), rect, eventState);
|
||||
@ -218,6 +218,15 @@ nsNativeThemeAndroid::GetWidgetPadding(nsDeviceContext* aContext,
|
||||
nsIFrame* aFrame, uint8_t aWidgetType,
|
||||
nsIntMargin* aResult)
|
||||
{
|
||||
switch (aWidgetType) {
|
||||
// Radios and checkboxes return a fixed size in GetMinimumWidgetSize
|
||||
// and have a meaningful baseline, so they can't have
|
||||
// author-specified padding.
|
||||
case NS_THEME_CHECKBOX:
|
||||
case NS_THEME_RADIO:
|
||||
aResult->SizeTo(0, 0, 0, 0);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user