Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 69af735e279626381af5aaafe094625f4f1e1384
      
https://github.com/WebKit/WebKit/commit/69af735e279626381af5aaafe094625f4f1e1384
  Author: Sammy Gill <[email protected]>
  Date:   2023-05-02 (Tue, 02 May 2023)

  Changed paths:
    M Source/WebCore/css/ComputedStyleExtractor.cpp

  Log Message:
  -----------
  [margin-trim] Refactor rendererCanHaveTrimmedMargin to remove incorrect uses 
of containingBlock
https://bugs.webkit.org/show_bug.cgi?id=255118
rdar://107726833

Reviewed by Alan Baradlay.

The code was using a variable that was misleadingly named containingBlock
and using it in contexts when the renderer was in a flexbox or grid.
We should only be using this name when the renderer is a block level
box.

The code has been refactored first to check if the renderer is first a
flex or grid item and then using the parent() to check for margin-trim.
If the box is a block level box instead, we will instead use the
containingBlock().

* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::rendererCanHaveTrimmedMargin):

Canonical link: https://commits.webkit.org/263616@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to