summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderFileUploadControl.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-08-11 17:01:47 +0100
committerBen Murdoch <benm@google.com>2009-08-11 18:21:02 +0100
commit0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch)
tree2943df35f62d885c89d01063cc528dd73b480fea /WebCore/rendering/RenderFileUploadControl.h
parent7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff)
downloadexternal_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2
Merge in WebKit r47029.
Diffstat (limited to 'WebCore/rendering/RenderFileUploadControl.h')
-rw-r--r--WebCore/rendering/RenderFileUploadControl.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/WebCore/rendering/RenderFileUploadControl.h b/WebCore/rendering/RenderFileUploadControl.h
index 85bc09f..bd7d62a 100644
--- a/WebCore/rendering/RenderFileUploadControl.h
+++ b/WebCore/rendering/RenderFileUploadControl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007 Apple Inc.
+ * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -35,13 +35,7 @@ class HTMLInputElement;
class RenderFileUploadControl : public RenderBlock, private FileChooserClient {
public:
RenderFileUploadControl(HTMLInputElement*);
- ~RenderFileUploadControl();
-
- virtual const char* renderName() const { return "RenderFileUploadControl"; }
-
- virtual void updateFromElement();
- virtual void calcPrefWidths();
- virtual void paintObject(PaintInfo&, int tx, int ty);
+ virtual ~RenderFileUploadControl();
void click();
@@ -54,10 +48,15 @@ public:
bool allowsMultipleFiles();
-protected:
+private:
+ virtual const char* renderName() const { return "RenderFileUploadControl"; }
+
+ virtual void updateFromElement();
+ virtual void calcPrefWidths();
+ virtual void paintObject(PaintInfo&, int tx, int ty);
+
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
-private:
int maxFilenameWidth() const;
PassRefPtr<RenderStyle> createButtonStyle(const RenderStyle* parentStyle) const;
@@ -65,6 +64,15 @@ private:
RefPtr<FileChooser> m_fileChooser;
};
+inline RenderFileUploadControl* toRenderFileUploadControl(RenderObject* object)
+{
+ ASSERT(!object || !strcmp(object->renderName(), "RenderFileUploadControl"));
+ return static_cast<RenderFileUploadControl*>(object);
+}
+
+// This will catch anyone doing an unnecessary cast.
+void toRenderFileUploadControl(const RenderFileUploadControl*);
+
} // namespace WebCore
#endif // RenderFileUploadControl_h