Changeset 24482 in webkit


Ignore:
Timestamp:
Jul 20, 2007 9:52:51 AM (17 years ago)
Author:
zbujtas
Message:

raalexan, reviewed by Zalan

DESC: AJPA-74XD84 Some input format doesn't work properly.
http://bugs.webkit.org/show_bug.cgi?id=14661

Location:
S60/trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • S60/trunk/WebCore/ChangeLog

    r24109 r24482  
     1raalexan, 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
    1142007-06-29  bujtas  <zbujtas@gmail.com>
    215
  • S60/trunk/WebCore/khtml/rendering/render_form.cpp

    r20538 r24482  
    17011701    w->setLineHeight(RenderObject::lineHeight(true));
    17021702
     1703    bool inputRequired = s->inputRequired();
     1704    QString inputFormat = s->inputFormat();
     1705    w->setInputRequiredFormat(inputRequired, inputFormat);
    17031706#if APPLE_CHANGES
    17041707    w->setWritingDirection(style()->direction() == RTL ? QPainter::RTL : QPainter::LTR);
  • S60/trunk/WebCore/kwq/KWQTextEdit.cpp

    r14062 r24482  
    3535
    3636    _textWidget = TWebCoreFormControlFactory::Factory()->ConstructText(inputType );
    37         if (_textWidget)
    38         {
     37  if (_textWidget)
     38  {
    3939    _textWidget->SetEventHandler(this);
    4040    setView(_textWidget);
    41         }
     41  }
    4242}
    4343
    4444QTextEdit::~QTextEdit()
    4545{
    46         if (_textWidget)
    47         {
    48                 _textWidget->Close();
    49         }
     46  if (_textWidget)
     47  {
     48    _textWidget->Close();
     49  }
    5050}
    5151
     
    5353void QTextEdit::setText(const QString &string)
    5454{
    55         if (_textWidget)
    56         {
    57                 _textWidget->SetText(string.Des());
    58         }
     55  if (_textWidget)
     56  {
     57    _textWidget->SetText(string.Des());
     58  }
    5959}
    6060
    6161QString QTextEdit::text() const
    6262{
    63         if (_textWidget)
    64         {
    65                 return QString::FromDes(_textWidget->Text());
    66         }
    67         return QString();
     63  if (_textWidget)
     64  {
     65    return QString::FromDes(_textWidget->Text());
     66  }
     67  return QString();
    6868}
    6969
    7070QString QTextEdit::textWithHardLineBreaks() const
    7171{
    72         return text();
     72  return text();
    7373}
    7474
     
    117117bool QTextEdit::isReadOnly() const
    118118{
    119         if (_textWidget)
    120         {
    121                 return _textWidget->IsReadOnly();
    122         }
    123         return false;
     119  if (_textWidget)
     120  {
     121    return _textWidget->IsReadOnly();
     122  }
     123  return false;
    124124}
    125125
    126126void QTextEdit::setReadOnly(bool flag)
    127127{
    128         if (_textWidget)
    129         {
    130                 _textWidget->SetReadOnly(flag);
    131         }
     128  if (_textWidget)
     129  {
     130    _textWidget->SetReadOnly(flag);
     131  }
    132132}
    133133
    134134bool QTextEdit::isDisabled() const
    135135{
    136         if (_textWidget)
    137         {
    138                 return _textWidget->IsDisabled();
    139         }
    140         return false;
     136  if (_textWidget)
     137  {
     138    return _textWidget->IsDisabled();
     139  }
     140  return false;
    141141}
    142142
    143143void QTextEdit::setDisabled(bool flag)
    144144{
    145         if (_textWidget)
    146         {
    147                 _textWidget->SetDisabled(flag);
    148         }
     145  if (_textWidget)
     146  {
     147    _textWidget->SetDisabled(flag);
     148  }
    149149}
    150150
     
    156156void QTextEdit::setFont(const QFont &font)
    157157{
    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         }
     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  }
    165165}
    166166
    167167bool QTextEdit::isActive() const
    168168{
    169         if (_textWidget)
    170         {
    171                 return _textWidget->IsActive();
    172         }
    173         return false;
     169  if (_textWidget)
     170  {
     171    return _textWidget->IsActive();
     172  }
     173  return false;
    174174}
    175175
    176176void QTextEdit::deActivate(bool acceptChanges)
    177177{
    178         if (_textWidget)
    179         {
    180                 _textWidget->DeActivate(acceptChanges);
    181         }
     178  if (_textWidget)
     179  {
     180    _textWidget->DeActivate(acceptChanges);
     181  }
    182182}
    183183
     
    214214QSize QTextEdit::sizeWithColumnsAndRows(int numColumns, int numRows) const
    215215{
    216         if (_textWidget)
    217         {
    218                 _textWidget->SetSize(numColumns);
    219                 _textWidget->SetHeight(numRows);
    220                 return QSize(_textWidget->SizeForCharacterWidth(numColumns));
    221         }
    222         return QSize(0,0);
     216  if (_textWidget)
     217  {
     218    _textWidget->SetSize(numColumns);
     219    _textWidget->SetHeight(numRows);
     220    return QSize(_textWidget->SizeForCharacterWidth(numColumns));
     221  }
     222  return QSize(0,0);
    223223}
    224224
     
    226226QRect QTextEdit::frameGeometry() const
    227227{
    228         if(_textWidget)
    229         {
    230                 return QRect(_textWidget->Rect());
    231         }
    232         return QRect();
     228  if(_textWidget)
     229  {
     230    return QRect(_textWidget->Rect());
     231  }
     232  return QRect();
    233233}
    234234
    235235void QTextEdit::setFrameGeometry(const QRect &r)
    236236{
    237         if(_textWidget)
    238         {
    239                 _textWidget->SetRect(r.Rect());
    240         }
     237  if(_textWidget)
     238  {
     239    _textWidget->SetRect(r.Rect());
     240  }
    241241}
    242242
     
    244244QWidget::FocusPolicy QTextEdit::focusPolicy() const
    245245{
    246         return TabFocus;
     246  return TabFocus;
    247247}
    248248
     
    278278void QTextEdit::paint(QPainter *aPainter, const QRect& aRect)
    279279{
    280         TRect rect = aRect.Rect();
    281         if (_textWidget)
    282         {
    283                 _textWidget->Draw(aPainter->Gc(), rect);
    284         }
     280  TRect rect = aRect.Rect();
     281  if (_textWidget)
     282  {
     283    _textWidget->Draw(aPainter->Gc(), rect);
     284  }
    285285}
    286286
    287287void QTextEdit::HandleEvent(TEvent aEvent)
    288288{
    289         if(aEvent == EValueChanged)
    290         {
    291                 textChanged();
    292         }
    293         else if (aEvent == EFocusOut && eventFilterObject())
    294         {
     289  if(aEvent == EValueChanged)
     290  {
     291    textChanged();
     292  }
     293  else if (aEvent == EFocusOut && eventFilterObject())
     294  {
    295295        QFocusEvent event(QEvent::FocusOut);
    296296        const_cast<QObject *>(eventFilterObject())->eventFilter(this, &event);
    297         }
    298 
    299 }
    300 
     297  }
     298
     299}
     300
     301void 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  
    3838 public:
    3939    typedef enum {
    40         NoWrap,
    41         WidgetWidth
     40  NoWrap,
     41  WidgetWidth
    4242    } WrapStyle;
    4343
    4444    typedef enum {
    45         PlainText,
     45  PlainText,
    4646    } TextFormat;
    4747
     
    106106    void paint(QPainter *, const QRect &);
    107107    void HandleEvent(TEvent aEvent);
     108    void setInputRequiredFormat(bool aInputRequired,
     109       QString aInputFormat);
    108110
    109111  private:
Note: See TracChangeset for help on using the changeset viewer.