Changeset 20538 for S60/trunk/WebCore
- Timestamp:
- 03/27/07 15:13:39 (22 months ago)
- Location:
- S60/trunk/WebCore
- Files:
-
- 7 modified
-
ChangeLog (modified) (1 diff)
-
bridge/WebCoreFormControls.h (modified) (1 diff)
-
khtml/html/html_formimpl.cpp (modified) (3 diffs)
-
khtml/html/html_formimpl.h (modified) (2 diffs)
-
khtml/rendering/render_form.cpp (modified) (1 diff)
-
kwq/KWQFileButton.cpp (modified) (3 diffs)
-
kwq/KWQFileButton.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
S60/trunk/WebCore/ChangeLog
r20452 r20538 1 yadavall, reviewed by <zbujtas@gmail.com> 2 DESC: Rich File Upload implementation 3 http://bugs.webkit.org/show_bug.cgi?id=13195 4 5 WARNING: NO TEST CASES ADDED OR CHANGED 6 7 * bridge/WebCoreFormControls.h: 8 * khtml/html/html_formimpl.cpp: 9 (DOM::): 10 * khtml/html/html_formimpl.h: 11 * khtml/rendering/render_form.cpp: 12 (RenderFileButton::updateFromElement): 13 * kwq/KWQFileButton.cpp: 14 (KWQFileButton::setAccept): 15 * kwq/KWQFileButton.h: 16 1 17 rathnasa, reviewed by zalan 2 18 DESC: [S60] ESMS-6YDMWP: TRUE - GSM - broswer crashes on certain web pages -
S60/trunk/WebCore/bridge/WebCoreFormControls.h
r14549 r20538 132 132 virtual void SetEventHandler(MWebCoreFormEventHandler* aInputEventHandler) = 0; 133 133 134 virtual TSize SizeForCharacterWidth(TInt aNumCharacters) const= 0; 135 136 virtual void SetFont (CFont* aFont) = 0; 137 }; 134 virtual TSize SizeForCharacterWidth(TInt aNumCharacters) const= 0; 135 136 virtual void SetFont (CFont* aFont) = 0; 137 138 virtual void SetAcceptedMimeType( const TDesC& aMimeType ) =0; 139 }; 138 140 139 141 /** -
S60/trunk/WebCore/khtml/html/html_formimpl.cpp
r19532 r20538 1273 1273 #if APPLE_CHANGES 1274 1274 m_maxResults = -1; 1275 #endif 1276 #ifdef NOKIA_CHANGES 1277 m_accept = ""; 1275 1278 #endif 1276 1279 … … 1682 1685 #endif 1683 1686 break; 1687 #if NOKIA_CHANGES 1688 case ATTR_ACCEPT: 1689 m_accept = !attr->isNull() ? attr->value() : ""; 1690 break; 1691 #endif 1684 1692 case ATTR_ALT: 1685 1693 if (m_render && m_type == IMAGE) … … 2173 2181 return false; 2174 2182 } 2183 2184 #ifdef NOKIA_CHANGES 2185 DOMString HTMLInputElementImpl::accept() const 2186 { 2187 return m_accept; 2188 } 2189 #endif 2175 2190 2176 2191 void HTMLInputElementImpl::blur() -
S60/trunk/WebCore/khtml/html/html_formimpl.h
r19532 r20538 380 380 #endif 381 381 382 #ifdef NOKIA_CHANGES 383 DOMString accept() const; 384 #endif 385 382 386 protected: 383 387 bool storesValueSeparateFromAttribute() const; … … 403 407 bool m_autocomplete : 1; 404 408 bool m_valueMatchesRenderer : 1; 409 410 #ifdef NOKIA_CHANGES 411 DOMString m_accept; 412 #endif 413 405 414 }; 406 415 -
S60/trunk/WebCore/khtml/rendering/render_form.cpp
r14720 r20538 1077 1077 m_edit->setEdited( false ); 1078 1078 #endif 1079 #if NOKIA_CHANGES 1080 static_cast<KWQFileButton *>(widget())->setAccept(element()->accept().string()); 1081 #endif 1079 1082 1080 1083 RenderFormElement::updateFromElement(); -
S60/trunk/WebCore/kwq/KWQFileButton.cpp
r14062 r20538 34 34 , _textChanged(this, SIGNAL(textChanged(const QString &))) 35 35 { 36 _fileInputWidget = TWebCoreFormControlFactory::Factory()->ConstructFile();37 if (_fileInputWidget)38 {39 _fileInputWidget->SetEventHandler(this);40 setView(_fileInputWidget);41 }36 _fileInputWidget = TWebCoreFormControlFactory::Factory()->ConstructFile(); 37 if (_fileInputWidget) 38 { 39 _fileInputWidget->SetEventHandler(this); 40 setView(_fileInputWidget); 41 } 42 42 } 43 43 44 44 void KWQFileButton::setFont(const QFont &font) 45 45 { 46 QWidget::setFont(font);47 if (_fileInputWidget)48 {49 QFont fontCpy = font;50 CFont* symFont = const_cast<CFont*>(fontCpy.Font());51 _fileInputWidget->SetFont(symFont );52 }46 QWidget::setFont(font); 47 if (_fileInputWidget) 48 { 49 QFont fontCpy = font; 50 CFont* symFont = const_cast<CFont*>(fontCpy.Font()); 51 _fileInputWidget->SetFont(symFont ); 52 } 53 53 } 54 54 … … 56 56 KWQFileButton::~KWQFileButton() 57 57 { 58 if (_fileInputWidget)59 {60 _fileInputWidget->Close();61 }58 if (_fileInputWidget) 59 { 60 _fileInputWidget->Close(); 61 } 62 62 } 63 63 64 64 void KWQFileButton::setFilename(const QString &f) 65 65 { 66 if (_fileInputWidget)67 {68 _fileInputWidget->SetFileName(f.Des());69 }66 if (_fileInputWidget) 67 { 68 _fileInputWidget->SetFileName(f.Des()); 69 } 70 70 } 71 71 72 72 void KWQFileButton::click(bool sendMouseEvents) 73 73 { 74 if (_fileInputWidget)75 {76 _fileInputWidget->Activate();77 }74 if (_fileInputWidget) 75 { 76 _fileInputWidget->Activate(); 77 } 78 78 } 79 79 80 80 QSize KWQFileButton::sizeForCharacterWidth(int characters) const 81 81 { 82 if (_fileInputWidget)83 {84 return QSize(_fileInputWidget->SizeForCharacterWidth(characters));85 }86 return QSize(0,0);82 if (_fileInputWidget) 83 { 84 return QSize(_fileInputWidget->SizeForCharacterWidth(characters)); 85 } 86 return QSize(0,0); 87 87 } 88 88 89 89 QRect KWQFileButton::frameGeometry() const 90 90 { 91 return QWidget::frameGeometry();91 return QWidget::frameGeometry(); 92 92 } 93 93 94 94 void KWQFileButton::setFrameGeometry(const QRect &rect) 95 95 { 96 return QWidget::setFrameGeometry(rect);96 return QWidget::setFrameGeometry(rect); 97 97 } 98 98 … … 123 123 void KWQFileButton::HandleEvent(TEvent aEvent) 124 124 { 125 if(aEvent == EValueChanged && _fileInputWidget)126 filenameChanged(QString::FromDes(_fileInputWidget->FileName()));125 if(aEvent == EValueChanged && _fileInputWidget) 126 filenameChanged(QString::FromDes(_fileInputWidget->FileName())); 127 127 } 128 128 129 void KWQFileButton::setAccept(const QString &a) 130 { 131 if (_fileInputWidget) 132 { 133 _fileInputWidget->SetAcceptedMimeType(a.Des()); 134 } 135 } -
S60/trunk/WebCore/kwq/KWQFileButton.h
r14062 r20538 50 50 int baselinePosition(int height) const; 51 51 52 void setFont(const QFont &font);52 void setFont(const QFont &font); 53 53 54 54 … … 59 59 void clicked(); 60 60 61 void HandleEvent(TEvent aEvent);61 void HandleEvent(TEvent aEvent); 62 62 63 void setAccept(const QString &); 63 64 64 65 private: 65 66 KWQSignal _clicked; 66 67 KWQSignal _textChanged; 67 MWebCoreFileInputWidget* _fileInputWidget;68 MWebCoreFileInputWidget* _fileInputWidget; 68 69 }; 69 70