webengine/osswebengine/WebCore/rendering/RenderPartObject.cpp
branchRCL_3
changeset 47 e1bea15f9a39
parent 40 8bfb9186a8b8
child 48 79859ed3eea9
equal deleted inserted replaced
46:30342f40acbf 47:e1bea15f9a39
   364     return false;
   364     return false;
   365 }
   365 }
   366 
   366 
   367 int RenderPartObject::calcReplacedWidth() const
   367 int RenderPartObject::calcReplacedWidth() const
   368 {
   368 {
   369     if (m_widget && (m_widget->getView())->hasResized())  {        
   369     if (m_widget && m_widget->getView() && (m_widget->getView())->hasResized())  {        
   370         IntRect newRect = m_widget->frameGeometry();
   370         IntRect newRect = m_widget->frameGeometry();
   371         int newWidth = newRect.width();
   371         int newWidth = newRect.width();
   372         if (newWidth > 0) {
   372         if (newWidth > 0) {
   373             return newWidth;
   373             return newWidth;
   374         }
   374         }
   376     return RenderReplaced::calcReplacedWidth();
   376     return RenderReplaced::calcReplacedWidth();
   377 }
   377 }
   378 
   378 
   379 int RenderPartObject::calcReplacedHeight() const
   379 int RenderPartObject::calcReplacedHeight() const
   380 {
   380 {
   381     if (m_widget && (m_widget->getView())->hasResized())  {        
   381     if (m_widget && m_widget->getView() && (m_widget->getView())->hasResized())  {        
   382         IntRect newRect = m_widget->frameGeometry();
   382         IntRect newRect = m_widget->frameGeometry();
   383         int newHeight = newRect.height();
   383         int newHeight = newRect.height();
   384         if (newHeight > 0) {
   384         if (newHeight > 0) {
   385             return newHeight;
   385             return newHeight;
   386         }       
   386         }