<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[166514] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/166514">166514</a></dd>
<dt>Author</dt> <dd>bdakin@apple.com</dd>
<dt>Date</dt> <dd>2014-03-31 11:10:37 -0700 (Mon, 31 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Radio buttons and checkboxes should share code
https://bugs.webkit.org/show_bug.cgi?id=130915

Reviewed by Sam Weinig.

Radio buttons and checkboxes now share a lot of code. The common term for both is 
toggle buttons.

Move these radio-sizing functions up in the file to be next to the checkbox sizing 
functions.
* platform/mac/ThemeMac.mm:
(WebCore::radioSizes):
(WebCore::radioMargins):
(WebCore::radioSize):

Configures a radio button or a checkbox.
(WebCore::configureToggleButton):

Creates a radio button or a checkbox.
(WebCore::createToggleButtonCell):

Still have a shared cell for each.
(WebCore::sharedRadioCell):
(WebCore::sharedCheckboxCell):

Does the work of the old paintRadio() and paintCheckbox().
(WebCore::paintToggleButton):

Use sharedRadioCell() here.
(WebCore::ThemeMac::inflateControlPaintRect):

Call paintToggleButton() for radio buttons and checkboxes.
(WebCore::ThemeMac::paint):

All gone.
(WebCore::configureCheckbox): Deleted.
(WebCore::createCheckboxCell): Deleted.
(WebCore::paintCheckbox): Deleted.
(WebCore::radio): Deleted.
(WebCore::paintRadio): Deleted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformmacThemeMacmm">trunk/Source/WebCore/platform/mac/ThemeMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166513 => 166514)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-31 18:02:51 UTC (rev 166513)
+++ trunk/Source/WebCore/ChangeLog        2014-03-31 18:10:37 UTC (rev 166514)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2014-03-31  Beth Dakin  &lt;bdakin@apple.com&gt;
+
+        Radio buttons and checkboxes should share code
+        https://bugs.webkit.org/show_bug.cgi?id=130915
+
+        Reviewed by Sam Weinig.
+
+        Radio buttons and checkboxes now share a lot of code. The common term for both is 
+        toggle buttons.
+
+        Move these radio-sizing functions up in the file to be next to the checkbox sizing 
+        functions.
+        * platform/mac/ThemeMac.mm:
+        (WebCore::radioSizes):
+        (WebCore::radioMargins):
+        (WebCore::radioSize):
+
+        Configures a radio button or a checkbox.
+        (WebCore::configureToggleButton):
+
+        Creates a radio button or a checkbox.
+        (WebCore::createToggleButtonCell):
+
+        Still have a shared cell for each.
+        (WebCore::sharedRadioCell):
+        (WebCore::sharedCheckboxCell):
+
+        Does the work of the old paintRadio() and paintCheckbox().
+        (WebCore::paintToggleButton):
+
+        Use sharedRadioCell() here.
+        (WebCore::ThemeMac::inflateControlPaintRect):
+
+        Call paintToggleButton() for radio buttons and checkboxes.
+        (WebCore::ThemeMac::paint):
+
+        All gone.
+        (WebCore::configureCheckbox): Deleted.
+        (WebCore::createCheckboxCell): Deleted.
+        (WebCore::paintCheckbox): Deleted.
+        (WebCore::radio): Deleted.
+        (WebCore::paintRadio): Deleted.
+
</ins><span class="cx"> 2014-03-31  Samuel White  &lt;samuel_white@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: Need ability to get line range for text marker.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ThemeMac.mm (166513 => 166514)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ThemeMac.mm        2014-03-31 18:02:51 UTC (rev 166513)
+++ trunk/Source/WebCore/platform/mac/ThemeMac.mm        2014-03-31 18:10:37 UTC (rev 166514)
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// Checkboxes
</del><ins>+// Checkboxes and radio buttons
</ins><span class="cx"> 
</span><span class="cx"> static const IntSize* checkboxSizes()
</span><span class="cx"> {
</span><span class="lines">@@ -293,56 +293,107 @@
</span><span class="cx">     return sizeFromFont(font, zoomedSize, zoomFactor, checkboxSizes());
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-static void configureCheckbox(NSCell* cell, const ControlStates* states, const IntRect&amp; zoomedRect, float zoomFactor, bool isStateChange)
</del><ins>+// Radio Buttons
+
+static const IntSize* radioSizes()
</ins><span class="cx"> {
</span><ins>+    static const IntSize sizes[3] = { IntSize(14, 15), IntSize(12, 13), IntSize(10, 10) };
+    return sizes;
+}
+
+static const int* radioMargins(NSControlSize controlSize)
+{
+    static const int margins[3][4] =
+    {
+        { 2, 2, 4, 2 },
+        { 3, 2, 3, 2 },
+        { 1, 0, 2, 0 },
+    };
+    return margins[controlSize];
+}
+
+static LengthSize radioSize(const Font&amp; font, const LengthSize&amp; zoomedSize, float zoomFactor)
+{
+    // If the width and height are both specified, then we have nothing to do.
+    if (!zoomedSize.width().isIntrinsicOrAuto() &amp;&amp; !zoomedSize.height().isIntrinsicOrAuto())
+        return zoomedSize;
+
+    // Use the font size to determine the intrinsic width of the control.
+    return sizeFromFont(font, zoomedSize, zoomFactor, radioSizes());
+}
+    
+static void configureToggleButton(NSCell* cell, ControlPart buttonType, const ControlStates* states, const IntRect&amp; zoomedRect, float zoomFactor, bool isStateChange)
+{
</ins><span class="cx">     // Set the control size based off the rectangle we're painting into.
</span><del>-    setControlSize(cell, checkboxSizes(), zoomedRect.size(), zoomFactor);
</del><ins>+    setControlSize(cell, buttonType == CheckboxPart ? checkboxSizes() : radioSizes(), zoomedRect.size(), zoomFactor);
</ins><span class="cx"> 
</span><span class="cx">     // Update the various states we respond to.
</span><span class="cx">     updateStates(cell, states, isStateChange);
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-static NSButtonCell *createCheckboxCell()
</del><ins>+static NSButtonCell *createToggleButtonCell(ControlPart buttonType)
</ins><span class="cx"> {
</span><del>-    NSButtonCell *checkboxCell = [[NSButtonCell alloc] init];
-    [checkboxCell setButtonType:NSSwitchButton];
-    [checkboxCell setTitle:nil];
-    [checkboxCell setAllowsMixedState:YES];
-    [checkboxCell setFocusRingType:NSFocusRingTypeExterior];
-    return checkboxCell;
</del><ins>+    NSButtonCell *toggleButtonCell = [[NSButtonCell alloc] init];
+    
+    if (buttonType == CheckboxPart) {
+        [toggleButtonCell setButtonType:NSSwitchButton];
+        [toggleButtonCell setAllowsMixedState:YES];
+    } else {
+        ASSERT(buttonType == RadioPart);
+        [toggleButtonCell setButtonType:NSRadioButton];
+    }
+    
+    [toggleButtonCell setTitle:nil];
+    [toggleButtonCell setFocusRingType:NSFocusRingTypeExterior];
+    return toggleButtonCell;
</ins><span class="cx"> }
</span><ins>+    
+static NSButtonCell *sharedRadioCell(const ControlStates* states, const IntRect&amp; zoomedRect, float zoomFactor)
+{
+    static NSButtonCell *radioCell;
+    if (!radioCell)
+        radioCell = createToggleButtonCell(RadioPart);
</ins><span class="cx"> 
</span><ins>+    configureToggleButton(radioCell, RadioPart, states, zoomedRect, zoomFactor, false);
+    return radioCell;
+}
+    
</ins><span class="cx"> static NSButtonCell *sharedCheckboxCell(const ControlStates* states, const IntRect&amp; zoomedRect, float zoomFactor)
</span><span class="cx"> {
</span><span class="cx">     static NSButtonCell *checkboxCell;
</span><span class="cx">     if (!checkboxCell)
</span><del>-        checkboxCell = createCheckboxCell();
</del><ins>+        checkboxCell = createToggleButtonCell(CheckboxPart);
</ins><span class="cx"> 
</span><del>-    configureCheckbox(checkboxCell, states, zoomedRect, zoomFactor, false);
</del><ins>+    configureToggleButton(checkboxCell, CheckboxPart, states, zoomedRect, zoomFactor, false);
</ins><span class="cx">     return checkboxCell;
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-// FIXME: Share more code with radio buttons.
-static void paintCheckbox(ControlStates* controlStates, GraphicsContext* context, const IntRect&amp; zoomedRect, float zoomFactor, ScrollView* scrollView)
</del><ins>+static void paintToggleButton(ControlPart buttonType, ControlStates* controlStates, GraphicsContext* context, const IntRect&amp; zoomedRect, float zoomFactor, ScrollView* scrollView)
</ins><span class="cx"> {
</span><span class="cx">     BEGIN_BLOCK_OBJC_EXCEPTIONS
</span><span class="cx"> 
</span><del>-    NSButtonCell *checkboxCell = static_cast&lt;NSButtonCell*&gt;(controlStates-&gt;platformControl());
</del><ins>+    NSButtonCell *toggleButtonCell = static_cast&lt;NSButtonCell*&gt;(controlStates-&gt;platformControl());
</ins><span class="cx"> 
</span><span class="cx">     if (controlStates-&gt;isDirty()) {
</span><del>-        if (!checkboxCell)
-            checkboxCell = createCheckboxCell();
-        configureCheckbox(checkboxCell, controlStates, zoomedRect, zoomFactor, true);
</del><ins>+        if (!toggleButtonCell)
+            toggleButtonCell = createToggleButtonCell(buttonType);
+        configureToggleButton(toggleButtonCell, buttonType, controlStates, zoomedRect, zoomFactor, true);
</ins><span class="cx">     } else {
</span><del>-        if (!checkboxCell)
-            checkboxCell = sharedCheckboxCell(controlStates, zoomedRect, zoomFactor);
-        configureCheckbox(checkboxCell, controlStates, zoomedRect, zoomFactor, false);
</del><ins>+        if (!toggleButtonCell) {
+            if (buttonType == CheckboxPart)
+                toggleButtonCell = sharedCheckboxCell(controlStates, zoomedRect, zoomFactor);
+            else {
+                ASSERT(buttonType == RadioPart);
+                toggleButtonCell = sharedRadioCell(controlStates, zoomedRect, zoomFactor);
+            }
+        }
+        configureToggleButton(toggleButtonCell, buttonType, controlStates, zoomedRect, zoomFactor, false);
</ins><span class="cx">     }
</span><span class="cx">     controlStates-&gt;setDirty(false);
</span><span class="cx"> 
</span><span class="cx">     GraphicsContextStateSaver stateSaver(*context);
</span><span class="cx"> 
</span><del>-    NSControlSize controlSize = [checkboxCell controlSize];
</del><ins>+    NSControlSize controlSize = [toggleButtonCell controlSize];
</ins><span class="cx">     IntSize zoomedSize = checkboxSizes()[controlSize];
</span><span class="cx">     zoomedSize.setWidth(zoomedSize.width() * zoomFactor);
</span><span class="cx">     zoomedSize.setHeight(zoomedSize.height() * zoomFactor);
</span><span class="lines">@@ -360,112 +411,34 @@
</span><span class="cx">     NSView *view = ThemeMac::ensuredView(scrollView, controlStates);
</span><span class="cx">     bool drawStatically = true;
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 10100
</span><del>-    drawStatically = ![checkboxCell _stateAnimationRunning];
</del><ins>+    drawStatically = ![toggleButtonCell _stateAnimationRunning];
</ins><span class="cx"> #endif
</span><span class="cx">     if (drawStatically)
</span><del>-        [checkboxCell drawWithFrame:NSRect(inflatedRect) inView:view];
</del><ins>+        [toggleButtonCell drawWithFrame:NSRect(inflatedRect) inView:view];
</ins><span class="cx">     else {
</span><span class="cx">         // FIXME: This isn't quite correct at the moment due to the way the tick mark extends out of the control.
</span><span class="cx">         context-&gt;translate(inflatedRect.x(), inflatedRect.y());
</span><span class="cx">         context-&gt;scale(FloatSize(1, -1));
</span><span class="cx">         context-&gt;translate(0, -inflatedRect.height());
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 10100
</span><del>-        [checkboxCell _renderCurrentAnimationFrameInContext:context-&gt;platformContext() atLocation:NSMakePoint(0, 0)];
</del><ins>+        [toggleButtonCell _renderCurrentAnimationFrameInContext:context-&gt;platformContext() atLocation:NSMakePoint(0, 0)];
</ins><span class="cx"> #endif
</span><span class="cx">     }
</span><span class="cx">     if (controlStates-&gt;states() &amp; ControlStates::FocusState)
</span><del>-        [checkboxCell _web_drawFocusRingWithFrame:NSRect(inflatedRect) inView:view];
-    [checkboxCell setControlView:nil];
</del><ins>+        [toggleButtonCell _web_drawFocusRingWithFrame:NSRect(inflatedRect) inView:view];
+    [toggleButtonCell setControlView:nil];
</ins><span class="cx">     
</span><span class="cx">     bool needsRepaint = false;
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 10100
</span><del>-    needsRepaint = [checkboxCell _stateAnimationRunning];
</del><ins>+    needsRepaint = [toggleButtonCell _stateAnimationRunning];
</ins><span class="cx"> #endif
</span><span class="cx">     controlStates-&gt;setNeedsRepaint(needsRepaint);
</span><span class="cx">     if (needsRepaint)
</span><del>-        controlStates-&gt;setPlatformControl(checkboxCell);
</del><ins>+        controlStates-&gt;setPlatformControl(toggleButtonCell);
</ins><span class="cx"> 
</span><span class="cx">     END_BLOCK_OBJC_EXCEPTIONS
</span><span class="cx"> }
</span><del>-
-// Radio Buttons
-
-static const IntSize* radioSizes()
-{
-    static const IntSize sizes[3] = { IntSize(14, 15), IntSize(12, 13), IntSize(10, 10) };
-    return sizes;
-}
-
-static const int* radioMargins(NSControlSize controlSize)
-{
-    static const int margins[3][4] =
-    {
-        { 2, 2, 4, 2 },
-        { 3, 2, 3, 2 },
-        { 1, 0, 2, 0 },
-    };
-    return margins[controlSize];
-}
-
-static LengthSize radioSize(const Font&amp; font, const LengthSize&amp; zoomedSize, float zoomFactor)
-{
-    // If the width and height are both specified, then we have nothing to do.
-    if (!zoomedSize.width().isIntrinsicOrAuto() &amp;&amp; !zoomedSize.height().isIntrinsicOrAuto())
-        return zoomedSize;
-
-    // Use the font size to determine the intrinsic width of the control.
-    return sizeFromFont(font, zoomedSize, zoomFactor, radioSizes());
-}
-
-static NSButtonCell *radio(const ControlStates* states, const IntRect&amp; zoomedRect, float zoomFactor)
-{
-    static NSButtonCell *radioCell;
-    if (!radioCell) {
-        radioCell = [[NSButtonCell alloc] init];
-        [radioCell setButtonType:NSRadioButton];
-        [radioCell setTitle:nil];
-        [radioCell setFocusRingType:NSFocusRingTypeExterior];
-    }
</del><span class="cx">     
</span><del>-    // Set the control size based off the rectangle we're painting into.
-    setControlSize(radioCell, radioSizes(), zoomedRect.size(), zoomFactor);
-
-    // Update the various states we respond to.
-    updateStates(radioCell, states);
-    
-    return radioCell;
-}
-
-static void paintRadio(ControlStates* controlStates, GraphicsContext* context, const IntRect&amp; zoomedRect, float zoomFactor, ScrollView* scrollView)
-{
-    // Determine the width and height needed for the control and prepare the cell for painting.
-    NSButtonCell *radioCell = radio(controlStates, zoomedRect, zoomFactor);
-    GraphicsContextStateSaver stateSaver(*context);
-
-    NSControlSize controlSize = [radioCell controlSize];
-    IntSize zoomedSize = radioSizes()[controlSize];
-    zoomedSize.setWidth(zoomedSize.width() * zoomFactor);
-    zoomedSize.setHeight(zoomedSize.height() * zoomFactor);
-    IntRect inflatedRect = inflateRect(zoomedRect, zoomedSize, radioMargins(controlSize), zoomFactor);
-    
-    if (zoomFactor != 1.0f) {
-        inflatedRect.setWidth(inflatedRect.width() / zoomFactor);
-        inflatedRect.setHeight(inflatedRect.height() / zoomFactor);
-        context-&gt;translate(inflatedRect.x(), inflatedRect.y());
-        context-&gt;scale(FloatSize(zoomFactor, zoomFactor));
-        context-&gt;translate(-inflatedRect.x(), -inflatedRect.y());
-    }
-
-    LocalCurrentGraphicsContext localContext(context);
-    BEGIN_BLOCK_OBJC_EXCEPTIONS
-    NSView *view = ThemeMac::ensuredView(scrollView, controlStates);
-    [radioCell drawWithFrame:NSRect(inflatedRect) inView:view];
-    if (controlStates-&gt;states() &amp; ControlStates::FocusState)
-        [radioCell _web_drawFocusRingWithFrame:NSRect(inflatedRect) inView:view];
-    [radioCell setControlView:nil];
-    END_BLOCK_OBJC_EXCEPTIONS
-}
-
</del><span class="cx"> // Buttons
</span><span class="cx"> 
</span><span class="cx"> // Buttons really only constrain height. They respect width.
</span><span class="lines">@@ -777,7 +750,7 @@
</span><span class="cx">         case RadioPart: {
</span><span class="cx">             // We inflate the rect as needed to account for padding included in the cell to accommodate the radio button
</span><span class="cx">             // shadow&quot;.  We don't consider this part of the bounds of the control in WebKit.
</span><del>-            NSCell *cell = radio(states, zoomedRect, zoomFactor);
</del><ins>+            NSCell *cell = sharedRadioCell(states, zoomedRect, zoomFactor);
</ins><span class="cx">             NSControlSize controlSize = [cell controlSize];
</span><span class="cx">             IntSize zoomedSize = radioSizes()[controlSize];
</span><span class="cx">             zoomedSize.setHeight(zoomedSize.height() * zoomFactor);
</span><span class="lines">@@ -819,10 +792,10 @@
</span><span class="cx"> {
</span><span class="cx">     switch (part) {
</span><span class="cx">         case CheckboxPart:
</span><del>-            paintCheckbox(states, context, zoomedRect, zoomFactor, scrollView);
</del><ins>+            paintToggleButton(part, states, context, zoomedRect, zoomFactor, scrollView);
</ins><span class="cx">             break;
</span><span class="cx">         case RadioPart:
</span><del>-            paintRadio(states, context, zoomedRect, zoomFactor, scrollView);
</del><ins>+            paintToggleButton(part, states, context, zoomedRect, zoomFactor, scrollView);
</ins><span class="cx">             break;
</span><span class="cx">         case PushButtonPart:
</span><span class="cx">         case DefaultButtonPart:
</span></span></pre>
</div>
</div>

</body>
</html>