Changeset 58561 in webkit


Ignore:
Timestamp:
Apr 30, 2010 12:45:09 AM (14 years ago)
Author:
tkent@chromium.org
Message:

2010-04-30 Kent Tamura <tkent@chromium.org>

Reviewed by Adele Peterson.

Mac implementation of outer-spin-button appearance, and anonymous
element generation for <input type=number>.
https://bugs.webkit.org/show_bug.cgi?id=32813

input-appearance-spinbutton.html checks the appearances of various
sizes of spin-buttons. input-appearance-spinbutton-size.html
checks a spin-button height is equal to or less than the
corresponding text field height.

  • platform/mac/fast/forms/input-appearance-spinbutton-expected.checksum: Added.
  • platform/mac/fast/forms/input-appearance-spinbutton-expected.png: Added.
  • platform/mac/fast/forms/input-appearance-spinbutton-expected.txt: Added.
  • platform/mac/fast/forms/input-appearance-spinbutton-size-expected.txt: Added.
  • platform/mac/fast/forms/input-appearance-spinbutton-size.html: Added.
  • platform/mac/fast/forms/input-appearance-spinbutton.html: Added.

2010-04-30 Kent Tamura <tkent@chromium.org>

Reviewed by Adele Peterson.

Mac implementation of outer-spin-button appearance, and anonymous
element generation for <input type=number>.
https://bugs.webkit.org/show_bug.cgi?id=32813

The implementation uses NSStepperCell. Like the other Mac
controls, it has only three candidates for sizes.

The editable block of an input element is shrunk, and the
anonymous block for a spin button is put on the right of the
editable block.

Tests: platform/mac/fast/forms/input-appearance-spinbutton-size.html

platform/mac/fast/forms/input-appearance-spinbutton.html

  • dom/Element.cpp: (WebCore::Element::pseudoStyleCacheIsInvalid):
  • dom/InputElement.h: (WebCore::InputElement::hasSpinButton):
  • html/HTMLInputElement.h: (WebCore::HTMLInputElement::hasSpinButton): Return true for NUMBER type.
  • platform/mac/ThemeMac.mm: (WebCore::sizeFromNSControlSize): Split the main part of sizeFromFont() to this in order to use stepperControlSizeForFont() instead of controlSizeForFont(). (WebCore::sizeFromFont): Just calls sizeFromNSControlSize() with sizeFromFont(). No behavior changes. (WebCore::stepperSizes): Returns sizes for mini, small, and regular. (WebCore::stepperControlSizeForFont): Dedicated version of controlSizeForFont(). (WebCore::stepper): Returns NSStepperCell object with specified settings. (WebCore::paintStepper): (WebCore::ThemeMac::controlSize): Support for OuterSpinButton. (WebCore::ThemeMac::minimumControlSize): ditto. (WebCore::ThemeMac::inflateControlPaintRect): ditto. (WebCore::ThemeMac::paint): ditto.
  • rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): Move the content to paintBoxDecorationsWithSize(). (WebCore::RenderBox::paintBoxDecorationsWithSize):
  • rendering/RenderBox.h: Declare paintBoxDecorationsWithSize().
  • rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::paintBoxDecorations): Call paintBoxDecorationsWithSize() with smaller width by decorationWidthRight(). (WebCore::RenderTextControlSingleLine::addFocusRingRects): Add a rectangle of which width is smaller by decorationWidthRight(). (WebCore::RenderTextControlSingleLine::layout): Adjust m_outerSpinButton position. (WebCore::RenderTextControlSingleLine::styleDidChange): (WebCore::RenderTextControlSingleLine::textBlockWidth): (WebCore::RenderTextControlSingleLine::decorationWidthRight): (WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight): (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded): Creates an element for m_outerSpinButton if it is needed. (WebCore::RenderTextControlSingleLine::createInnerTextStyle): (WebCore::RenderTextControlSingleLine::createOuterSpinButtonStyle):
  • rendering/RenderTextControlSingleLine.h: Declare new methods and m_outerSpinButton.
  • rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustRepaintRect): Support for OuterSpinButton.
