diff -r e1bea15f9a39 -r 79859ed3eea9 webengine/osswebengine/WebKit/s60/webview/WebTextFormatMask.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebTextFormatMask.cpp Thu Aug 19 10:58:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/WebTextFormatMask.cpp Tue Aug 31 16:17:46 2010 +0300 @@ -22,9 +22,9 @@ #include "Frame.h" #include "Editor.h" -#include "String.h" -#include "HtmlNames.h" -#include "HtmlInputElement.h" +#include "string.h" +#include "HTMLNames.h" +#include "HTMLInputElement.h" #include "Text.h" #include "CString.h" @@ -61,7 +61,7 @@ void WebTextFormatMask::buildMaskList(const String& str) { // *M or *m - if (str.isEmpty() || str=="*m") { + if (str.isEmpty() || str=="*M" || str=="*m") { m_acceptAll = true; return; } @@ -192,15 +192,9 @@ m_currentMask = m_currentMask->nextMask(); } - // this check doesn't seem to be proper as the check is done for - // the partial text.Because the checkText() is called for every character input by user, - // there are remaining masks after complete text length has been checked, - // that is valid case and it should not return false. - // If text length is bigger than mask length then that case is handled within for loop - //before this condition check. So it is redundant in current implementation - // did we use up all the masks? - /* if(m_currentMask && m_currentMask->multitude() != kInfinite) - return false;*/ + // did we use up all the masks? + if(m_currentMask && m_currentMask->multitude() != kInfinite) + return false; return (eb.m_start == -1); } @@ -221,22 +215,17 @@ int WebTextFormatMask::getMultitude() { - int length = 0; int count = 0; MaskBase* m = m_masks; while (m) { - length = m->multitude(); - if (length == kInfinite){ - return kInfinite; - } - else if(length > 1){ - count += length; - break; - } - else{ - count += length; - } - m = m->nextMask(); + + if (m->multitude() == kInfinite){ + return kInfinite; + } + else { + count += m->multitude(); + } + m = m->nextMask(); } return (count)?count:kInfinite; @@ -287,11 +276,6 @@ return true; } -bool WebTextFormatMask::acceptAll() - { - return m_acceptAll; - } - MaskComposite::MaskComposite(TInputFormatMaskType t, int mul) : MaskSingle(t), m_offset(0), m_length(mul) {