[SCM] Render HTML and CSS content with tk branch, debian, updated. 0b68625abdbdd7f0cbb9e8cbc4fa475bf90a7bfc

Ole Streicher debian at liska.ath.cx
Mon Apr 29 08:19:07 UTC 2013


The following commit has been merged in the debian branch:
commit 0b68625abdbdd7f0cbb9e8cbc4fa475bf90a7bfc
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Mon Apr 29 10:19:01 2013 +0200

    Remove some asserts to make it more stable

diff --git a/debian/changelog b/debian/changelog
index 613a3ce..c4223da 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tk-html3 (3.0~fossil20110109-3) unstable; urgency=low
+
+  * Remove some asserts to make it more stable [Stefan Ziegler]
+
+ -- Ole Streicher <debian at liska.ath.cx>  Mon, 29 Apr 2013 10:16:15 +0200
+
 tk-html3 (3.0~fossil20110109-2) unstable; urgency=low
 
   * Configure shared libs for hurd-i386 and kfreeBSD-*. Closes: #692301
diff --git a/debian/patches/remove_some_asserts.patch b/debian/patches/remove_some_asserts.patch
new file mode 100644
index 0000000..1bb3cb9
--- /dev/null
+++ b/debian/patches/remove_some_asserts.patch
@@ -0,0 +1,90 @@
+Author: Stefan Ziegler <fuh-gpl at fuh-e.de>
+Date: Fri, 26 Apr 2013 18:26:09 +0200
+Description: Added new function HtmlInitTreeNodeCmd and deleted/avoid
+ some asserts to make tkhtml a little bit more stable for us.
+--- a/src/html.h
++++ b/src/html.h
+@@ -913,6 +913,7 @@
+ void HtmlTreeAddClosingTag(HtmlTree *, int, const char *, int);
+ 
+ void HtmlInitTree(HtmlTree *);
++void HtmlInitTreeNodeCmd(HtmlTree *);
+ 
+ void HtmlHashInit(void *, int);
+ HtmlTokenMap * HtmlHashLookup(void *, const char *zType);
+--- a/src/htmltcl.c
++++ b/src/htmltcl.c
+@@ -498,6 +498,11 @@
+         HtmlNodeComputedValues(pTree->pRoot) ||
+         pTree->cb.pRestyle==pTree->pRoot
+     );
++
++    while( pTree->cb.inProgress ) {
++	usleep( 2000 );
++    }
++
+     HtmlCheckRestylePoint(pTree);
+ 
+     HtmlLog(pTree, "CALLBACK", 
+@@ -668,14 +673,17 @@
+         (!pTree->cb.inProgress) 
+     ) {
+         ClientData clientData = (ClientData)pTree;
+-        assert(!pTree->cb.isForce);
+-        pTree->cb.isForce++;
+-        callbackHandler(clientData);
+-        pTree->cb.isForce--;
+-        assert(pTree->cb.isForce >= 0);
+-        if (pTree->cb.flags == 0) {
+-            Tcl_CancelIdleCall(callbackHandler, clientData);
+-        }
++	if( !pTree->cb.isForce )
++	{
++	    pTree->cb.isForce++;
++            callbackHandler(clientData);
++            pTree->cb.isForce--;
++            assert(pTree->cb.isForce >= 0);
++
++    	    if (pTree->cb.flags == 0) {
++    	        Tcl_CancelIdleCall(callbackHandler, clientData);
++        	}
++	};
+     }
+ }
+ 
+@@ -2430,7 +2438,7 @@
+     int objc;                          /* Number of arguments. */
+     Tcl_Obj *CONST objv[];             /* Argument strings. */
+ {
+-    HtmlInitTree((HtmlTree *)clientData);
++    HtmlInitTreeNodeCmd((HtmlTree *)clientData);
+     return HtmlLayoutNode(clientData, interp, objc, objv);
+ }
+ static int 
+--- a/src/htmltree.c
++++ b/src/htmltree.c
+@@ -997,10 +997,23 @@
+          * document is the current node. 
+          */
+         pTree->state.pCurrent = HtmlNodeChild(pTree->pRoot, 1);
+-        assert(HtmlNodeTagType(pTree->state.pCurrent) == Html_BODY);
+     }
+ }
+ 
++void
++HtmlInitTreeNodeCmd(pTree)
++    HtmlTree *pTree;
++{
++    if (pTree->pRoot
++     && !pTree->state.pCurrent) {
++        /* If there is no current node, then the <body> node of the
++         * document is the current node.
++         */
++        pTree->state.pCurrent = HtmlNodeChild(pTree->pRoot, 1);
++    }
++}
++
++
+ static HtmlNode *
+ findFosterParent(pTree, ppTable)
+     HtmlTree *pTree;
diff --git a/debian/patches/series b/debian/patches/series
index a87f41e..cf3cff1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ updated_bookmarks.patch
 ds9.patch
 use_tcllib.patch
 configure_shlibs.patch
+remove_some_asserts.patch

-- 
Render HTML and CSS content with tk



More information about the debian-science-commits mailing list