| Index: Source/WebCore/rendering/RenderFileUploadControl.cpp
|
| ===================================================================
|
| --- Source/WebCore/rendering/RenderFileUploadControl.cpp (revision 94056)
|
| +++ Source/WebCore/rendering/RenderFileUploadControl.cpp (working copy)
|
| @@ -63,8 +63,15 @@
|
| HTMLInputElement* input = static_cast<HTMLInputElement*>(node());
|
| ASSERT(input->isFileUpload());
|
|
|
| - if (HTMLInputElement* button = uploadButton())
|
| - button->setDisabled(!theme()->isEnabled(this));
|
| + if (HTMLInputElement* button = uploadButton()) {
|
| + bool newDisabled = !theme()->isEnabled(this);
|
| + // We should avoid to call HTMLFormControlElement::setDisabled() as
|
| + // possible because setAttribute() in setDisabled() can cause style
|
| + // recalculation, and HTMLFormControlElement::recalcStyle() calls
|
| + // updateFromElement() eventually.
|
| + if (button->disabled() != newDisabled)
|
| + button->setDisabled(newDisabled);
|
| + }
|
|
|
| // This only supports clearing out the files, but that's OK because for
|
| // security reasons that's the only change the DOM is allowed to make.
|
|
|