Reviewed by Maciej.
authorrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Nov 2006 09:28:37 +0000 (09:28 +0000)
committerrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Nov 2006 09:28:37 +0000 (09:28 +0000)
        http://bugs.webkit.org/show_bug.cgi?id=11519
        REGRESSION: Disabled file upload control doesn't have disabled appearance, failing fast/forms/file-input-disabled.html

        Transport disabled state from DOM element to the shadow
        DOM/render object.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17867 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/rendering/RenderFileUploadControl.cpp
WebCore/rendering/RenderTheme.h

index a20c3fc945b8d59c766730b5abaccb8a77f55e11..af45a4c9726a44b2637c95f298354e37be2f1a51 100644 (file)
@@ -1,3 +1,17 @@
+2006-11-20  Rob Buis  <buis@kde.org>
+
+        Reviewed by Maciej.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11519
+        REGRESSION: Disabled file upload control doesn't have disabled appearance, failing fast/forms/file-input-disabled.html
+
+        Transport disabled state from DOM element to the shadow
+        DOM/render object.
+
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::updateFromElement):
+        * rendering/RenderTheme.h:
+
 2006-11-20  Anders Carlsson  <acarlsson@apple.com>
 
         Reviewed by Maciej.
index fff5a18c86475428598f49ca2e7181061bd53b19..0eda21c910f007801de4b17fb1f61b1835e789bd 100644 (file)
@@ -116,6 +116,7 @@ void RenderFileUploadControl::updateFromElement()
         
         addChild(m_button->renderer());
     }
+    m_button->setDisabled(!theme()->isEnabled(this));
 }
 
 int RenderFileUploadControl::maxFilenameWidth()
index 7f06f2b1e29dc76248b5a084948f09d980ffe3ed..a57b1661211bce718a080c6cb81e4ccccd4940e5 100644 (file)
@@ -115,7 +115,6 @@ public:
 
     virtual void adjustSliderThumbSize(RenderObject*) const;
 
-protected:
     // Methods for state querying
     bool isChecked(const RenderObject*) const;
     bool isIndeterminate(const RenderObject*) const;
@@ -125,6 +124,7 @@ protected:
     bool isHovered(const RenderObject*) const;
     bool isReadOnlyControl(const RenderObject*) const;
 
+protected:
     // Methods for each appearance value.
     virtual void adjustCheckboxStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
     virtual bool paintCheckbox(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return true; }