Diff
Modified: trunk/LayoutTests/ChangeLog (190666 => 190667)
--- trunk/LayoutTests/ChangeLog 2015-10-07 14:59:11 UTC (rev 190666)
+++ trunk/LayoutTests/ChangeLog 2015-10-07 15:09:02 UTC (rev 190667)
@@ -1,3 +1,23 @@
+2015-10-06 Simon Fraser <[email protected]>
+
+ 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-10-07 Hunseop Jeong <[email protected]>
[EFL] fast/repaint/block-inputrange-repaint.html is failed.
Modified: trunk/LayoutTests/fast/css/will-change/resources/will-change-stacking-helper.js (190666 => 190667)
--- trunk/LayoutTests/fast/css/will-change/resources/will-change-stacking-helper.js 2015-10-07 14:59:11 UTC (rev 190666)
+++ trunk/LayoutTests/fast/css/will-change/resources/will-change-stacking-helper.js 2015-10-07 15:09:02 UTC (rev 190667)
@@ -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: trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-expected.html (190666 => 190667)
--- trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-expected.html 2015-10-07 14:59:11 UTC (rev 190666)
+++ trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-expected.html 2015-10-07 15:09:02 UTC (rev 190667)
@@ -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: trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-inline-expected.html (from rev 190666, trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-expected.html) (0 => 190667)
--- trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-inline-expected.html (rev 0)
+++ trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-inline-expected.html 2015-10-07 15:09:02 UTC (rev 190667)
@@ -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: trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-inline.html (from rev 190666, trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-expected.html) (0 => 190667)
--- trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-inline.html (rev 0)
+++ trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context-inline.html 2015-10-07 15:09:02 UTC (rev 190667)
@@ -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: trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context.html (190666 => 190667)
--- trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context.html 2015-10-07 14:59:11 UTC (rev 190666)
+++ trunk/LayoutTests/fast/css/will-change/will-change-creates-stacking-context.html 2015-10-07 15:09:02 UTC (rev 190667)
@@ -45,7 +45,7 @@
function doTest()
{
for (value of willChangeValues) {
- makeStackingBlock('will-change', value.property);
+ makeStackingElement('will-change', value.property);
}
}
Modified: trunk/LayoutTests/platform/mac/TestExpectations (190666 => 190667)
--- trunk/LayoutTests/platform/mac/TestExpectations 2015-10-07 14:59:11 UTC (rev 190666)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2015-10-07 15:09:02 UTC (rev 190667)
@@ -1306,6 +1306,7 @@
[ Mavericks ] compositing/media-controls-bar-appearance.html [ Skip ]
[ Mavericks ] compositing/media-controls-bar-appearance-big.html [ Skip ]
[ Mavericks ] fast/css/will-change/will-change-creates-stacking-context.html [ ImageOnlyFailure ]
+[ Mavericks ] fast/css/will-change/will-change-creates-stacking-context-inline.html [ ImageOnlyFailure ]
# Reftests have different expected results in Mavericks and Yosemite
[ Mavericks ] fast/ruby/ruby-expansion-cjk.html [ ImageOnlyFailure ]
Modified: trunk/Source/WebCore/ChangeLog (190666 => 190667)
--- trunk/Source/WebCore/ChangeLog 2015-10-07 14:59:11 UTC (rev 190666)
+++ trunk/Source/WebCore/ChangeLog 2015-10-07 15:09:02 UTC (rev 190667)
@@ -1,3 +1,30 @@
+2015-10-06 Simon Fraser <[email protected]>
+
+ 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-10-07 Javier Fernandez <[email protected]>
[CSS Grid Layout] Modify grid item height doesn't work
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (190666 => 190667)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2015-10-07 14:59:11 UTC (rev 190666)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2015-10-07 15:09:02 UTC (rev 190667)
@@ -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: trunk/Source/WebCore/rendering/RenderInline.h (190666 => 190667)
--- trunk/Source/WebCore/rendering/RenderInline.h 2015-10-07 14:59:11 UTC (rev 190666)
+++ trunk/Source/WebCore/rendering/RenderInline.h 2015-10-07 15:09:02 UTC (rev 190667)
@@ -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: trunk/Source/WebCore/rendering/style/WillChangeData.cpp (190666 => 190667)
--- trunk/Source/WebCore/rendering/style/WillChangeData.cpp 2015-10-07 14:59:11 UTC (rev 190666)
+++ trunk/Source/WebCore/rendering/style/WillChangeData.cpp 2015-10-07 15:09:02 UTC (rev 190667)
@@ -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: trunk/Source/WebCore/rendering/style/WillChangeData.h (190666 => 190667)
--- trunk/Source/WebCore/rendering/style/WillChangeData.h 2015-10-07 14:59:11 UTC (rev 190666)
+++ trunk/Source/WebCore/rendering/style/WillChangeData.h 2015-10-07 15:09:02 UTC (rev 190667)
@@ -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 };
};