Changeset 24482 in webkit
- Timestamp:
- Jul 20, 2007 9:52:51 AM (17 years ago)
- Location:
- S60/trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
S60/trunk/WebCore/ChangeLog
r24109 r24482 1 raalexan, reviewed by Zalan 2 DESC: AJPA-74XD84 Some input format doesn't work properly. 3 http://bugs.webkit.org/show_bug.cgi?id=14661 4 5 WARNING: NO TEST CASES ADDED OR CHANGED 6 7 * khtml/rendering/render_form.cpp: 8 (RenderTextArea::setStyle): 9 * kwq/KWQTextEdit.cpp: 10 (QTextEdit::setInputRequiredFormat): 11 * kwq/KWQTextEdit.h: 12 (QTextEdit::): 13 1 14 2007-06-29 bujtas <zbujtas@gmail.com> 2 15 -
S60/trunk/WebCore/khtml/rendering/render_form.cpp
r20538 r24482 1701 1701 w->setLineHeight(RenderObject::lineHeight(true)); 1702 1702 1703 bool inputRequired = s->inputRequired(); 1704 QString inputFormat = s->inputFormat(); 1705 w->setInputRequiredFormat(inputRequired, inputFormat); 1703 1706 #if APPLE_CHANGES 1704 1707 w->setWritingDirection(style()->direction() == RTL ? QPainter::RTL : QPainter::LTR); -
S60/trunk/WebCore/kwq/KWQTextEdit.cpp
r14062 r24482 35 35 36 36 _textWidget = TWebCoreFormControlFactory::Factory()->ConstructText(inputType ); 37 38 37 if (_textWidget) 38 { 39 39 _textWidget->SetEventHandler(this); 40 40 setView(_textWidget); 41 41 } 42 42 } 43 43 44 44 QTextEdit::~QTextEdit() 45 45 { 46 47 48 49 46 if (_textWidget) 47 { 48 _textWidget->Close(); 49 } 50 50 } 51 51 … … 53 53 void QTextEdit::setText(const QString &string) 54 54 { 55 56 57 58 55 if (_textWidget) 56 { 57 _textWidget->SetText(string.Des()); 58 } 59 59 } 60 60 61 61 QString QTextEdit::text() const 62 62 { 63 64 65 66 67 63 if (_textWidget) 64 { 65 return QString::FromDes(_textWidget->Text()); 66 } 67 return QString(); 68 68 } 69 69 70 70 QString QTextEdit::textWithHardLineBreaks() const 71 71 { 72 72 return text(); 73 73 } 74 74 … … 117 117 bool QTextEdit::isReadOnly() const 118 118 { 119 120 121 122 123 119 if (_textWidget) 120 { 121 return _textWidget->IsReadOnly(); 122 } 123 return false; 124 124 } 125 125 126 126 void QTextEdit::setReadOnly(bool flag) 127 127 { 128 129 130 131 128 if (_textWidget) 129 { 130 _textWidget->SetReadOnly(flag); 131 } 132 132 } 133 133 134 134 bool QTextEdit::isDisabled() const 135 135 { 136 137 138 139 140 136 if (_textWidget) 137 { 138 return _textWidget->IsDisabled(); 139 } 140 return false; 141 141 } 142 142 143 143 void QTextEdit::setDisabled(bool flag) 144 144 { 145 146 147 148 145 if (_textWidget) 146 { 147 _textWidget->SetDisabled(flag); 148 } 149 149 } 150 150 … … 156 156 void QTextEdit::setFont(const QFont &font) 157 157 { 158 159 160 161 162 163 164 158 QWidget::setFont(font); 159 if (_textWidget) 160 { 161 QFont fontCpy = font; 162 CFont* symFont = const_cast<CFont*>(fontCpy.Font()); 163 _textWidget->SetFont(symFont ); 164 } 165 165 } 166 166 167 167 bool QTextEdit::isActive() const 168 168 { 169 170 171 172 173 169 if (_textWidget) 170 { 171 return _textWidget->IsActive(); 172 } 173 return false; 174 174 } 175 175 176 176 void QTextEdit::deActivate(bool acceptChanges) 177 177 { 178 179 180 181 178 if (_textWidget) 179 { 180 _textWidget->DeActivate(acceptChanges); 181 } 182 182 } 183 183 … … 214 214 QSize QTextEdit::sizeWithColumnsAndRows(int numColumns, int numRows) const 215 215 { 216 217 218 219 220 221 222 216 if (_textWidget) 217 { 218 _textWidget->SetSize(numColumns); 219 _textWidget->SetHeight(numRows); 220 return QSize(_textWidget->SizeForCharacterWidth(numColumns)); 221 } 222 return QSize(0,0); 223 223 } 224 224 … … 226 226 QRect QTextEdit::frameGeometry() const 227 227 { 228 229 230 231 232 228 if(_textWidget) 229 { 230 return QRect(_textWidget->Rect()); 231 } 232 return QRect(); 233 233 } 234 234 235 235 void QTextEdit::setFrameGeometry(const QRect &r) 236 236 { 237 238 239 240 237 if(_textWidget) 238 { 239 _textWidget->SetRect(r.Rect()); 240 } 241 241 } 242 242 … … 244 244 QWidget::FocusPolicy QTextEdit::focusPolicy() const 245 245 { 246 246 return TabFocus; 247 247 } 248 248 … … 278 278 void QTextEdit::paint(QPainter *aPainter, const QRect& aRect) 279 279 { 280 281 282 283 284 280 TRect rect = aRect.Rect(); 281 if (_textWidget) 282 { 283 _textWidget->Draw(aPainter->Gc(), rect); 284 } 285 285 } 286 286 287 287 void QTextEdit::HandleEvent(TEvent aEvent) 288 288 { 289 290 291 292 293 294 289 if(aEvent == EValueChanged) 290 { 291 textChanged(); 292 } 293 else if (aEvent == EFocusOut && eventFilterObject()) 294 { 295 295 QFocusEvent event(QEvent::FocusOut); 296 296 const_cast<QObject *>(eventFilterObject())->eventFilter(this, &event); 297 } 298 299 } 300 297 } 298 299 } 300 301 void QTextEdit::setInputRequiredFormat(bool aInputRequired, QString aInputFormat) 302 { 303 if (_textWidget) 304 { 305 _textWidget->SetInputRequiredFormat(!aInputRequired, aInputFormat.Des()); 306 } 307 } 308 309 -
S60/trunk/WebCore/kwq/KWQTextEdit.h
r14549 r24482 38 38 public: 39 39 typedef enum { 40 41 40 NoWrap, 41 WidgetWidth 42 42 } WrapStyle; 43 43 44 44 typedef enum { 45 45 PlainText, 46 46 } TextFormat; 47 47 … … 106 106 void paint(QPainter *, const QRect &); 107 107 void HandleEvent(TEvent aEvent); 108 void setInputRequiredFormat(bool aInputRequired, 109 QString aInputFormat); 108 110 109 111 private:
Note: See TracChangeset
for help on using the changeset viewer.