Bug 257575

Summary: RenderTable::BottomSection() should return the last rendered table section
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, karlcow, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-05-31 17:21:04 PDT
Hi Team,

Just came across following potential bug fix but without Layout Test case, so I would leave it for someone else to fix but just wanted to raise.

Blink Commit: https://chromium.googlesource.com/chromium/src.git/+/9c14979722d3761c5449f3ef9f68bd2fee4f82a0

WebKit Source: https://github.com/WebKit/WebKit/blob/734687da6292d68e3d571f781719887cc8e74bbd/Source/WebCore/rendering/RenderTable.cpp#L1435

Patch:

if (m_foot)
        return m_foot.get();
    if (m_head && !firstBody())
        return m_head.get();
    for (RenderObject* child = lastChild(); child; child = child->previousSibling()) {
        if (child == m_head)
            continue;


____________-

Just wanted to raise, so we can fix it.

Thanks!
Comment 1 zalan 2023-06-04 21:08:38 PDT
I think this needs a test case and it should not be too hard to come up with one.
Comment 2 Radar WebKit Bug Importer 2023-06-07 17:22:16 PDT
<rdar://problem/110430887>
Comment 3 Karl Dubost 2023-06-15 05:51:51 PDT
Alan, do you have an example of CPP test file elsewhere in the code?