webengine/osswebengine/WebCore/rendering/RenderPartObject.cpp
branchRCL_3
changeset 94 919f36ff910f
parent 93 79859ed3eea9
equal deleted inserted replaced
93:79859ed3eea9 94:919f36ff910f
    40 #include "HTMLIFrameElement.h"
    40 #include "HTMLIFrameElement.h"
    41 #include "HTMLNames.h"
    41 #include "HTMLNames.h"
    42 #include "HTMLObjectElement.h"
    42 #include "HTMLObjectElement.h"
    43 #include "HTMLParamElement.h"
    43 #include "HTMLParamElement.h"
    44 #include "KURL.h"
    44 #include "KURL.h"
    45 #include "MimeTypeRegistry.h"
    45 #include "MIMETypeRegistry.h"
    46 #include "Page.h"
    46 #include "Page.h"
    47 #include "RenderView.h"
    47 #include "RenderView.h"
    48 #include "Text.h"
    48 #include "Text.h"
    49 #include "Settings.h"
    49 #include "Settings.h"
    50 
    50 
   206       }
   206       }
   207       
   207       
   208       // If we still don't have a type, try to map from a specific CLASSID to a type.
   208       // If we still don't have a type, try to map from a specific CLASSID to a type.
   209       if (serviceType.isEmpty() && !o->m_classId.isEmpty())
   209       if (serviceType.isEmpty() && !o->m_classId.isEmpty())
   210           mapClassIdToServiceType(o->m_classId, serviceType);
   210           mapClassIdToServiceType(o->m_classId, serviceType);
       
   211 #if PLATFORM(SYMBIAN) 
       
   212       //If there is no Type and Classid then return.
       
   213       else if (serviceType.isEmpty() && o->m_classId.isEmpty() && !embed)
       
   214           return;
       
   215 #endif
   211       
   216       
   212       // If no URL and type, abort.
   217       // If no URL and type, abort.
   213       if (url.isEmpty() && serviceType.isEmpty())
   218       if (url.isEmpty() && serviceType.isEmpty())
   214           return;
   219           return;
   215       if (!isURLAllowed(document(), url))
   220       if (!isURLAllowed(document(), url))
   359     return false;
   364     return false;
   360 }
   365 }
   361 
   366 
   362 int RenderPartObject::calcReplacedWidth() const
   367 int RenderPartObject::calcReplacedWidth() const
   363 {
   368 {
   364     if (m_widget && (m_widget->getView())->hasResized())  {        
   369     if (m_widget && m_widget->getView() && (m_widget->getView())->hasResized())  {        
   365         IntRect newRect = m_widget->frameGeometry();
   370         IntRect newRect = m_widget->frameGeometry();
   366         int newWidth = newRect.width();
   371         int newWidth = newRect.width();
   367         if (newWidth > 0) {
   372         if (newWidth > 0) {
   368             return newWidth;
   373             return newWidth;
   369         }
   374         }
   371     return RenderReplaced::calcReplacedWidth();
   376     return RenderReplaced::calcReplacedWidth();
   372 }
   377 }
   373 
   378 
   374 int RenderPartObject::calcReplacedHeight() const
   379 int RenderPartObject::calcReplacedHeight() const
   375 {
   380 {
   376     if (m_widget && (m_widget->getView())->hasResized())  {        
   381     if (m_widget && m_widget->getView() && (m_widget->getView())->hasResized())  {        
   377         IntRect newRect = m_widget->frameGeometry();
   382         IntRect newRect = m_widget->frameGeometry();
   378         int newHeight = newRect.height();
   383         int newHeight = newRect.height();
   379         if (newHeight > 0) {
   384         if (newHeight > 0) {
   380             return newHeight;
   385             return newHeight;
   381         }       
   386         }