Source/WebCore/ChangeLog

 12021-05-16 Tim Nguyen <ntim@apple.com>
 2
 3 will-change: position should not create a containing block for position: fixed elements
 4 https://bugs.webkit.org/show_bug.cgi?id=225443
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Marked relevant WPT as pass.
 9
 10 * rendering/RenderElement.h:
 11 (WebCore::RenderElement::canContainAbsolutelyPositionedObjects const):
 12 * rendering/style/WillChangeData.cpp:
 13 (WebCore::WillChangeData::createsContainingBlockForAbsolutelyPositioned const):
 14 (WebCore::WillChangeData::createsContainingBlockForOutOfFlowPositioned const):
 15 * rendering/style/WillChangeData.h:
 16
1172021-05-16 Tim Nguyen <ntim@apple.com>
218
319 Make will-change: transform-style create a containing block

Source/WebCore/rendering/RenderElement.h

@@inline bool RenderElement::canContainAbsolutelyPositionedObjects() const
449449 return style().position() != PositionType::Static
450450 || (isRenderBlock() && hasTransformRelatedProperty())
451451 // FIXME: will-change should create containing blocks on inline boxes (bug 225035)
452  || (isRenderBlock() && style().willChange() && style().willChange()->createsContainingBlockForOutOfFlowPositioned())
 452 || (isRenderBlock() && style().willChange() && style().willChange()->createsContainingBlockForAbsolutelyPositioned())
453453 || isSVGForeignObject()
454454 || shouldApplyLayoutContainment(*this)
455455 || isRenderView();

Source/WebCore/rendering/style/WillChangeData.cpp

@@bool WillChangeData::containsProperty(CSSPropertyID property) const
6060 return false;
6161}
6262
 63bool WillChangeData::createsContainingBlockForAbsolutelyPositioned() const
 64{
 65 return createsContainingBlockForOutOfFlowPositioned()
 66 || containsProperty(CSSPropertyPosition);
 67}
 68
6369bool WillChangeData::createsContainingBlockForOutOfFlowPositioned() const
6470{
65  return containsProperty(CSSPropertyPosition)
66  || containsProperty(CSSPropertyPerspective)
 71 return containsProperty(CSSPropertyPerspective)
6772 // CSS transforms
6873 || containsProperty(CSSPropertyTransform)
6974 || containsProperty(CSSPropertyTransformStyle)

Source/WebCore/rendering/style/WillChangeData.h

@@public:
5252 bool containsContents() const;
5353 bool containsProperty(CSSPropertyID) const;
5454
 55 bool createsContainingBlockForAbsolutelyPositioned() const;
5556 bool createsContainingBlockForOutOfFlowPositioned() const;
5657 bool canCreateStackingContext() const { return m_canCreateStackingContext; }
5758 bool canTriggerCompositing() const { return m_canTriggerCompositing; }

LayoutTests/ChangeLog

 12021-05-16 Tim Nguyen <ntim@apple.com>
 2
 3 will-change: position should not create a containing block for position: fixed elements
 4 https://bugs.webkit.org/show_bug.cgi?id=225443
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Marked relevant WPT as pass.
 9
 10 * TestExpectations:
 11
1122021-05-16 Tim Nguyen <ntim@apple.com>
213
314 Make will-change: transform-style create a containing block

LayoutTests/TestExpectations

@@webkit.org/b/224928 imported/w3c/web-platform-tests/css/css-will-change/will-cha
48624862webkit.org/b/225035 imported/w3c/web-platform-tests/css/css-will-change/will-change-fixedpos-cb-002.html [ ImageOnlyFailure ]
48634863webkit.org/b/225034 imported/w3c/web-platform-tests/css/css-will-change/will-change-fixedpos-cb-003.html [ ImageOnlyFailure ]
48644864webkit.org/b/225442 imported/w3c/web-platform-tests/css/css-will-change/will-change-fixpos-cb-contain-1.html [ ImageOnlyFailure ]
4865 webkit.org/b/225443 imported/w3c/web-platform-tests/css/css-will-change/will-change-fixpos-cb-position-1.html [ ImageOnlyFailure ]
48664865webkit.org/b/224902 [ Debug ] imported/w3c/web-platform-tests/css/css-will-change/parsing/will-change-invalid.html [ Skip ]
48674866
48684867# Implement offset-* properties