Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Side by Side Diff: Source/WebCore/rendering/RenderFileUploadControl.h

Issue 6542053: Merge 78168 - 2011-02-09 Ryosuke Niwa <rniwa@webkit.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 10 matching lines...) Expand all
21 #ifndef RenderFileUploadControl_h 21 #ifndef RenderFileUploadControl_h
22 #define RenderFileUploadControl_h 22 #define RenderFileUploadControl_h
23 23
24 #include "FileChooser.h" 24 #include "FileChooser.h"
25 #include "RenderBlock.h" 25 #include "RenderBlock.h"
26 26
27 namespace WebCore { 27 namespace WebCore {
28 28
29 class Chrome; 29 class Chrome;
30 class HTMLInputElement; 30 class HTMLInputElement;
31 31
32 // Each RenderFileUploadControl contains a RenderButton (for opening the file ch ooser), and 32 // Each RenderFileUploadControl contains a RenderButton (for opening the file ch ooser), and
33 // sufficient space to draw a file icon and filename. The RenderButton has a sha dow node 33 // sufficient space to draw a file icon and filename. The RenderButton has a sha dow node
34 // associated with it to receive click/hover events. 34 // associated with it to receive click/hover events.
35 35
36 class RenderFileUploadControl : public RenderBlock, private FileChooserClient { 36 class RenderFileUploadControl : public RenderBlock, private FileChooserClient {
37 public: 37 public:
38 RenderFileUploadControl(HTMLInputElement*); 38 RenderFileUploadControl(HTMLInputElement*);
39 virtual ~RenderFileUploadControl(); 39 virtual ~RenderFileUploadControl();
40 40
41 virtual bool isFileUploadControl() const { return true; } 41 virtual bool isFileUploadControl() const { return true; }
(...skipping 22 matching lines...) Expand all
64 bool allowsMultipleFiles(); 64 bool allowsMultipleFiles();
65 #if ENABLE(DIRECTORY_UPLOAD) 65 #if ENABLE(DIRECTORY_UPLOAD)
66 bool allowsDirectoryUpload(); 66 bool allowsDirectoryUpload();
67 #endif 67 #endif
68 String acceptTypes(); 68 String acceptTypes();
69 void chooseIconForFiles(FileChooser*, const Vector<String>&); 69 void chooseIconForFiles(FileChooser*, const Vector<String>&);
70 70
71 Chrome* chrome() const; 71 Chrome* chrome() const;
72 int maxFilenameWidth() const; 72 int maxFilenameWidth() const;
73 PassRefPtr<RenderStyle> createButtonStyle(const RenderStyle* parentStyle) co nst; 73 PassRefPtr<RenderStyle> createButtonStyle(const RenderStyle* parentStyle) co nst;
74
75 virtual VisiblePosition positionForPoint(const IntPoint&);
74 76
75 RefPtr<HTMLInputElement> m_button; 77 RefPtr<HTMLInputElement> m_button;
76 RefPtr<FileChooser> m_fileChooser; 78 RefPtr<FileChooser> m_fileChooser;
77 }; 79 };
78 80
79 inline RenderFileUploadControl* toRenderFileUploadControl(RenderObject* object) 81 inline RenderFileUploadControl* toRenderFileUploadControl(RenderObject* object)
80 { 82 {
81 ASSERT(!object || object->isFileUploadControl()); 83 ASSERT(!object || object->isFileUploadControl());
82 return static_cast<RenderFileUploadControl*>(object); 84 return static_cast<RenderFileUploadControl*>(object);
83 } 85 }
84 86
85 inline const RenderFileUploadControl* toRenderFileUploadControl(const RenderObje ct* object) 87 inline const RenderFileUploadControl* toRenderFileUploadControl(const RenderObje ct* object)
86 { 88 {
87 ASSERT(!object || object->isFileUploadControl()); 89 ASSERT(!object || object->isFileUploadControl());
88 return static_cast<const RenderFileUploadControl*>(object); 90 return static_cast<const RenderFileUploadControl*>(object);
89 } 91 }
90 92
91 // This will catch anyone doing an unnecessary cast. 93 // This will catch anyone doing an unnecessary cast.
92 void toRenderFileUploadControl(const RenderFileUploadControl*); 94 void toRenderFileUploadControl(const RenderFileUploadControl*);
93 95
94 } // namespace WebCore 96 } // namespace WebCore
95 97
96 #endif // RenderFileUploadControl_h 98 #endif // RenderFileUploadControl_h
OLDNEW
« no previous file with comments | « Source/WebCore/editing/VisibleSelection.cpp ('k') | Source/WebCore/rendering/RenderFileUploadControl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698