RenderFileUploadControl.h [plain text]
#ifndef RenderFileUploadControl_h
#define RenderFileUploadControl_h
#include "RenderBlock.h"
namespace WebCore {
class HTMLInputElement;
class RenderFileUploadControl : public RenderBlock {
public:
RenderFileUploadControl(HTMLInputElement*);
virtual ~RenderFileUploadControl();
virtual bool isFileUploadControl() const { return true; }
String buttonValue();
String fileTextValue() const;
private:
virtual const char* renderName() const { return "RenderFileUploadControl"; }
virtual bool canBeReplacedWithInlineRunIn() const OVERRIDE;
virtual void updateFromElement();
virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const OVERRIDE;
virtual void computePreferredLogicalWidths();
virtual void paintObject(PaintInfo&, const LayoutPoint&);
virtual bool requiresForcedStyleRecalcPropagation() const { return true; }
int maxFilenameWidth() const;
virtual VisiblePosition positionForPoint(const LayoutPoint&);
HTMLInputElement* uploadButton() const;
bool m_canReceiveDroppedFiles;
};
inline RenderFileUploadControl* toRenderFileUploadControl(RenderObject* object)
{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isFileUploadControl());
return static_cast<RenderFileUploadControl*>(object);
}
inline const RenderFileUploadControl* toRenderFileUploadControl(const RenderObject* object)
{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isFileUploadControl());
return static_cast<const RenderFileUploadControl*>(object);
}
void toRenderFileUploadControl(const RenderFileUploadControl*);
}
#endif // RenderFileUploadControl_h