NEW250946
Reduce calls to LayoutUnit(int) in RenderBox.h
https://bugs.webkit.org/show_bug.cgi?id=250946
Summary Reduce calls to LayoutUnit(int) in RenderBox.h
Ahmad Saleem
Reported 2023-01-21 15:08:10 PST
Hi Team, It is split off from bug 250884 because when I tried to merge RenderBox.h changes, it let to build failure since these are used in RenderSVG Blink Commit - https://chromium.googlesource.com/chromium/blink/+/e3d125383e6023dccb9f052237751f1c9a8098ec Missing WebKit Source Changes - https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderBox.h#382 Adding: ComputedMarginValues() { } and LogicalExtentComputedValues() { } accordingly. the build failures are here: https://searchfox.org/wubkat/source/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp#93 Just wanted to raise it so we can track it separately and fix and land this as well. Thanks!
Attachments
Radar WebKit Bug Importer
Comment 1 2023-01-28 15:09:28 PST
Ahmad Saleem
Comment 2 2024-03-04 14:51:35 PST
This does not compile: struct ComputedMarginValues { + ComputedMarginValues() { } LayoutUnit m_before; LayoutUnit m_after; LayoutUnit m_start; LayoutUnit m_end; }; struct LogicalExtentComputedValues { + LogicalExtentComputedValues() { } LayoutUnit m_extent; LayoutUnit m_position; ComputedMarginValues m_margins; }; ___ no matching constructor for initialization of 'RenderBox::LogicalExtentComputedValues' ...{ static_cast<int>(roundf(m_viewport.height())), logicalTop, ComputedMarginValues() }; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ___ Looking into 'LogicalExtentComputedValues()' - I don't see any calls, while I do see for 'ComputedMarginValues()'. @Alan - do we need this or we can close this bug? __ With this change, it does compile: struct ComputedMarginValues { + ComputedMarginValues() { } LayoutUnit m_before; LayoutUnit m_after; LayoutUnit m_start; LayoutUnit m_end; }; ___
Ahmad Saleem
Comment 3 2025-12-24 23:12:59 PST
struct ComputedMarginValues { ComputedMarginValues() = default; LayoutUnit m_before; LayoutUnit m_after; LayoutUnit m_start; LayoutUnit m_end; }; struct LogicalExtentComputedValues { LogicalExtentComputedValues() = default; LogicalExtentComputedValues(LayoutUnit extent, LayoutUnit position, ComputedMarginValues margins) : m_extent(extent) , m_position(position) , m_margins(margins) { } LayoutUnit m_extent; LayoutUnit m_position; ComputedMarginValues m_margins; }; ^ This compiles.
Note You need to log in before you can comment on or make changes to this bug.