aboutsummaryrefslogtreecommitdiff
path: root/dw/table.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-07-24 23:40:21 +0200
committerSebastian Geerken <devnull@localhost>2014-07-24 23:40:21 +0200
commit6c77ae97e8d500a35caf3b9acdc5c0a377337d9d (patch)
treefd96fa08b1ef23266865edefed5587da3bdb6a39 /dw/table.cc
parentb6aeac03a3e6c5f4ea7edaad9a42b79cf5a8fe10 (diff)
More work on tables; some reorganization.
Diffstat (limited to 'dw/table.cc')
-rw-r--r--dw/table.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/dw/table.cc b/dw/table.cc
index 3959f01a..b1c04018 100644
--- a/dw/table.cc
+++ b/dw/table.cc
@@ -768,8 +768,16 @@ void Table::forceCalcCellSizes (bool calcHeights)
maxWidth += colExtremes->getRef(col)->maxWidth;
}
- // CSS 'width' defined?
- bool totalWidthSpecified = getStyle()->width != core::style::LENGTH_AUTO;
+ // CSS 'width' defined and effective?
+ bool totalWidthSpecified = false;
+ if (getStyle()->width != core::style::LENGTH_AUTO) {
+ // Even if 'width' is defined, it may not have a defined value. We try
+ // this trick (should perhaps be replaced by a cleaner solution):
+ core::Requisition testReq = { -1, -1, -1 };
+ correctRequisition (&testReq, core::splitHeightPreserveDescent);
+ if (testReq.width != -1)
+ totalWidthSpecified = true;
+ }
DBG_OBJ_MSGF ("resize", 1,
"minWidth = %d, minWidthIntrinsic = %d, maxWidth %d, "