| Differences between
and this patch
- a/Source/WebCore/ChangeLog +23 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2021-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
        This partially undoes r276627 which made will-change: position create a CB for all out-of-flow elements:
9
10
        - Removed CSSPropertyPosition from createsContainingBlockForOutOfFlowPositioned() to not create a containing block
11
        for position: fixed; children.
12
        - Added createsContainingBlockForAbsolutelyPositioned() with CSSPropertyPosition to still create a containing block
13
        for position: absolute; children.
14
15
        Enabled WPT (which covers both cases): css/css-will-change/will-change-fixpos-cb-position-1.html
16
17
        * rendering/RenderElement.h:
18
        (WebCore::RenderElement::canContainAbsolutelyPositionedObjects const):
19
        * rendering/style/WillChangeData.cpp:
20
        (WebCore::WillChangeData::createsContainingBlockForAbsolutelyPositioned const):
21
        (WebCore::WillChangeData::createsContainingBlockForOutOfFlowPositioned const):
22
        * rendering/style/WillChangeData.h:
23
1
2021-05-16  Alan Bujtas  <zalan@apple.com>
24
2021-05-16  Alan Bujtas  <zalan@apple.com>
2
25
3
        [LFC] Cleanup FormattingContext class
26
        [LFC] Cleanup FormattingContext class
- a/Source/WebCore/rendering/RenderElement.h -1 / +1 lines
Lines 449-455 inline bool RenderElement::canContainAbsolutelyPositionedObjects() const a/Source/WebCore/rendering/RenderElement.h_sec1
449
    return style().position() != PositionType::Static
449
    return style().position() != PositionType::Static
450
        || (isRenderBlock() && hasTransformRelatedProperty())
450
        || (isRenderBlock() && hasTransformRelatedProperty())
451
        // FIXME: will-change should create containing blocks on inline boxes (bug 225035)
451
        // 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())
453
        || isSVGForeignObject()
453
        || isSVGForeignObject()
454
        || shouldApplyLayoutContainment(*this)
454
        || shouldApplyLayoutContainment(*this)
455
        || isRenderView();
455
        || isRenderView();
- a/Source/WebCore/rendering/style/WillChangeData.cpp -2 / +7 lines
Lines 60-69 bool WillChangeData::containsProperty(CSSPropertyID property) const a/Source/WebCore/rendering/style/WillChangeData.cpp_sec1
60
    return false;
60
    return false;
61
}
61
}
62
62
63
bool WillChangeData::createsContainingBlockForAbsolutelyPositioned() const
64
{
65
    return createsContainingBlockForOutOfFlowPositioned()
66
        || containsProperty(CSSPropertyPosition);
67
}
68
63
bool WillChangeData::createsContainingBlockForOutOfFlowPositioned() const
69
bool WillChangeData::createsContainingBlockForOutOfFlowPositioned() const
64
{
70
{
65
    return containsProperty(CSSPropertyPosition)
71
    return containsProperty(CSSPropertyPerspective)
66
        || containsProperty(CSSPropertyPerspective)
67
        // CSS transforms
72
        // CSS transforms
68
        || containsProperty(CSSPropertyTransform)
73
        || containsProperty(CSSPropertyTransform)
69
        || containsProperty(CSSPropertyTransformStyle)
74
        || containsProperty(CSSPropertyTransformStyle)
- a/Source/WebCore/rendering/style/WillChangeData.h +1 lines
Lines 52-57 public: a/Source/WebCore/rendering/style/WillChangeData.h_sec1
52
    bool containsContents() const;
52
    bool containsContents() const;
53
    bool containsProperty(CSSPropertyID) const;
53
    bool containsProperty(CSSPropertyID) const;
54
54
55
    bool createsContainingBlockForAbsolutelyPositioned() const;
55
    bool createsContainingBlockForOutOfFlowPositioned() const;
56
    bool createsContainingBlockForOutOfFlowPositioned() const;
56
    bool canCreateStackingContext() const { return m_canCreateStackingContext; }
57
    bool canCreateStackingContext() const { return m_canCreateStackingContext; }
57
    bool canTriggerCompositing() const { return m_canTriggerCompositing; }
58
    bool canTriggerCompositing() const { return m_canTriggerCompositing; }
- a/LayoutTests/ChangeLog +18 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2021-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
        This partially undoes r276627 which made will-change: position create a CB for all out-of-flow elements:
9
10
        - Removed CSSPropertyPosition from createsContainingBlockForOutOfFlowPositioned() to not create a containing block
11
        for position: fixed; children.
12
        - Added createsContainingBlockForAbsolutelyPositioned() with CSSPropertyPosition to still create a containing block
13
        for position: absolute; children.
14
15
        Enabled WPT (which covers both cases): css/css-will-change/will-change-fixpos-cb-position-1.html
16
17
        * TestExpectations:
18
1
2021-05-16  Sam Weinig  <weinig@apple.com>
19
2021-05-16  Sam Weinig  <weinig@apple.com>
2
20
3
        Add support for creating/accessing/setting non-sRGB ImageData via canvas
21
        Add support for creating/accessing/setting non-sRGB ImageData via canvas
- a/LayoutTests/TestExpectations -1 lines
Lines 4859-4865 webkit.org/b/224928 imported/w3c/web-platform-tests/css/css-will-change/will-cha a/LayoutTests/TestExpectations_sec1
4859
webkit.org/b/225035 imported/w3c/web-platform-tests/css/css-will-change/will-change-fixedpos-cb-002.html [ ImageOnlyFailure ]
4859
webkit.org/b/225035 imported/w3c/web-platform-tests/css/css-will-change/will-change-fixedpos-cb-002.html [ ImageOnlyFailure ]
4860
webkit.org/b/225034 imported/w3c/web-platform-tests/css/css-will-change/will-change-fixedpos-cb-003.html [ ImageOnlyFailure ]
4860
webkit.org/b/225034 imported/w3c/web-platform-tests/css/css-will-change/will-change-fixedpos-cb-003.html [ ImageOnlyFailure ]
4861
webkit.org/b/225442 imported/w3c/web-platform-tests/css/css-will-change/will-change-fixpos-cb-contain-1.html [ ImageOnlyFailure ]
4861
webkit.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 ]
4863
webkit.org/b/224902 [ Debug ] imported/w3c/web-platform-tests/css/css-will-change/parsing/will-change-invalid.html [ Skip ]
4862
webkit.org/b/224902 [ Debug ] imported/w3c/web-platform-tests/css/css-will-change/parsing/will-change-invalid.html [ Skip ]
4864
4863
4865
# Implement offset-* properties
4864
# Implement offset-* properties

Return to Bug 225443