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 - Removed CSSPropertyPosition from createsContainingBlockForOutOfFlowPositioned() to not create a containing block
 9 for the fixed position case.
 10 - Added createsContainingBlockForAbsolutelyPositioned() with CSSPropertyPosition to still create a containing block
 11 in the absolute position case.
 12
 13 Enabled WPT (which covers both cases): css/css-will-change/will-change-fixpos-cb-position-1.html
 14
 15 * rendering/RenderElement.h:
 16 (WebCore::RenderElement::canContainAbsolutelyPositionedObjects const):
 17 * rendering/style/WillChangeData.cpp:
 18 (WebCore::WillChangeData::createsContainingBlockForAbsolutelyPositioned const):
 19 (WebCore::WillChangeData::createsContainingBlockForOutOfFlowPositioned const):
 20 * rendering/style/WillChangeData.h:
 21
1222021-05-16 Alan Bujtas <zalan@apple.com>
223
324 [LFC] Cleanup FormattingContext class

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 - Removed CSSPropertyPosition from createsContainingBlockForOutOfFlowPositioned() to not create a containing block
 9 for the fixed position case.
 10 - Added createsContainingBlockForAbsolutelyPositioned() with CSSPropertyPosition to still create a containing block
 11 in the absolute position case.
 12
 13 Enabled WPT (which covers both cases): css/css-will-change/will-change-fixpos-cb-position-1.html
 14
 15 * TestExpectations:
 16
1172021-05-16 Sam Weinig <weinig@apple.com>
218
319 Add support for creating/accessing/setting non-sRGB ImageData via canvas

LayoutTests/TestExpectations

@@webkit.org/b/224928 imported/w3c/web-platform-tests/css/css-will-change/will-cha
48594859webkit.org/b/225035 imported/w3c/web-platform-tests/css/css-will-change/will-change-fixedpos-cb-002.html [ ImageOnlyFailure ]
48604860webkit.org/b/225034 imported/w3c/web-platform-tests/css/css-will-change/will-change-fixedpos-cb-003.html [ ImageOnlyFailure ]
48614861webkit.org/b/225442 imported/w3c/web-platform-tests/css/css-will-change/will-change-fixpos-cb-contain-1.html [ ImageOnlyFailure ]
4862 webkit.org/b/225443 imported/w3c/web-platform-tests/css/css-will-change/will-change-fixpos-cb-position-1.html [ ImageOnlyFailure ]
48634862webkit.org/b/224902 [ Debug ] imported/w3c/web-platform-tests/css/css-will-change/parsing/will-change-invalid.html [ Skip ]
48644863
48654864# Implement offset-* properties