Bug 2962 - GCC compilation issues in sf/mw/web -- Some Compilation erros fixed GCC_SURGE
authorChetan Kapoor <chetank@symbian.org>
Wed, 16 Jun 2010 13:48:17 +0100
branchGCC_SURGE
changeset 75 cd0e9694f2ef
parent 72 daaf08abac85
child 76 999a74da228b
child 77 5116222d9cb9
Bug 2962 - GCC compilation issues in sf/mw/web -- Some Compilation erros fixed
webengine/osswebengine/JavaScriptCore/wtf/FastMalloc.h
webengine/osswebengine/WebCore/platform/PlatformKeyboardEvent.h
webengine/osswebengine/WebCore/platform/symbian/FormFillController.cpp
--- a/webengine/osswebengine/JavaScriptCore/wtf/FastMalloc.h	Fri Jun 11 16:27:19 2010 +0100
+++ b/webengine/osswebengine/JavaScriptCore/wtf/FastMalloc.h	Wed Jun 16 13:48:17 2010 +0100
@@ -34,7 +34,7 @@
     IMPORT void fastFree(void* p);
     IMPORT void *fastRealloc(void* p, size_t n);
 
-#ifndef NDEBUG    
+#ifndef NDEBUG
     void fastMallocForbid();
     void fastMallocAllow();
 #endif
@@ -46,7 +46,7 @@
 using WTF::fastRealloc;
 using WTF::fastFree;
 
-#ifndef NDEBUG    
+#ifndef NDEBUG
 using WTF::fastMallocForbid;
 using WTF::fastMallocAllow;
 #endif
@@ -62,9 +62,9 @@
 #ifndef _CRTDBG_MAP_ALLOC
 
 #if PLATFORM(SYMBIAN)
-WTF_PRIVATE_INLINE void* operator new(size_t s) { return fastMalloc(s); }
+WTF_PRIVATE_INLINE void* operator new(size_t s) __NO_THROW { return fastMalloc(s); }
 WTF_PRIVATE_INLINE void operator delete(void* p) __NO_THROW { fastFree(p); }
-WTF_PRIVATE_INLINE void* operator new[](size_t s) { return fastMalloc(s); }
+WTF_PRIVATE_INLINE void* operator new[](size_t s) __NO_THROW { return fastMalloc(s); }
 WTF_PRIVATE_INLINE void operator delete[](void* p) __NO_THROW { fastFree(p); }
 #else
 #if !defined(USE_SYSTEM_MALLOC) || !(USE_SYSTEM_MALLOC)
--- a/webengine/osswebengine/WebCore/platform/PlatformKeyboardEvent.h	Fri Jun 11 16:27:19 2010 +0100
+++ b/webengine/osswebengine/WebCore/platform/PlatformKeyboardEvent.h	Wed Jun 16 13:48:17 2010 +0100
@@ -20,7 +20,7 @@
  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifndef PlatformKeyboardEvent_h
@@ -61,7 +61,7 @@
     public:
 #if PLATFORM(SYMBIAN)
         String text() const;
-#elif
+#else
         String text() const { return m_text; }
 #endif //PLATFORM(SYMBIAN)
         String unmodifiedText() const { return m_unmodifiedText; }
@@ -123,7 +123,7 @@
 #endif
 
 #if PLATFORM(SYMBIAN)
-        TKeyEvent m_symbianEvent;        
+        TKeyEvent m_symbianEvent;
 #endif
 
     };
--- a/webengine/osswebengine/WebCore/platform/symbian/FormFillController.cpp	Fri Jun 11 16:27:19 2010 +0100
+++ b/webengine/osswebengine/WebCore/platform/symbian/FormFillController.cpp	Wed Jun 16 13:48:17 2010 +0100
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  
+* Description:
 *
 */
 
@@ -40,10 +40,10 @@
 
 static const double kSearchStartTimeout = 0.5f;
 
-FormFillController::FormFillController() 
+FormFillController::FormFillController()
                     : m_popup(0), m_callback(0), m_inputElement(0), m_formDB(0), m_passwdDB(0)
 {
-    m_searchTimer = new Timer<FormFillController>(this, FormFillController::fireSearch);
+    m_searchTimer = new Timer<FormFillController>(this, &FormFillController::fireSearch);
 }
 
 FormFillController::~FormFillController()
@@ -100,7 +100,7 @@
         m_popup->invalidate();
     } else if(m_popup) {
         m_popup->clear();
-    }    
+    }
 }
 
 void FormFillController::setInputElement(MFormFillCallback* callback, HTMLInputElement* input)
@@ -108,7 +108,7 @@
     clearInputElement();
     m_inputElement = input;
     m_callback = callback;
-                            
+
     startSearch(m_inputElement->name(), m_inputElement->value() );
 }
 
@@ -176,7 +176,7 @@
 }
 
 void FormFillController::fillPasswordIfExists(HTMLInputElement* uNode)
-{   
+{
     HTMLFormElement* form = uNode->form();
     if (!m_passwdDB)
         m_passwdDB = new FormLoginStore();
@@ -188,7 +188,7 @@
             // search if we have already stored the password
             String passwdValue;
             String realm = passwdRealm(uNode->document()->URL());
-            if (!realm.isEmpty() && m_passwdDB->search(realm, uNode->name(), 
+            if (!realm.isEmpty() && m_passwdDB->search(realm, uNode->name(),
                                     uNode->value(), passwd->name(), passwdValue)) {
                 passwd->setValue(passwdValue);
             }
@@ -216,14 +216,14 @@
         if (current->hasTagName(HTMLNames::inputTag)) {
             HTMLInputElement* input = static_cast<HTMLInputElement*>(current);
             if (input->inputType() == HTMLInputElement::TEXT) {
-                if (input->autoComplete()) { 
-                
-                    bool ignorefield = false;    
+                if (input->autoComplete()) {
+
+                    bool ignorefield = false;
 
                     // find the matching password and save login data
                     int passwdFields = 0;
                     HTMLInputElement* passwd = NULL;
-                    if (passwdFillEnabled) 
+                    if (passwdFillEnabled)
                         passwd = searchPasswordFields(form, input, passwdFields);
                     String realm = passwdRealm(input->document()->URL());
                     if (passwdFields == 1) {
@@ -256,12 +256,12 @@
                             m_passwdDB->commit();
                             ignorefield = true;
                         } else if (!ignorefield) {
-                            // don't save this time, should delete previously-save 
+                            // don't save this time, should delete previously-save
                             m_passwdDB->removePartial(realm, input->name(), input->value(), passwd->name());
                             m_passwdDB->commit();
-                        } 
+                        }
 
-                       
+
                     }
                     else if (passwdFields > 1) {
                         // most likely this is a password change form, need to purge
@@ -275,7 +275,7 @@
                         insertInputNameAndValue(input->name(), input->value());
                 }
             }
-        }        
+        }
     }
 }
 
@@ -297,7 +297,7 @@
                 continue;
             }
             else if (usernameIdx != -1 && input->inputType() == HTMLInputElement::TEXT) {
-                // current element is a text input element positioning between uNode and 
+                // current element is a text input element positioning between uNode and
                 // any possible successing password field.  So uNode can't be a
                 // usename field.
                 break;
@@ -314,7 +314,7 @@
             }
         }
     }
-    
+
     return passwd;
 }