summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Layout/LayoutTableCell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibWeb/Layout/LayoutTableCell.cpp')
-rw-r--r--Libraries/LibWeb/Layout/LayoutTableCell.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Libraries/LibWeb/Layout/LayoutTableCell.cpp b/Libraries/LibWeb/Layout/LayoutTableCell.cpp
index f483a9f9c0..9621271843 100644
--- a/Libraries/LibWeb/Layout/LayoutTableCell.cpp
+++ b/Libraries/LibWeb/Layout/LayoutTableCell.cpp
@@ -26,6 +26,7 @@
#include <LibWeb/DOM/Element.h>
#include <LibWeb/Layout/LayoutTableCell.h>
+#include <LibWeb/Layout/LayoutTableRow.h>
namespace Web {
@@ -44,4 +45,11 @@ size_t LayoutTableCell::colspan() const
return to<Element>(*node()).attribute(HTML::AttributeNames::colspan).to_uint().value_or(1);
}
+float LayoutTableCell::width_of_logical_containing_block() const
+{
+ if (auto* row = first_ancestor_of_type<LayoutTableRow>())
+ return row->width();
+ return 0;
+}
+
}