|
From: CVS C. to T. <the...@li...> - 2012-04-04 18:13:41
|
Revision: 695
http://themis.svn.sourceforge.net/themis/?rev=695&view=rev
Author: mark_hellegers
Date: 2012-04-04 18:13:35 +0000 (Wed, 04 Apr 2012)
Log Message:
-----------
Added support for HTML 3.2 style tables.
Modified Paths:
--------------
trunk/themis/modules/CSSRenderer/TableDisplayView.cpp
Modified: trunk/themis/modules/CSSRenderer/TableDisplayView.cpp
===================================================================
--- trunk/themis/modules/CSSRenderer/TableDisplayView.cpp 2012-04-03 21:32:50 UTC (rev 694)
+++ trunk/themis/modules/CSSRenderer/TableDisplayView.cpp 2012-04-04 18:13:35 UTC (rev 695)
@@ -39,6 +39,7 @@
// CSS Renderer headers
#include "TableDisplayView.hpp"
#include "TableGroupDisplayView.hpp"
+#include "TableRowDisplayView.hpp"
TableDisplayView :: TableDisplayView(CSSRendererView * aBaseView,
TNodePtr aNode,
@@ -172,6 +173,20 @@
}
}
}
+ else {
+ TableRowDisplayView * childRowView = dynamic_cast<TableRowDisplayView *> (childView);
+ if (childRowView) {
+ unsigned int childLength = childRowView->GetLength();
+ for (unsigned int j = 0; j < childLength; j++) {
+ if (j >= widths.size()) {
+ widths.push_back(childRowView->GetChildWidth(j));
+ }
+ else if (childRowView->GetChildWidth(j) > widths[j]) {
+ widths[j] = childRowView->GetChildWidth(j);
+ }
+ }
+ }
+ }
}
for (unsigned int i = 0; i < length; i++) {
@@ -183,6 +198,15 @@
childGroupView->SetColWidth(widths[j], j);
}
}
+ else {
+ TableRowDisplayView * childRowView = dynamic_cast<TableRowDisplayView *> (childView);
+ if (childRowView) {
+ unsigned int childLength = childRowView->GetLength();
+ for (unsigned int j = 0; j < childLength; j++) {
+ childRowView->SetChildWidth(widths[j], j);
+ }
+ }
+ }
}
// Do another layout the children based on the new col widths.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|