Location:
trunk
Files:
6 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r58559 r58561  
     12010-04-30  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Adele Peterson.
     4
     5        Mac implementation of outer-spin-button appearance, and anonymous
     6        element generation for <input type=number>.
     7        https://bugs.webkit.org/show_bug.cgi?id=32813
     8
     9        input-appearance-spinbutton.html checks the appearances of various
     10        sizes of spin-buttons. input-appearance-spinbutton-size.html
     11        checks a spin-button height is equal to or less than the
     12        corresponding text field height.
     13
     14        * platform/mac/fast/forms/input-appearance-spinbutton-expected.checksum: Added.
     15        * platform/mac/fast/forms/input-appearance-spinbutton-expected.png: Added.
     16        * platform/mac/fast/forms/input-appearance-spinbutton-expected.txt: Added.
     17        * platform/mac/fast/forms/input-appearance-spinbutton-size-expected.txt: Added.
     18        * platform/mac/fast/forms/input-appearance-spinbutton-size.html: Added.
     19        * platform/mac/fast/forms/input-appearance-spinbutton.html: Added.
     20
    1212010-04-29  Kent Tamura  <tkent@chromium.org>
    222
  • trunk/WebCore/ChangeLog

    r58560 r58561  
     12010-04-30  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Adele Peterson.
     4
     5        Mac implementation of outer-spin-button appearance, and anonymous
     6        element generation for <input type=number>.
     7        https://bugs.webkit.org/show_bug.cgi?id=32813
     8
     9        The implementation uses NSStepperCell. Like the other Mac
     10        controls, it has only three candidates for sizes.
     11
     12        The editable block of an input element is shrunk, and the
     13        anonymous block for a spin button is put on the right of the
     14        editable block.
     15
     16        Tests: platform/mac/fast/forms/input-appearance-spinbutton-size.html
     17               platform/mac/fast/forms/input-appearance-spinbutton.html
     18
     19        * dom/Element.cpp:
     20        (WebCore::Element::pseudoStyleCacheIsInvalid):
     21        * dom/InputElement.h:
     22        (WebCore::InputElement::hasSpinButton):
     23        * html/HTMLInputElement.h:
     24        (WebCore::HTMLInputElement::hasSpinButton): Return true for NUMBER type.
     25        * platform/mac/ThemeMac.mm:
     26        (WebCore::sizeFromNSControlSize): Split the main part of sizeFromFont()
     27          to this in order to use stepperControlSizeForFont() instead of
     28          controlSizeForFont().
     29        (WebCore::sizeFromFont): Just calls sizeFromNSControlSize() with
     30          sizeFromFont(). No behavior changes.
     31        (WebCore::stepperSizes): Returns sizes for mini, small, and regular.
     32        (WebCore::stepperControlSizeForFont):
     33          Dedicated version of controlSizeForFont().
     34        (WebCore::stepper): Returns NSStepperCell object with specified settings.
     35        (WebCore::paintStepper):
     36        (WebCore::ThemeMac::controlSize): Support for OuterSpinButton.
     37        (WebCore::ThemeMac::minimumControlSize): ditto.
     38        (WebCore::ThemeMac::inflateControlPaintRect): ditto.
     39        (WebCore::ThemeMac::paint): ditto.
     40        * rendering/RenderBox.cpp:
     41        (WebCore::RenderBox::paintBoxDecorations):
     42          Move the content to paintBoxDecorationsWithSize().
     43        (WebCore::RenderBox::paintBoxDecorationsWithSize):
     44        * rendering/RenderBox.h: Declare paintBoxDecorationsWithSize().
     45        * rendering/RenderTextControlSingleLine.cpp:
     46        (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
     47        (WebCore::RenderTextControlSingleLine::paintBoxDecorations):
     48          Call paintBoxDecorationsWithSize() with smaller width by decorationWidthRight().
     49        (WebCore::RenderTextControlSingleLine::addFocusRingRects):
     50          Add a rectangle of which width is smaller by decorationWidthRight().
     51        (WebCore::RenderTextControlSingleLine::layout):
     52          Adjust m_outerSpinButton position.
     53        (WebCore::RenderTextControlSingleLine::styleDidChange):
     54        (WebCore::RenderTextControlSingleLine::textBlockWidth):
     55        (WebCore::RenderTextControlSingleLine::decorationWidthRight):
     56        (WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight):
     57        (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
     58          Creates an element for m_outerSpinButton if it is needed.
     59        (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
     60        (WebCore::RenderTextControlSingleLine::createOuterSpinButtonStyle):
     61        * rendering/RenderTextControlSingleLine.h: Declare new methods and m_outerSpinButton.
     62        * rendering/RenderThemeMac.mm:
     63        (WebCore::RenderThemeMac::adjustRepaintRect): Support for OuterSpinButton.
     64
    1652010-04-29  Adam Barth  <abarth@webkit.org>
    266
  • trunk/WebCore/dom/InputElement.h

    r52204 r58561  
    4444    virtual bool isSearchField() const = 0;
    4545    virtual bool isTextField() const = 0;
     46    virtual bool hasSpinButton() const { return false; }
    4647
    4748    virtual bool searchEventsShouldBeDispatched() const = 0;
  • trunk/WebCore/html/HTMLInputElement.h

    r56385 r58561  
    129129    virtual bool isInputTypeHidden() const { return m_type == HIDDEN; }
    130130    virtual bool isPasswordField() const { return m_type == PASSWORD; }
     131    virtual bool hasSpinButton() const { return m_type == NUMBER; }
    131132
    132133    bool checked() const { return m_checked; }
  • trunk/WebCore/platform/mac/ThemeMac.mm

    r58533 r58561  
    8383}
    8484
    85 static LengthSize sizeFromFont(const Font& font, const LengthSize& zoomedSize, float zoomFactor, const IntSize* sizes)
    86 {
    87     IntSize controlSize = sizes[controlSizeForFont(font)];
     85static LengthSize sizeFromNSControlSize(NSControlSize nsControlSize, const LengthSize& zoomedSize, float zoomFactor, const IntSize* sizes)
     86{
     87    IntSize controlSize = sizes[nsControlSize];
    8888    if (zoomFactor != 1.0f)
    8989        controlSize = IntSize(controlSize.width() * zoomFactor, controlSize.height() * zoomFactor);
     
    9494        result.setHeight(Length(controlSize.height(), Fixed));
    9595    return result;
     96}
     97
     98static LengthSize sizeFromFont(const Font& font, const LengthSize& zoomedSize, float zoomFactor, const IntSize* sizes)
     99{
     100    return sizeFromNSControlSize(controlSizeForFont(font), zoomedSize, zoomFactor, sizes);
    96101}
    97102
     
    445450}
    446451
     452// Stepper
     453
     454static const IntSize* stepperSizes()
     455{
     456    static const IntSize sizes[3] = { IntSize(19, 27), IntSize(15, 22), IntSize(13, 15) };
     457    return sizes;
     458}
     459
     460// We don't use controlSizeForFont() for steppers because the stepper height
     461// should be equal to or less than the corresponding text field height,
     462static NSControlSize stepperControlSizeForFont(const Font& font)
     463{
     464    int fontSize = font.pixelSize();
     465    if (fontSize >= 18)
     466        return NSRegularControlSize;
     467    if (fontSize >= 13)
     468        return NSSmallControlSize;
     469    return NSMiniControlSize;
     470}
     471
     472static NSStepperCell* stepper(ControlStates states, const IntRect& zoomedRect, float zoomFactor)
     473{
     474    static NSStepperCell* cell = [[NSStepperCell alloc] init];
     475    setControlSize(cell, stepperSizes(), zoomedRect.size(), zoomFactor);
     476
     477    updateStates(cell, states);
     478    if (states & PressedState && states & SpinUpState) {
     479        // FIXME: There is no way to draw a NSSteperCell with the up button hilighted.
     480        // Disables the hilight of the down button if the up button is pressed.
     481        [cell setHighlighted:NO];
     482    }
     483    return cell;
     484}
     485
     486static void paintStepper(ControlStates states, GraphicsContext* context, const IntRect& zoomedRect, float zoomFactor, ScrollView* scrollView)
     487{
     488    NSStepperCell* cell = stepper(states, zoomedRect, zoomFactor);
     489
     490    context->save();
     491    NSControlSize controlSize = [cell controlSize];
     492    IntSize zoomedSize = stepperSizes()[controlSize];
     493    IntRect rect(zoomedRect);
     494
     495    if (zoomFactor != 1.0f) {
     496        rect.setWidth(rect.width() / zoomFactor);
     497        rect.setHeight(rect.height() / zoomFactor);
     498        context->translate(rect.x(), rect.y());
     499        context->scale(FloatSize(zoomFactor, zoomFactor));
     500        context->translate(-rect.x(), -rect.y());
     501    }
     502
     503    BEGIN_BLOCK_OBJC_EXCEPTIONS
     504    [cell drawWithFrame:NSRect(rect) inView:ThemeMac::ensuredView(scrollView)];
     505    [cell setControlView:nil];
     506    END_BLOCK_OBJC_EXCEPTIONS
     507
     508    context->restore();
     509}
     510
    447511// This will ensure that we always return a valid NSView, even if ScrollView doesn't have an associated document NSView.
    448512// If the ScrollView doesn't have an NSView, we will return a fake NSView whose sole purpose is to tell AppKit that it's flipped.
     
    500564            return sizeFromFont(font, LengthSize(zoomedSize.width(), Length()), zoomFactor, listButtonSizes());
    501565#endif
     566        case InnerSpinButtonPart:
     567            // We don't use inner spin buttons on Mac.
     568            return LengthSize(Length(Fixed), Length(Fixed));
     569        case OuterSpinButtonPart:
     570            if (!zoomedSize.width().isIntrinsicOrAuto() && !zoomedSize.height().isIntrinsicOrAuto())
     571                return zoomedSize;
     572            return sizeFromNSControlSize(stepperControlSizeForFont(font), zoomedSize, zoomFactor, stepperSizes());
    502573        default:
    503574            return zoomedSize;
     
    513584        case ListButtonPart:
    514585            return LengthSize(Length(0, Fixed), Length(static_cast<int>(15 * zoomFactor), Fixed));
     586        case InnerSpinButtonPart:
     587            // We don't use inner spin buttons on Mac.
     588            return LengthSize(Length(Fixed), Length(Fixed));
     589        case OuterSpinButtonPart: {
     590            IntSize base = stepperSizes()[NSMiniControlSize];
     591            return LengthSize(Length(static_cast<int>(base.width() * zoomFactor), Fixed),
     592                              Length(static_cast<int>(base.height() * zoomFactor), Fixed));
     593        }
    515594        default:
    516595            return Theme::minimumControlSize(part, font, zoomFactor);
     
    589668            break;
    590669        }
     670        case OuterSpinButtonPart: {
     671            static const int stepperMargin[4] = { 0, 0, 0, 0};
     672            NSCell *cell = stepper(states, zoomedRect, zoomFactor);
     673            NSControlSize controlSize = [cell controlSize];
     674            IntSize zoomedSize = stepperSizes()[controlSize];
     675            zoomedSize.setHeight(zoomedSize.height() * zoomFactor);
     676            zoomedSize.setWidth(zoomedSize.width() * zoomFactor);
     677            zoomedRect = inflateRect(zoomedRect, zoomedSize, stepperMargin, zoomFactor);
     678            break;
     679        }
    591680        default:
    592681            break;
     
    611700            paintButton(part, states, context, zoomedRect, zoomFactor, scrollView);
    612701            break;
     702        case OuterSpinButtonPart:
     703            paintStepper(states, context, zoomedRect, zoomFactor, scrollView);
     704            break;
    613705        default:
    614706            break;
  • trunk/WebCore/rendering/RenderBox.cpp

    r58177 r58561  
    630630    }
    631631
    632     int w = width();
    633     int h = height();
    634 
     632    return paintBoxDecorationsWithSize(paintInfo, tx, ty, width(), height());
     633}
     634
     635void RenderBox::paintBoxDecorationsWithSize(PaintInfo& paintInfo, int tx, int ty, int width, int height)
     636{
    635637    // border-fit can adjust where we paint our border and background.  If set, we snugly fit our line box descendants.  (The iChat
    636638    // balloon layout is an example of this).
    637     borderFitAdjust(tx, w);
     639    borderFitAdjust(tx, width);
    638640
    639641    // FIXME: Should eventually give the theme control over whether the box shadow should paint, since controls could have
    640642    // custom shadows of their own.
    641     paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Normal);
     643    paintBoxShadow(paintInfo.context, tx, ty, width, height, style(), Normal);
    642644
    643645    // If we have a native theme appearance, paint that before painting our background.
    644646    // The theme will tell us whether or not we should also paint the CSS background.
    645     bool themePainted = style()->hasAppearance() && !theme()->paint(this, paintInfo, IntRect(tx, ty, w, h));
     647    bool themePainted = style()->hasAppearance() && !theme()->paint(this, paintInfo, IntRect(tx, ty, width, height));
    646648    if (!themePainted) {
    647649        // The <body> only paints its background if the root element has defined a background
     
    649651        // since the root could be inline and wrapped in an anonymous block.
    650652        if (!isBody() || document()->documentElement()->renderer()->style()->hasBackground())
    651             paintFillLayers(paintInfo, style()->backgroundColor(), style()->backgroundLayers(), tx, ty, w, h);
     653            paintFillLayers(paintInfo, style()->backgroundColor(), style()->backgroundLayers(), tx, ty, width, height);
    652654        if (style()->hasAppearance())
    653             theme()->paintDecorations(this, paintInfo, IntRect(tx, ty, w, h));
    654     }
    655     paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Inset);
     655            theme()->paintDecorations(this, paintInfo, IntRect(tx, ty, width, height));
     656    }
     657    paintBoxShadow(paintInfo.context, tx, ty, width, height, style(), Inset);
    656658
    657659    // The theme will tell us whether or not we should also paint the CSS border.
    658     if ((!style()->hasAppearance() || (!themePainted && theme()->paintBorderOnly(this, paintInfo, IntRect(tx, ty, w, h)))) && style()->hasBorder())
    659         paintBorder(paintInfo.context, tx, ty, w, h, style());
     660    if ((!style()->hasAppearance() || (!themePainted && theme()->paintBorderOnly(this, paintInfo, IntRect(tx, ty, width, height)))) && style()->hasBorder())
     661        paintBorder(paintInfo.context, tx, ty, width, height, style());
    660662}
    661663
  • trunk/WebCore/rendering/RenderBox.h

    r56941 r58561  
    309309    void paintFillLayers(const PaintInfo&, const Color&, const FillLayer*, int tx, int ty, int width, int height, CompositeOperator = CompositeSourceOver, RenderObject* backgroundObject = 0);
    310310
     311    void paintBoxDecorationsWithSize(PaintInfo&, int tx, int ty, int width, int height);
    311312    void paintMaskImages(const PaintInfo&, int tx, int ty, int width, int height);
    312313
  • trunk/WebCore/rendering/RenderTextControlSingleLine.cpp

    r58400 r58561  
    6767    if (m_innerBlock)
    6868        m_innerBlock->detach();
     69
     70    if (m_outerSpinButton)
     71        m_outerSpinButton->detach();
    6972}
    7073
     
    192195}
    193196
     197void RenderTextControlSingleLine::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
     198{
     199    paintBoxDecorationsWithSize(paintInfo, tx, ty, width() - decorationWidthRight(), height());
     200}
     201
     202void RenderTextControlSingleLine::addFocusRingRects(Vector<IntRect>& rects, int tx, int ty)
     203{
     204    int w = width() - decorationWidthRight();
     205    if (w && height())
     206        rects.append(IntRect(tx, ty, w, height()));
     207}
     208
    194209void RenderTextControlSingleLine::layout()
    195210{
     
    237252    if (currentHeight < height())
    238253        childBlock->setLocation(childBlock->x(), (height() - currentHeight) / 2);
     254
     255    // Center the spin button vertically, and move it to the right by
     256    // padding + border of the text fields.
     257    if (RenderBox* spinBox = m_outerSpinButton ? m_outerSpinButton->renderBox() : 0) {
     258        int diff = height() - spinBox->height();
     259        // If the diff is odd, the top area over the spin button takes the
     260        // remaining one pixel. It's good for Mac NSStepper because it has
     261        // shadow at the bottom.
     262        int y = (diff / 2) + (diff % 2);
     263        spinBox->setLocation(spinBox->x() + paddingRight() + borderRight(), y);
     264    }
    239265}
    240266
     
    332358        cancelRenderer->setStyle(createCancelButtonStyle(style()));
    333359
     360    if (RenderObject* spinRenderer = m_outerSpinButton ? m_outerSpinButton->renderer() : 0)
     361        spinRenderer->setStyle(createOuterSpinButtonStyle());
     362
    334363    setHasOverflowClip(false);
    335364}
     
    373402    }
    374403
     404    return width - decorationWidthRight();
     405}
     406
     407int RenderTextControlSingleLine::decorationWidthRight() const
     408{
     409    int width = 0;
     410    if (RenderBox* spinRenderer = m_outerSpinButton ? m_outerSpinButton->renderBox() : 0) {
     411        spinRenderer->calcWidth();
     412        width += spinRenderer->width() + spinRenderer->marginLeft() + spinRenderer->marginRight();
     413    }
     414    if (width > 0)
     415        width += paddingRight() + borderRight();
    375416    return width;
    376417}
     
    422463}
    423464
     465int RenderTextControlSingleLine::preferredDecorationWidthRight() const
     466{
     467    int width = 0;
     468    if (RenderBox* spinRenderer = m_outerSpinButton ? m_outerSpinButton->renderBox() : 0) {
     469        spinRenderer->calcWidth();
     470        width += spinRenderer->minPrefWidth() + spinRenderer->marginLeft() + spinRenderer->marginRight();
     471    }
     472    if (width > 0)
     473        width += paddingRight() + borderRight();
     474    return width;
     475}
     476
    424477void RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight(int lineHeight)
    425478{
     
    449502    if (!inputElement()->isSearchField()) {
    450503        RenderTextControl::createSubtreeIfNeeded(m_innerBlock.get());
     504        if (inputElement()->hasSpinButton() && !m_outerSpinButton) {
     505            // FIXME: Introduce a dedicated element for spin buttons.
     506            m_outerSpinButton = new TextControlInnerElement(document(), node());
     507            m_outerSpinButton->attachInnerElement(node(), createOuterSpinButtonStyle(), renderArena());
     508        }
    451509        return;
    452510    }
     
    525583        textBlockStyle->setLineHeight(Length(-100.0f, Percent));
    526584
    527     textBlockStyle->setDisplay(m_innerBlock ? INLINE_BLOCK : BLOCK);
     585    textBlockStyle->setDisplay(m_innerBlock || inputElement()->hasSpinButton() ? INLINE_BLOCK : BLOCK);
    528586
    529587    // We're adding one extra pixel of padding to match WinIE.
     
    595653    cancelBlockStyle->setVisibility(visibilityForCancelButton());
    596654    return cancelBlockStyle.release();
     655}
     656
     657PassRefPtr<RenderStyle> RenderTextControlSingleLine::createOuterSpinButtonStyle() const
     658{
     659    ASSERT(node()->isHTMLElement());
     660    RefPtr<RenderStyle> buttonStyle = getCachedPseudoStyle(OUTER_SPIN_BUTTON);
     661    if (!buttonStyle)
     662        buttonStyle = RenderStyle::create();
     663    buttonStyle->inheritFrom(style());
     664    return buttonStyle.release();
    597665}
    598666
  • trunk/WebCore/rendering/RenderTextControlSingleLine.h

    r58400 r58561  
    5454    void capsLockStateMayHaveChanged();
    5555
     56    // Decoration width outside of the text field.
     57    int decorationWidthRight() const;
     58
    5659private:
     60    int preferredDecorationWidthRight() const;
    5761    virtual bool hasControlClip() const { return m_cancelButton; }
    5862    virtual bool isTextField() const { return true; }
     
    6064    virtual void subtreeHasChanged();
    6165    virtual void paint(PaintInfo&, int tx, int ty);
     66    virtual void paintBoxDecorations(PaintInfo&, int tx, int ty);
     67    virtual void addFocusRingRects(Vector<IntRect>&, int tx, int ty);
    6268    virtual void layout();
    6369
     
    9096    PassRefPtr<RenderStyle> createResultsButtonStyle(const RenderStyle* startStyle) const;
    9197    PassRefPtr<RenderStyle> createCancelButtonStyle(const RenderStyle* startStyle) const;
     98    PassRefPtr<RenderStyle> createOuterSpinButtonStyle() const;
    9299
    93100    void updateCancelButtonVisibility() const;
     
    131138    RefPtr<SearchFieldResultsButtonElement> m_resultsButton;
    132139    RefPtr<SearchFieldCancelButtonElement> m_cancelButton;
     140    RefPtr<TextControlInnerElement> m_outerSpinButton;
    133141
    134142    Timer<RenderTextControlSingleLine> m_searchEventTimer;
  • trunk/WebCore/rendering/RenderThemeMac.mm

    r57844 r58561  
    488488        case DefaultButtonPart:
    489489        case ButtonPart:
     490        case OuterSpinButtonPart:
    490491            return RenderTheme::adjustRepaintRect(o, r);
    491492        default:
Note: See TracChangeset for help on using the changeset viewer.