Skip to content

Commit 35462e5

Browse files
committed
Radio buttons are using the wrong sizes and margins
https://bugs.webkit.org/show_bug.cgi?id=131503 Reviewed by Jer Noble. This is a regression that I caused recently when I combined radio button and checkbox code. * platform/mac/ThemeMac.mm: (WebCore::paintToggleButton): Canonical link: https://commits.webkit.org/149576@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 93bef40 commit 35462e5

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

Source/WebCore/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2014-04-10 Beth Dakin <bdakin@apple.com>
2+
3+
Radio buttons are using the wrong sizes and margins
4+
https://bugs.webkit.org/show_bug.cgi?id=131503
5+
6+
Reviewed by Jer Noble.
7+
8+
This is a regression that I caused recently when I combined radio button and
9+
checkbox code.
10+
* platform/mac/ThemeMac.mm:
11+
(WebCore::paintToggleButton):
12+
113
2014-04-08 Jon Honeycutt <jhoneycutt@apple.com>
214

315
Assertion failure in WebCore::FlexBoxIterator::next()

Source/WebCore/platform/mac/ThemeMac.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,11 @@ static void paintToggleButton(ControlPart buttonType, ControlStates* controlStat
394394
GraphicsContextStateSaver stateSaver(*context);
395395

396396
NSControlSize controlSize = [toggleButtonCell controlSize];
397-
IntSize zoomedSize = checkboxSizes()[controlSize];
397+
IntSize zoomedSize = buttonType == CheckboxPart ? checkboxSizes()[controlSize] : radioSizes()[controlSize];
398398
zoomedSize.setWidth(zoomedSize.width() * zoomFactor);
399399
zoomedSize.setHeight(zoomedSize.height() * zoomFactor);
400-
IntRect inflatedRect = inflateRect(zoomedRect, zoomedSize, checkboxMargins(controlSize), zoomFactor);
400+
const int* controlMargins = buttonType == CheckboxPart ? checkboxMargins(controlSize) : radioMargins(controlSize);
401+
IntRect inflatedRect = inflateRect(zoomedRect, zoomedSize, controlMargins, zoomFactor);
401402

402403
if (zoomFactor != 1.0f) {
403404
inflatedRect.setWidth(inflatedRect.width() / zoomFactor);

0 commit comments

Comments
 (0)