⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 287875 in webkit


Ignore:
Timestamp:
Jan 11, 2022, 5:45:53 AM (5 years ago)
Author:
Martin Robinson
Message:

Some css-transforms tests assert in debug
https://bugs.webkit.org/show_bug.cgi?id=230079
<rdar://problem/83179970>

Reviewed by Simon Fraser.

Source/WebCore:

No new tests. This is covered by existing WPT tests. This change fixes
five assertions and one test completely. In addition, it leads to progressions,
but not complete fixes, in the four remaining tests.

Table elements, which can be transformed, were not properly forming containing blocks
for fixed and absolutely positioned elements.

  • rendering/RenderElement.h:

(WebCore::RenderElement::canContainFixedPositionObjects const): Return true even when
we have a transformed element that is not a block.
(WebCore::RenderElement::canContainAbsolutelyPositionedObjects const): Ditto.
(WebCore::RenderElement::isTransformable const): Added this helper which returns whether
not SVG elements are transformable. Eventually this should be extended to handle SVG
elements as well.

LayoutTests:

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r287874 r287875  
     12022-01-11  Martin Robinson  <mrobinson@webkit.org>
     2
     3        Some css-transforms tests assert in debug
     4        https://bugs.webkit.org/show_bug.cgi?id=230079
     5        <rdar://problem/83179970>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * TestExpectations: Update expectations to note new passes.
     10
    1112022-01-11  Diego Pino Garcia  <dpino@igalia.com>
    212
  • trunk/LayoutTests/TestExpectations

    r287874 r287875  
    39433943imported/w3c/web-platform-tests/css/css-transforms/backface-visibility-001.ref.html [ Skip ]
    39443944
    3945 webkit.org/b/230079 [ Debug ] imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-tbody-contains-fixed-position.html [ Skip ]
    3946 webkit.org/b/230079 [ Debug ] imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-tfoot-contains-fixed-position.html [ Skip ]
    3947 webkit.org/b/230079 [ Debug ] imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-thead-contains-fixed-position.html [ Skip ]
    3948 webkit.org/b/230079 [ Debug ] imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-tr-contains-fixed-position.html [ Skip ]
    3949 webkit.org/b/230079 [ Debug ] imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-tr-percent-height-child.html [ Skip ]
    3950 webkit.org/b/230079 [ Debug ] fast/layers/top-layer-ancestor-opacity-and-transform-crash.html [ Skip ]
    3951 
    3952 webkit.org/b/230080 [ Release ] imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-tbody-contains-fixed-position.html [ ImageOnlyFailure ]
    3953 webkit.org/b/230080 [ Release ] imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-tfoot-contains-fixed-position.html [ ImageOnlyFailure ]
    3954 webkit.org/b/230080 [ Release ] imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-thead-contains-fixed-position.html [ ImageOnlyFailure ]
    3955 webkit.org/b/230080 [ Release ] imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-tr-contains-fixed-position.html [ ImageOnlyFailure ]
    3956 webkit.org/b/230080 [ Release ] imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-tr-percent-height-child.html [ ImageOnlyFailure ]
     3945webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-tbody-contains-fixed-position.html [ ImageOnlyFailure ]
     3946webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-tfoot-contains-fixed-position.html [ ImageOnlyFailure ]
     3947webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-thead-contains-fixed-position.html [ ImageOnlyFailure ]
     3948webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-transformed-tr-percent-height-child.html [ ImageOnlyFailure ]
     3949
     3950webkit.org/b/235063 [ Debug ] fast/layers/top-layer-ancestor-opacity-and-transform-crash.html [ Skip ]
    39573951
    39583952webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/3d-rendering-context-and-abspos.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r287873 r287875  
     12022-01-11  Martin Robinson  <mrobinson@webkit.org>
     2
     3        Some css-transforms tests assert in debug
     4        https://bugs.webkit.org/show_bug.cgi?id=230079
     5        <rdar://problem/83179970>
     6
     7        Reviewed by Simon Fraser.
     8
     9        No new tests. This is covered by existing WPT tests. This change fixes
     10        five assertions and one test completely. In addition, it leads to progressions,
     11        but not complete fixes, in the four remaining tests.
     12
     13        Table elements, which can be transformed, were not properly forming containing blocks
     14        for fixed and absolutely positioned elements.
     15
     16        * rendering/RenderElement.h:
     17        (WebCore::RenderElement::canContainFixedPositionObjects const): Return true even when
     18        we have a transformed element that is not a block.
     19        (WebCore::RenderElement::canContainAbsolutelyPositionedObjects const): Ditto.
     20        (WebCore::RenderElement::isTransformable const): Added this helper which returns whether
     21        not SVG elements are transformable. Eventually this should be extended to handle SVG
     22        elements as well.
     23
    1242022-01-11  Nikolas Zimmermann  <nzimmermann@igalia.com>
    225
  • trunk/Source/WebCore/rendering/RenderElement.h

    r287744 r287875  
    8585    bool canContainFixedPositionObjects() const;
    8686    bool canContainAbsolutelyPositionedObjects() const;
     87    bool canEstablishContainingBlockWithTransform() const;
    8788
    8889    Color selectionColor(CSSPropertyID) const;
     
    456457{
    457458    return isRenderView()
    458         || (isRenderBlock() && hasTransform())
     459        || (canEstablishContainingBlockWithTransform() && hasTransform())
    459460        // FIXME: will-change should create containing blocks on inline boxes (bug 225035)
    460461        || (isRenderBlock() && style().willChange() && style().willChange()->createsContainingBlockForOutOfFlowPositioned())
     
    467468{
    468469    return style().position() != PositionType::Static
    469         || (isRenderBlock() && hasTransformRelatedProperty())
     470        || (canEstablishContainingBlockWithTransform() && hasTransformRelatedProperty())
    470471        // FIXME: will-change should create containing blocks on inline boxes (bug 225035)
    471472        || (isRenderBlock() && style().willChange() && style().willChange()->createsContainingBlockForAbsolutelyPositioned())
     
    476477}
    477478
     479inline bool RenderElement::canEstablishContainingBlockWithTransform() const
     480{
     481    return isRenderBlock() || (isTablePart() && !isRenderTableCol());
     482}
     483
    478484inline bool RenderElement::createsGroupForStyle(const RenderStyle& style)
    479485{
Note: See TracChangeset for help on using the changeset viewer.