rpms/kdelibs/devel kdelibs-4.0.1-objectembed-handling.patch, NONE, 1.1 kdelibs.spec, 1.265, 1.266

Than Ngo (than) fedora-extras-commits at redhat.com
Fri Feb 1 15:38:09 UTC 2008


Author: than

Update of /cvs/extras/rpms/kdelibs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21686

Modified Files:
	kdelibs.spec 
Added Files:
	kdelibs-4.0.1-objectembed-handling.patch 
Log Message:
upstream patch to fix a regression in <object><embed> handling


kdelibs-4.0.1-objectembed-handling.patch:

--- NEW FILE kdelibs-4.0.1-objectembed-handling.patch ---
Index: khtml/html/html_objectimpl.cpp
===================================================================
--- khtml/html/html_objectimpl.cpp	(Revision 769141)
+++ khtml/html/html_objectimpl.cpp	(Revision 769142)
@@ -340,6 +340,13 @@
                                     // if the URL isn't there
     QString     effectiveServiceType = serviceType;
 
+    // We need to wait until everything has parsed, since we need the <param>s,
+    // and the embedded <embed>
+    if (!closed()) {
+        setNeedComputeContent();
+        return;
+    }
+
     // Collect information from <param> children for ...
     // It also sometimes supplements or replaces some of the element's attributes
     for (NodeImpl* child = firstChild(); child; child = child->nextSibling()) {
@@ -485,13 +492,6 @@
     if (m_renderAlternative)
         return;
 
-    // Finally, we want to try requesting the KPart. However, params matter here,
-    // so we want to defer until closed.
-    if (!closed()) {
-        setNeedComputeContent();
-        return;
-    }
-
     KHTMLPart* part = getDocument()->part();
     clearChildWidget();
 
@@ -719,6 +719,12 @@
         HTMLObjectBaseElementImpl::attach();
 }
 
+void HTMLEmbedElementImpl::computeContent()
+{
+    if (parentNode()->id() != ID_OBJECT)
+        HTMLObjectBaseElementImpl::computeContent();
+}
+
 // -------------------------------------------------------------------------
 
 HTMLObjectElementImpl::HTMLObjectElementImpl(DocumentImpl *doc)
Index: khtml/html/html_objectimpl.h
===================================================================
--- khtml/html/html_objectimpl.h	(Revision 769141)
+++ khtml/html/html_objectimpl.h	(Revision 769142)
@@ -41,7 +41,7 @@
 class HTMLEmbedElementImpl;
 
 // Base class of all objects that are displayed as KParts:
-// frames, objects, applets, etc. 
+// frames, objects, applets, etc.
 class HTMLPartContainerElementImpl : public QObject, public HTMLElementImpl
 {
 public:
@@ -54,22 +54,22 @@
     virtual void recalcStyle(StyleChange ch);
     virtual void close();
 
-    // These methods will be called to notify the element of 
-    // any progress in loading of the document: setWidgetNotify if the 
-    // KPart was created, and partLoadingErrorNotify when 
+    // These methods will be called to notify the element of
+    // any progress in loading of the document: setWidgetNotify if the
+    // KPart was created, and partLoadingErrorNotify when
     // there was a problem with creating the part or loading the data
     // (hence setWidgetNotify may be followed by partLoadingErrorNotify).
-    // This class take care of all the memory management, and during 
+    // This class take care of all the memory management, and during
     // the setWidgetNotify call, both old (if any) and new widget are alive
     // Note: setWidgetNotify may be called with 0...
-    virtual void setWidgetNotify(QWidget *widget) = 0; 
+    virtual void setWidgetNotify(QWidget *widget) = 0;
     virtual void partLoadingErrorNotify();
-    
-    // This is called when a mimetype is discovered, and should return true 
+
+    // This is called when a mimetype is discovered, and should return true
     // if KHTMLPart should not make a kpart for it, but rather let it be handled directly.
     virtual bool mimetypeHandledInternally(const QString& mime);
 
-    // IMPORTANT: you should call this when requesting a URL, to make sure 
+    // IMPORTANT: you should call this when requesting a URL, to make sure
     // that we don't get stale references to iframes or such.
     void clearChildWidget();
     QWidget* childWidget() const { return m_childWidget; }
@@ -80,8 +80,8 @@
     void setWidget(QWidget* widget);
 private:
     virtual void computeContent() = 0;
-    bool m_needToComputeContent; // This flag is set to true when 
-                                 // we may have to load a new KPart, due to 
+    bool m_needToComputeContent; // This flag is set to true when
+                                 // we may have to load a new KPart, due to
                                  // source changing, etc.
     QPointer<QWidget> m_childWidget; // may be deleted by global child widget cleanup on us..
 };
@@ -102,7 +102,7 @@
     QString classId;
     QString serviceType;
 
-    bool m_rerender; // This is set to true if a reattach is pending, 
+    bool m_rerender; // This is set to true if a reattach is pending,
                      // due to a change in how we need to display this...
 
     bool m_renderAlternative;
@@ -119,7 +119,7 @@
     virtual void partLoadingErrorNotify();
     virtual bool mimetypeHandledInternally(const QString& mime);
 
-    // This method figures out what to render -- perhaps KPart, perhaps an image, perhaps 
+    // This method figures out what to render -- perhaps KPart, perhaps an image, perhaps
     // alternative content, and forces a reattach if need be.
     virtual void computeContent();
 
@@ -164,6 +164,7 @@
 
     virtual void parseAttribute(AttributeImpl *attr);
     virtual void attach();
+    virtual void computeContent();
 
     virtual HTMLEmbedElementImpl* relevantEmbed();
 


Index: kdelibs.spec
===================================================================
RCS file: /cvs/extras/rpms/kdelibs/devel/kdelibs.spec,v
retrieving revision 1.265
retrieving revision 1.266
diff -u -r1.265 -r1.266
--- kdelibs.spec	1 Feb 2008 12:57:29 -0000	1.265
+++ kdelibs.spec	1 Feb 2008 15:37:29 -0000	1.266
@@ -4,7 +4,7 @@
 
 Summary: K Desktop Environment 4 - Libraries
 Version: 4.0.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 %if 0%{?fedora} > 8
 Name: kdelibs
@@ -62,6 +62,9 @@
 Patch6: kdelibs-4.0.0-openssl.patch
 Patch7: kdelibs-4.0.1-autostart.patch
 
+# upstream patches
+Patch100: kdelibs-4.0.1-objectembed-handling.patch
+
 BuildRequires: qt4-devel >= 4.3.0
 Requires: qt4 >= %{_qt4_version} 
 Requires: xdg-utils
@@ -147,6 +150,8 @@
 %endif
 %patch7 -p1 -b .xdg-autostart
 
+# upstream patches
+%patch100 -p0 -b .objectembed-handling
 
 %build
 
@@ -274,6 +279,9 @@
 
 
 %changelog
+* Fri Feb 01 2008 Than Ngo <than at redhat.com> 4.0.1-3
+- upstream patch to fix a regression in <object><embed> handling
+
 * Fri Feb 01 2008 Than Ngo <than at redhat.com> 4.0.1-2
 - autostart from XDG_CONFIG_DIRS
 




More information about the fedora-extras-commits mailing list