Changeset 90225 in webkit


Ignore:
Timestamp:
Jul 1, 2011, 6:58:18 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2011-07-01 Kentaro Hara <haraken@google.com>

Reviewed by Kent Tamura.

Disallow clicking an [X] button in 'search' input forms when 'disabled' attribute or 'readonly' attribute is set.
https://bugs.webkit.org/show_bug.cgi?id=63709

Added a test that checks whether the content in 'search' input forms with 'disabled' attribute
or 'readonly' attribute is cleared or not, when an [X] button is clicked.

  • fast/forms/search-disabled-readonly-expected.txt: Added.
  • fast/forms/search-disabled-readonly.html: Added.

2011-07-01 Kentaro Hara <haraken@google.com>

Reviewed by Kent Tamura.

Disallow clicking an [X] button in 'search' input forms when 'disabled' attribute or 'readonly' attribute is set.
https://bugs.webkit.org/show_bug.cgi?id=63709

Ignore a cancel button event on a 'search' input form if 'disabled' attribute or
'readonly' attribute is set to the input form.

Test: fast/forms/search-disabled-readonly.html

  • html/shadow/TextControlInnerElements.cpp: (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r90220 r90225  
     12011-07-01  Kentaro Hara  <haraken@google.com>
     2
     3        Reviewed by Kent Tamura.
     4
     5        Disallow clicking an [X] button in 'search' input forms when 'disabled' attribute or 'readonly' attribute is set.
     6        https://bugs.webkit.org/show_bug.cgi?id=63709
     7
     8        Added a test that checks whether the content in 'search' input forms with 'disabled' attribute
     9        or 'readonly' attribute is cleared or not, when an [X] button is clicked.
     10
     11        * fast/forms/search-disabled-readonly-expected.txt: Added.
     12        * fast/forms/search-disabled-readonly.html: Added.
     13
    1142011-07-01  Kent Tamura  <tkent@chromium.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r90222 r90225  
     12011-07-01  Kentaro Hara  <haraken@google.com>
     2
     3        Reviewed by Kent Tamura.
     4
     5        Disallow clicking an [X] button in 'search' input forms when 'disabled' attribute or 'readonly' attribute is set.
     6        https://bugs.webkit.org/show_bug.cgi?id=63709
     7
     8        Ignore a cancel button event on a 'search' input form if 'disabled' attribute or
     9        'readonly' attribute is set to the input form.
     10
     11        Test: fast/forms/search-disabled-readonly.html
     12
     13        * html/shadow/TextControlInnerElements.cpp:
     14        (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
     15
    1162011-06-30  Mikhail Naganov  <mnaganov@chromium.org>
    217
  • trunk/Source/WebCore/html/shadow/TextControlInnerElements.cpp

    r90094 r90225  
    193193    // If the element is visible, on mouseup, clear the value, and set selection
    194194    RefPtr<HTMLInputElement> input(static_cast<HTMLInputElement*>(shadowAncestorNode()));
     195    if (input->disabled() || input->isReadOnlyFormControl()) {
     196        if (!event->defaultHandled())
     197            HTMLDivElement::defaultEventHandler(event);
     198        return;
     199    }
     200
    195201    if (event->type() == eventNames().mousedownEvent && event->isMouseEvent() && static_cast<MouseEvent*>(event)->button() == LeftButton) {
    196202        if (renderer() && renderer()->visibleToHitTesting()) {
Note: See TracChangeset for help on using the changeset viewer.