File: dont_ignore_bgcolor.patch

package info (click to toggle)
tk-html3 3.0~fossil20110109-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,644 kB
  • ctags: 5,882
  • sloc: ansic: 48,994; tcl: 26,030; sh: 1,190; yacc: 161; makefile: 24
file content (18 lines) | stat: -rw-r--r-- 777 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Origin: http://groups.google.com/group/tkhtml3/browse_thread/thread/74ccb54074bec7d5
Description: Fix the problem that tkhtml seems to ignore 'background-color' 
 on tbody-tags.
--- a/src/htmlprop.c
+++ b/src/htmlprop.c
@@ -2045,6 +2045,12 @@ HtmlComputedValuesInit(pTree, pNode, pParent, p)
         memcpy(&p->fontKey, pValues->fFont->pKey, sizeof(HtmlFontKey));
         pValues->mask = 
             (pValues->mask & iCopyMask) | (pParentValues->mask & !iCopyMask);
+        /* inherit background from parent */
+        p->values.cBackgroundColor->nRef++;
+        decrementColorRef(pTree, p->values.cBackgroundColor );
+
+        p->values.cBackgroundColor = 
+	    ((HtmlElementNode *)pParent)->pPropertyValues->cBackgroundColor;
     }
 
     p->values.cColor->nRef++;