[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/khtml
From:       Maks Orlovich <maksim () kde ! org>
Date:       2010-07-20 15:49:54
Message-ID: 20100720154954.42AEBAC76D () svn ! kde ! org
[Download RAW message or body]

SVN commit 1152268 by orlovich:

Merged revision:r1152267 | orlovich | 2010-07-20 11:44:34 -0400 (Tue, 20 Jul 2010) | 5 lines

Don't get confused and create an endless stream of embed wrappers if we're asked to 
open a mimetype we don't understand by a subclass. Fixes crashes with sysinfo://

BUG: 242997

 M  +8 -0      khtml_part.cpp  


--- trunk/KDE/kdelibs/khtml/khtml_part.cpp #1152267:1152268
@@ -1955,6 +1955,14 @@
   if (khtmlImLoad::ImageManager::loaderDatabase()->supportedMimeTypes().contains(mimeStr))
       return MimeImage;
 
+  // Sometimes our subclasses like to handle custom mimetypes. In that case,
+  // we want to handle them as HTML. We do that in the following cases:
+  // 1) We're at top-level, so we were forced to open something
+  // 2) We're an object --- this again means we were forced to open something,
+  //    as an iframe-generating-an-embed case would have us as an iframe
+  if (!q->parentPart() || (m_frame && m_frame->m_type == khtml::ChildFrame::Object))
+      return MimeHTML;
+
     return MimeOther;
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic