Bug 265099 - Fix setPreferredLogicalWidthsDirty when a RenderObject is already dirty
Summary: Fix setPreferredLogicalWidthsDirty when a RenderObject is already dirty
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-18 18:00 PST by Ahmad Saleem
Modified: 2023-11-25 18:01 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-11-18 18:00:27 PST
Hi Team,

Just wanted to raise to get input, whether it is something can leads to any issue in 'WebKit' world:

Blink Commit: https://chromium.googlesource.com/chromium/blink/+/5a6a045684108c19541eb9db437e612e4be419fe

"Previously, RenderObject::setPreferredLogicalWidthsDirty with
MarkingBehavior=MarkContainingBlockChain would not dirty its ancestors
if the RenderObject was already marked as dirty. This patch fixes this
bug by ignoring whether the RenderObject was already marked as dirty."

WebKit Source: https://searchfox.org/wubkat/rev/114aa2c8594807cbc34dd5dff48a9e2addfd1e00/Source/WebCore/rendering/RenderObject.cpp#633

___________

Current:

void RenderObject::setPreferredLogicalWidthsDirty(bool shouldBeDirty, MarkingBehavior markParents)
{
    bool alreadyDirty = preferredLogicalWidthsDirty();
    m_bitfields.setPreferredLogicalWidthsDirty(shouldBeDirty);
    if (shouldBeDirty && !alreadyDirty && markParents == MarkContainingBlockChain && (isRenderText() || !style().hasOutOfFlowPosition()))
        invalidateContainerPreferredLogicalWidths();
}

To:

void RenderObject::setPreferredLogicalWidthsDirty(bool shouldBeDirty, MarkingBehavior markParents)
{
    m_bitfields.setPreferredLogicalWidthsDirty(shouldBeDirty);
    if (shouldBeDirty && markParents == MarkContainingBlockChain && (isRenderText() || !style().hasOutOfFlowPosition()))
        invalidateContainerPreferredLogicalWidths();
}

____

This compiles but I didn't run any test case except 'cached-change-tbody-border-width.html' and it fails with differences.

Just wanted to raise to get input.

Thanks!
Comment 1 Radar WebKit Bug Importer 2023-11-25 18:01:14 PST
<rdar://problem/118795843>