⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 94045 in webkit


Ignore:
Timestamp:
Aug 29, 2011, 10:22:37 PM (15 years ago)
Author:
tkent@chromium.org
Message:

REGRESSION(r88115): Disabling a file upload control causes an endless busyloop.
https://bugs.webkit.org/show_bug.cgi?id=66659

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/forms/file/disabling-file-busy-loop.html

  • rendering/RenderFileUploadControl.cpp:

(WebCore::RenderFileUploadControl::updateFromElement):
Don't call setDisabled() if the disabled status is not changed.
setDisabled() causes styleRecalc(), and
HTMLFormControlElement::styleRecalc() causes
updateFromElement(). updateFromElement() should not call
setDisabled() again.

LayoutTests:

  • fast/forms/file/disabling-file-busy-loop-expected.txt: Added.
  • fast/forms/file/disabling-file-busy-loop.html: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r94043 r94045  
     12011-08-25  Kent Tamura  <tkent@chromium.org>
     2
     3        REGRESSION(r88115): Disabling a file upload control causes an endless busyloop.
     4        https://bugs.webkit.org/show_bug.cgi?id=66659
     5
     6        Reviewed by Darin Adler.
     7
     8        * fast/forms/file/disabling-file-busy-loop-expected.txt: Added.
     9        * fast/forms/file/disabling-file-busy-loop.html: Added.
     10
    1112011-08-29  David Levin  <levin@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r94044 r94045  
     12011-08-25  Kent Tamura  <tkent@chromium.org>
     2
     3        REGRESSION(r88115): Disabling a file upload control causes an endless busyloop.
     4        https://bugs.webkit.org/show_bug.cgi?id=66659
     5
     6        Reviewed by Darin Adler.
     7
     8        Test: fast/forms/file/disabling-file-busy-loop.html
     9
     10        * rendering/RenderFileUploadControl.cpp:
     11        (WebCore::RenderFileUploadControl::updateFromElement):
     12        Don't call setDisabled() if the disabled status is not changed.
     13        setDisabled() causes styleRecalc(), and
     14        HTMLFormControlElement::styleRecalc() causes
     15        updateFromElement(). updateFromElement() should not call
     16        setDisabled() again.
     17
    1182011-08-29  Daniel Bates  <dbates@webkit.org>
    219
  • trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp

    r91759 r94045  
    6464    ASSERT(input->isFileUpload());
    6565
    66     if (HTMLInputElement* button = uploadButton())
    67         button->setDisabled(!theme()->isEnabled(this));
     66    if (HTMLInputElement* button = uploadButton()) {
     67        bool newDisabled = !theme()->isEnabled(this);
     68        // We should avoid to call HTMLFormControlElement::setDisabled() as
     69        // possible because setAttribute() in setDisabled() can cause style
     70        // recalculation, and HTMLFormControlElement::recalcStyle() calls
     71        // updateFromElement() eventually.
     72        if (button->disabled() != newDisabled)
     73            button->setDisabled(newDisabled);
     74    }
    6875
    6976    // This only supports clearing out the files, but that's OK because for
Note: See TracChangeset for help on using the changeset viewer.