Diff
Modified: branches/safari-601-branch/LayoutTests/ChangeLog (193520 => 193521)
--- branches/safari-601-branch/LayoutTests/ChangeLog 2015-12-05 18:30:21 UTC (rev 193520)
+++ branches/safari-601-branch/LayoutTests/ChangeLog 2015-12-05 18:30:26 UTC (rev 193521)
@@ -1,5 +1,29 @@
2015-12-05 Matthew Hanson <matthew_han...@apple.com>
+ Merge r190667. rdar://problem/23769584
+
+ 2015-10-06 Simon Fraser <simon.fra...@apple.com>
+
+ will-change should trigger stacking context based purely on properties
+ https://bugs.webkit.org/show_bug.cgi?id=148068
+
+ Reviewed by Zalan Bujtas.
+
+ Previously, our will-change implementation didn't trigger stacking context
+ on an inline if the will-change property didn't apply to inlines (like 'transform').
+ However, this doesn't agree with the CSS-WG consensus (https://lists.w3.org/Archives/Public/www-style/2015Sep/0112.html).
+
+ Change behavior to have stacking context creation behavior for will-change be
+ identical for inlines and blocks.
+
+ * platform/mac/TestExpectations: Fails on Mavericks because no backdrop-filter there.
+ * fast/css/will-change/resources/will-change-stacking-helper.js:
+ (makeStackingInline):
+ * fast/css/will-change/will-change-creates-stacking-context-inline-expected.html: Added.
+ * fast/css/will-change/will-change-creates-stacking-context-inline.html: Added.
+
+2015-12-05 Matthew Hanson <matthew_han...@apple.com>
+
Merge r188604. rdar://problem/23769584
2015-08-18 Simon Fraser <simon.fra...@apple.com>
Modified: branches/safari-601-branch/LayoutTests/fast/css/will-change/resources/will-change-stacking-helper.js (193520 => 193521)
--- branches/safari-601-branch/LayoutTests/fast/css/will-change/resources/will-change-stacking-helper.js 2015-12-05 18:30:21 UTC (rev 193520)
+++ branches/safari-601-branch/LayoutTests/fast/css/will-change/resources/will-change-stacking-helper.js 2015-12-05 18:30:26 UTC (rev 193521)
@@ -27,7 +27,7 @@
{ 'property' : '-webkit-flow-from', 'stacking' : true },
];
-function makeStackingBlock(stackingProperty, value)
+function makeStackingElement(stackingProperty, value)
{
var container = document.createElement('div');
container.className = 'container';
@@ -48,4 +48,3 @@
document.body.appendChild(container);
}
-
Modified: branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-expected.html (193520 => 193521)
--- branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-expected.html 2015-12-05 18:30:21 UTC (rev 193520)
+++ branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-expected.html 2015-12-05 18:30:26 UTC (rev 193521)
@@ -45,7 +45,7 @@
function doTest()
{
for (value of willChangeValues) {
- makeStackingBlock('z-index', value.stacking ? '0' : 'auto');
+ makeStackingElement('z-index', value.stacking ? '0' : 'auto');
}
}
Copied: branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-inline-expected.html (from rev 193520, branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-expected.html) (0 => 193521)
--- branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-inline-expected.html (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-inline-expected.html 2015-12-05 18:30:26 UTC (rev 193521)
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .container {
+ display: inline-block;
+ margin: 25px;
+ width: 50px;
+ height: 50px;
+ position: relative;
+ border: 1px solid black;
+ }
+
+ .container div {
+ width: 100%;
+ height: 100%;
+ }
+
+ .potential-stacking-context {
+ z-index: auto;
+ background-color: silver;
+ display: inline;
+ padding: 20px;
+ }
+
+ .child {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ z-index: 1;
+ background-color: orange;
+ }
+
+ .interposer {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+ z-index: 0;
+ background-color: green;
+ }
+ </style>
+
+ <script src=""
+ <script>
+ function doTest()
+ {
+ for (value of willChangeValues) {
+ makeStackingElement('opacity', value.stacking ? '0.999999' : '1');
+ }
+ }
+
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+</body>
+</html>
Copied: branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-inline.html (from rev 193520, branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-expected.html) (0 => 193521)
--- branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-inline.html (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-inline.html 2015-12-05 18:30:26 UTC (rev 193521)
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .container {
+ display: inline-block;
+ margin: 25px;
+ width: 50px;
+ height: 50px;
+ position: relative;
+ border: 1px solid black;
+ }
+
+ .container div {
+ width: 100%;
+ height: 100%;
+ }
+
+ .potential-stacking-context {
+ z-index: auto;
+ background-color: silver;
+ display: inline;
+ padding: 20px;
+ }
+
+ .child {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ z-index: 1;
+ background-color: orange;
+ }
+
+ .interposer {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+ z-index: 0;
+ background-color: green;
+ }
+ </style>
+
+ <script src=""
+ <script>
+ function doTest()
+ {
+ for (value of willChangeValues) {
+ makeStackingElement('will-change', value.property);
+ }
+ }
+
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+</body>
+</html>
Modified: branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context.html (193520 => 193521)
--- branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context.html 2015-12-05 18:30:21 UTC (rev 193520)
+++ branches/safari-601-branch/LayoutTests/fast/css/will-change/will-change-creates-stacking-context.html 2015-12-05 18:30:26 UTC (rev 193521)
@@ -45,7 +45,7 @@
function doTest()
{
for (value of willChangeValues) {
- makeStackingBlock('will-change', value.property);
+ makeStackingElement('will-change', value.property);
}
}
Modified: branches/safari-601-branch/LayoutTests/platform/mac/TestExpectations (193520 => 193521)
--- branches/safari-601-branch/LayoutTests/platform/mac/TestExpectations 2015-12-05 18:30:21 UTC (rev 193520)
+++ branches/safari-601-branch/LayoutTests/platform/mac/TestExpectations 2015-12-05 18:30:26 UTC (rev 193521)
@@ -1338,6 +1338,9 @@
accessibility/color-well.html [ Skip ]
fast/forms/color [ Skip ]
+# No support for Filters Level 2
+[ Mavericks ] fast/css/will-change/will-change-creates-stacking-context-inline.html [ ImageOnlyFailure ]
+
# ENABLE_WILL_REVEAL_EDGE_EVENTS
fast/events/will-reveal-edge-on-div.html [ Skip ]
fast/events/will-reveal-edges-body-attributes.html [ Skip ]
Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193520 => 193521)
--- branches/safari-601-branch/Source/WebCore/ChangeLog 2015-12-05 18:30:21 UTC (rev 193520)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog 2015-12-05 18:30:26 UTC (rev 193521)
@@ -1,5 +1,36 @@
2015-12-05 Matthew Hanson <matthew_han...@apple.com>
+ Merge r190667. rdar://problem/23769584
+
+ 2015-10-06 Simon Fraser <simon.fra...@apple.com>
+
+ will-change should trigger stacking context based purely on properties
+ https://bugs.webkit.org/show_bug.cgi?id=148068
+
+ Reviewed by Zalan Bujtas.
+
+ Previously, our will-change implementation didn't trigger stacking context
+ on an inline if the will-change property didn't apply to inlines (like 'transform').
+ However, this doesn't agree with the CSS-WG consensus (https://lists.w3.org/Archives/Public/www-style/2015Sep/0112.html).
+
+ Change behavior to have stacking context creation behavior for will-change be
+ identical for inlines and blocks.
+
+ Test: fast/css/will-change/will-change-creates-stacking-context-inline.html
+
+ * rendering/RenderInline.cpp:
+ (WebCore::inFlowPositionedInlineAncestor):
+ * rendering/RenderInline.h:
+ (WebCore::RenderInline::willChangeCreatesStackingContext):
+ * rendering/style/WillChangeData.cpp:
+ (WebCore::propertyCreatesStackingContext):
+ (WebCore::WillChangeData::addFeature):
+ (WebCore::propertyCreatesStackingContextOnBoxesOnly): Deleted.
+ * rendering/style/WillChangeData.h:
+ (WebCore::WillChangeData::canCreateStackingContextOnInline): Deleted.
+
+2015-12-05 Matthew Hanson <matthew_han...@apple.com>
+
Merge r188604. rdar://problem/23769584
2015-08-18 Simon Fraser <simon.fra...@apple.com>
Modified: branches/safari-601-branch/Source/WebCore/rendering/RenderInline.cpp (193520 => 193521)
--- branches/safari-601-branch/Source/WebCore/rendering/RenderInline.cpp 2015-12-05 18:30:21 UTC (rev 193520)
+++ branches/safari-601-branch/Source/WebCore/rendering/RenderInline.cpp 2015-12-05 18:30:26 UTC (rev 193521)
@@ -136,7 +136,7 @@
return p;
p = p->parent();
}
- return 0;
+ return nullptr;
}
static void updateStyleOfAnonymousBlockContinuations(const RenderBlock& block, const RenderStyle* newStyle, const RenderStyle* oldStyle)
Modified: branches/safari-601-branch/Source/WebCore/rendering/RenderInline.h (193520 => 193521)
--- branches/safari-601-branch/Source/WebCore/rendering/RenderInline.h 2015-12-05 18:30:21 UTC (rev 193520)
+++ branches/safari-601-branch/Source/WebCore/rendering/RenderInline.h 2015-12-05 18:30:26 UTC (rev 193521)
@@ -179,7 +179,7 @@
bool willChangeCreatesStackingContext() const
{
- return style().willChange() && style().willChange()->canCreateStackingContextOnInline();
+ return style().willChange() && style().willChange()->canCreateStackingContext();
}
RenderLineBoxList m_lineBoxes; // All of the line boxes created for this inline flow. For example, <i>Hello<br>world.</i> will have two <i> line boxes.
Modified: branches/safari-601-branch/Source/WebCore/rendering/style/WillChangeData.cpp (193520 => 193521)
--- branches/safari-601-branch/Source/WebCore/rendering/style/WillChangeData.cpp 2015-12-05 18:30:21 UTC (rev 193520)
+++ branches/safari-601-branch/Source/WebCore/rendering/style/WillChangeData.cpp 2015-12-05 18:30:26 UTC (rev 193521)
@@ -65,6 +65,10 @@
static bool propertyCreatesStackingContext(CSSPropertyID property)
{
switch (property) {
+ case CSSPropertyPerspective:
+ case CSSPropertyTransform:
+ case CSSPropertyTransformStyle:
+ case CSSPropertyWebkitTransformStyle:
case CSSPropertyClipPath:
case CSSPropertyWebkitClipPath:
case CSSPropertyMask:
@@ -86,19 +90,6 @@
#if ENABLE(CSS_REGIONS)
case CSSPropertyWebkitFlowFrom:
#endif
- return true;
- default:
- return false;
- }
-}
-
-static bool propertyCreatesStackingContextOnBoxesOnly(CSSPropertyID property)
-{
- switch (property) {
- case CSSPropertyPerspective:
- case CSSPropertyTransform:
- case CSSPropertyTransformStyle:
- case CSSPropertyWebkitTransformStyle:
#if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
case CSSPropertyWebkitOverflowScrolling:
#endif
@@ -142,8 +133,7 @@
ASSERT(feature == Property || propertyID == CSSPropertyInvalid);
m_animatableFeatures.append(AnimatableFeature(feature, propertyID));
- m_canCreateStackingContextOnInline |= propertyCreatesStackingContext(propertyID);
- m_canCreateStackingContext |= m_canCreateStackingContextOnInline | propertyCreatesStackingContextOnBoxesOnly(propertyID);
+ m_canCreateStackingContext |= propertyCreatesStackingContext(propertyID);
m_canTriggerCompositingOnInline |= propertyTriggersCompositing(propertyID);
m_canTriggerCompositing |= m_canTriggerCompositingOnInline | propertyTriggersCompositingOnBoxesOnly(propertyID);
Modified: branches/safari-601-branch/Source/WebCore/rendering/style/WillChangeData.h (193520 => 193521)
--- branches/safari-601-branch/Source/WebCore/rendering/style/WillChangeData.h 2015-12-05 18:30:21 UTC (rev 193520)
+++ branches/safari-601-branch/Source/WebCore/rendering/style/WillChangeData.h 2015-12-05 18:30:26 UTC (rev 193521)
@@ -55,8 +55,6 @@
bool containsProperty(CSSPropertyID) const;
bool canCreateStackingContext() const { return m_canCreateStackingContext; }
- bool canCreateStackingContextOnInline() const { return m_canCreateStackingContextOnInline; }
-
bool canTriggerCompositing() const { return m_canTriggerCompositing; }
bool canTriggerCompositingOnInline() const { return m_canTriggerCompositingOnInline; }
@@ -124,7 +122,6 @@
Vector<AnimatableFeature, 1> m_animatableFeatures;
bool m_canCreateStackingContext { false };
- bool m_canCreateStackingContextOnInline { false };
bool m_canTriggerCompositing { false };
bool m_canTriggerCompositingOnInline { false };
};