summaryrefslogtreecommitdiff
path: root/dw/widget.cc
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2024-03-23 00:17:00 +0100
committerRodrigo Arias Mallo <rodarima@gmail.com>2024-03-23 00:38:54 +0100
commitba086f844f208dd89e0801d91b9a72b4d02d6789 (patch)
treeff999a741c726462c75cee093e54c42cb0649d9c /dw/widget.cc
parent825513cc44c5b5862e73c8740150fef592fcda1a (diff)
Set forceValue when correcting a requisition
For cases where the parent widget has the width set to auto we need to go to the above parent to compute the available width. This is required to make tables with a width of 100% occupy the whole available width of the parent. In particular, fixes render/table-max-width.html test, which was relying on a {-1,-1,-1} requisition to have a value different than -1 in the width to consider that the CSS width is effective.
Diffstat (limited to 'dw/widget.cc')
-rw-r--r--dw/widget.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/dw/widget.cc b/dw/widget.cc
index f4506b84..edabce51 100644
--- a/dw/widget.cc
+++ b/dw/widget.cc
@@ -1840,7 +1840,7 @@ void Widget::correctReqWidthOfChild (Widget *child, Requisition *requisition,
if (!allowDecreaseWidth && limitMinWidth < requisition->width)
limitMinWidth = requisition->width;
- child->calcFinalWidth (child->getStyle(), -1, this, limitMinWidth, false,
+ child->calcFinalWidth (child->getStyle(), -1, this, limitMinWidth, true,
&requisition->width);
DBG_OBJ_LEAVE_VAL ("%d * (%d + %d)", requisition->width, requisition->ascent,