Changeset 104332 in webkit


Ignore:
Timestamp:
Jan 6, 2012 1:55:12 PM (12 years ago)
Author:
jonlee@apple.com
Message:

Clicking on the cancel button on readonly and disabled search fields darkens as if the search field was editable
https://bugs.webkit.org/show_bug.cgi?id=69886
<rdar://problem/10070187>

Reviewed by Adele Peterson.

.:

  • ManualTests/search-cancel-button.html: Added.

Source/WebCore:

Tests: ManualTests/search-cancel-button.html

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintSearchFieldCancelButton): If the input is readonly and/or disabled, force the cell to
render without highlight.

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r104291 r104332  
     12012-01-04  Jon Lee  <jonlee@apple.com>
     2
     3        Clicking on the cancel button on readonly and disabled search fields darkens as if the search field was editable
     4        https://bugs.webkit.org/show_bug.cgi?id=69886
     5        <rdar://problem/10070187>
     6
     7        Reviewed by Adele Peterson.
     8
     9        * ManualTests/search-cancel-button.html: Added.
     10
    1112012-01-06  Simon Hausmann  <simon.hausmann@nokia.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r104331 r104332  
     12012-01-04  Jon Lee  <jonlee@apple.com>
     2
     3        Clicking on the cancel button on readonly and disabled search fields darkens as if the search field was editable
     4        https://bugs.webkit.org/show_bug.cgi?id=69886
     5        <rdar://problem/10070187>
     6
     7        Reviewed by Adele Peterson.
     8
     9        Tests: ManualTests/search-cancel-button.html
     10
     11        * rendering/RenderThemeMac.mm:
     12        (WebCore::RenderThemeMac::paintSearchFieldCancelButton): If the input is readonly and/or disabled, force the cell to
     13        render without highlight.
     14
    1152012-01-06  Simon Fraser  <simon.fraser@apple.com>
    216
  • trunk/Source/WebCore/rendering/RenderThemeMac.mm

    r104240 r104332  
    15121512bool RenderThemeMac::paintSearchFieldCancelButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    15131513{
    1514     Node* input = o->node()->shadowAncestorNode();
     1514    Element* input = toElement(o->node()->shadowAncestorNode());
     1515    ASSERT(input);
     1516
    15151517    if (!input->renderer()->isBox())
    15161518        return false;
     
    15211523    NSSearchFieldCell* search = this->search();
    15221524
    1523     updateActiveState([search cancelButtonCell], o);
    1524     updatePressedState([search cancelButtonCell], o);
     1525    if (input->isEnabledFormControl() && !input->isReadOnlyFormControl()) {
     1526        updateActiveState([search cancelButtonCell], o);
     1527        updatePressedState([search cancelButtonCell], o);
     1528    }
     1529    else if ([[search cancelButtonCell] isHighlighted])
     1530        [[search cancelButtonCell] setHighlighted:NO];
    15251531
    15261532    GraphicsContextStateSaver stateSaver(*paintInfo.context);
Note: See TracChangeset for help on using the changeset viewer.