[Webkit-unassigned] [Bug 249391] Fix inline-block abspos bug

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 21 16:09:43 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=249391

--- Comment #5 from Ahmad Saleem <ahmad.saleem792 at gmail.com> ---
(In reply to Ahmad Saleem from comment #4)
> (In reply to zalan from comment #3)
> > (In reply to Ahmad Saleem from comment #2)
> > > This seems to be repaint issue because resizing window make it looks similar
> > > to Chrome Canary 112 and Firefox Nightly 112.
> > > 
> > > I tried in local testing and this compiles:
> > > 
> > >     if ((oldStyle && isOutOfFlowPositioned() && parent() && (parent() !=
> > > containingBlock()))
> > >         && (style().position() == oldStyle->position())
> > >         && (style().display() != oldStyle->display())
> > >         && ((style().display() == DisplayType::Block) || (style().display()
> > > == DisplayType::InlineBlock))
> > >         && ((oldStyle->display() == DisplayType::Block ) ||
> > > (oldStyle->display() == DisplayType::InlineBlock)))
> > >             parent()->setChildNeedsLayout(MarkOnlyThis);
> > > 
> > > _______
> > > 
> > > I tried to change "last line" with:
> > > 
> > > setNeedsLayout() and other child variants to force repainting to get this
> > > fixed but it seems it does not work in case of Safari.
> > > 
> > > Would appreciate any input or suggestion. Just wanted to share my input and
> > > progress in the background on fixing this bug. Thanks!
> > I think parent()->setNeedsLayout(LayoutInvalidationReason::ChildChanged,
> > MarkContainerChain); maps to parent()->setChildNeedsLayout();
> 
> Just tried on local build. Still it does have repaint bug where resizing
> make it aligned with Chrome Canary 112 and Firefox Nightly 112.

FIXED it:

if ((oldStyle && isOutOfFlowPositioned() && parent() && (parent() != containingBlock()))
        && (style().position() == oldStyle->position())
        && (style().isOriginalDisplayInlineType() != oldStyle->isOriginalDisplayInlineType())
        && ((style().isOriginalDisplayBlockType()) || (style().isOriginalDisplayInlineType()))
        && ((oldStyle->isOriginalDisplayBlockType()) || (oldStyle->isOriginalDisplayInlineType())))
            parent()->setChildNeedsLayout();

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230321/b022a2b5/attachment.htm>


More information about the webkit-unassigned mailing list