|
@@ -267,6 +267,16 @@ bool FlexContainer::Close(const Vector2f content_overflow_size, const Box& box,
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+float FlexContainer::GetShrinkToFitWidth() const
|
|
|
|
|
+{
|
|
|
|
|
+ // We don't currently support shrink-to-fit layout of flex containers. However, for the trivial case of a fixed
|
|
|
|
|
+ // width, we simply return that.
|
|
|
|
|
+ if (element->GetComputedValues().width().type == Style::Width::Type::Length)
|
|
|
|
|
+ return box.GetSize().x;
|
|
|
|
|
+
|
|
|
|
|
+ return 0.0f;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
String FlexContainer::DebugDumpTree(int depth) const
|
|
String FlexContainer::DebugDumpTree(int depth) const
|
|
|
{
|
|
{
|
|
|
return String(depth * 2, ' ') + "FlexContainer" + " | " + LayoutDetails::GetDebugElementName(element);
|
|
return String(depth * 2, ' ') + "FlexContainer" + " | " + LayoutDetails::GetDebugElementName(element);
|
|
@@ -291,6 +301,16 @@ void TableWrapper::Close(const Vector2f content_overflow_size, const Box& box, f
|
|
|
SetElementBaseline(element_baseline);
|
|
SetElementBaseline(element_baseline);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+float TableWrapper::GetShrinkToFitWidth() const
|
|
|
|
|
+{
|
|
|
|
|
+ // We don't currently support shrink-to-fit layout of tables. However, for the trivial case of a fixed width, we
|
|
|
|
|
+ // simply return that.
|
|
|
|
|
+ if (element->GetComputedValues().width().type == Style::Width::Type::Length)
|
|
|
|
|
+ return box.GetSize().x;
|
|
|
|
|
+
|
|
|
|
|
+ return 0.0f;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
String TableWrapper::DebugDumpTree(int depth) const
|
|
String TableWrapper::DebugDumpTree(int depth) const
|
|
|
{
|
|
{
|
|
|
return String(depth * 2, ' ') + "TableWrapper" + " | " + LayoutDetails::GetDebugElementName(element);
|
|
return String(depth * 2, ' ') + "TableWrapper" + " | " + LayoutDetails::GetDebugElementName(element);
|