[LNT] r208720 - Fix rendering of compile-time and exec-time table

Yi Kong Yi.Kong at arm.com
Tue May 13 12:10:09 PDT 2014


Author: kongyi
Date: Tue May 13 14:10:08 2014
New Revision: 208720

URL: http://llvm.org/viewvc/llvm-project?rev=208720&view=rev
Log:
Fix rendering of compile-time and exec-time table

Background colour of pct_delta was not rendered on odd numbered lines,
because HTML bgcolor tag does not override CSS background-color style.
The patch changes cells to use standard compliant CSS style.

Modified:
    lnt/trunk/lnt/server/ui/util.py

Modified: lnt/trunk/lnt/server/ui/util.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/util.py?rev=208720&r1=208719&r2=208720&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/util.py (original)
+++ lnt/trunk/lnt/server/ui/util.py Tue May 13 14:10:08 2014
@@ -214,6 +214,9 @@ class PctCell:
         return toColorString(self.getColor())
     
     def render(self, class_=None, style=None, attributes=None):
+        bgcolor = 'background-color:%s' % (self.getColorString(),)
+        style = bgcolor if style is None else style + "; " + bgcolor
+
         attrs = []
         if style is not None:
             attrs.append('style="%s"' % (style,))
@@ -222,7 +225,6 @@ class PctCell:
         if attributes is not None:
             for key, value in attributes.items():
                 attrs.append('%s="%s"' % (key, value))
-        attrs.append('bgcolor="%s"' % (self.getColorString(),))
         attr_string = ' '.join(attrs)
         return '<td %s>%s</td>' % (attr_string, self.getValue())
 





More information about the llvm-commits mailing list