Commit 2f82bf09 authored by Manuel Rego Casasnovas's avatar Manuel Rego Casasnovas Committed by Commit Bot

[css-grid] Add deprecation message for the change on percentage rows

We're planning to update the behavior of percentage row tracks
and gutters when the grid container has an indefinite size
to match the last changes on the spec.

In the intent to implement and ship thread [1] it was agreed
to first add a deprecation message to notify web developers
about the upcoming change.

BUG=846187

[1] https://groups.google.com/a/chromium.org/d/msg/blink-dev/CJgcT4hR7Rk/58WfZNbWBQAJ

Change-Id: I5ca013615522d431c81bd96b6d12f61dd1846070
Reviewed-on: https://chromium-review.googlesource.com/1154531
Commit-Queue: Manuel Rego <rego@igalia.com>
Reviewed-by: default avatarPhilip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579014}
parent 9c5bb648
CONSOLE WARNING: line 1: Percentages row tracks and gutters for indefinite height grid containers will be resolved against the intrinsic height instead of being treated as auto and zero respectively. This change will happen in M70, around October 2018. See https://www.chromestatus.com/feature/6708326821789696 for more details.
Test that setting and getting grid-template-columns and grid-template-rows works as expected Test that setting and getting grid-template-columns and grid-template-rows works as expected
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
CONSOLE WARNING: line 1: Percentages row tracks and gutters for indefinite height grid containers will be resolved against the intrinsic height instead of being treated as auto and zero respectively. This change will happen in M70, around October 2018. See https://www.chromestatus.com/feature/6708326821789696 for more details.
Test that setting and getting grid-template-columns and grid-template-rows works as expected Test that setting and getting grid-template-columns and grid-template-rows works as expected
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
CONSOLE WARNING: Percentages row tracks and gutters for indefinite height grid containers will be resolved against the intrinsic height instead of being treated as auto and zero respectively. This change will happen in M70, around October 2018. See https://www.chromestatus.com/feature/6708326821789696 for more details.
This test has PASSED if it didn't CRASH on Debug builds. This test has PASSED if it didn't CRASH on Debug builds.
CONSOLE WARNING: line 1: Percentages row tracks and gutters for indefinite height grid containers will be resolved against the intrinsic height instead of being treated as auto and zero respectively. This change will happen in M70, around October 2018. See https://www.chromestatus.com/feature/6708326821789696 for more details.
Test that setting and getting grid-template-columns and grid-template-rows works as expected Test that setting and getting grid-template-columns and grid-template-rows works as expected
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
CONSOLE WARNING: line 48: Percentages row tracks and gutters for indefinite height grid containers will be resolved against the intrinsic height instead of being treated as auto and zero respectively. This change will happen in M70, around October 2018. See https://www.chromestatus.com/feature/6708326821789696 for more details.
This test checks that percentage track breadths of intrinsic size are treated as auto. This test checks that percentage track breadths of intrinsic size are treated as auto.
XXXXX XXXXX
......
CONSOLE WARNING: line 48: Percentages row tracks and gutters for indefinite height grid containers will be resolved against the intrinsic height instead of being treated as auto and zero respectively. This change will happen in M70, around October 2018. See https://www.chromestatus.com/feature/6708326821789696 for more details.
This test checks that percentages of indefinite sizes are treated as min-content (for the min track sizing function) or max-content (for the max track sizing function). This test checks that percentages of indefinite sizes are treated as min-content (for the min track sizing function) or max-content (for the max track sizing function).
XXX XXX
......
CONSOLE WARNING: line 48: Percentages row tracks and gutters for indefinite height grid containers will be resolved against the intrinsic height instead of being treated as auto and zero respectively. This change will happen in M70, around October 2018. See https://www.chromestatus.com/feature/6708326821789696 for more details.
This test checks that percentages of indefinite sizes are treated as min-content (for the min track sizing function) or max-content (for the max track sizing function). This test checks that percentages of indefinite sizes are treated as min-content (for the min track sizing function) or max-content (for the max track sizing function).
XXX XXX
......
CONSOLE WARNING: Percentages row tracks and gutters for indefinite height grid containers will be resolved against the intrinsic height instead of being treated as auto and zero respectively. This change will happen in M70, around October 2018. See https://www.chromestatus.com/feature/6708326821789696 for more details.
The test works as expected if it does not crash. The test works as expected if it does not crash.
CONSOLE WARNING: line 48: Percentages row tracks and gutters for indefinite height grid containers will be resolved against the intrinsic height instead of being treated as auto and zero respectively. This change will happen in M70, around October 2018. See https://www.chromestatus.com/feature/6708326821789696 for more details.
This test checks percentage track breadths are resolved properly regarding the container size. This test checks percentage track breadths are resolved properly regarding the container size.
XX XX
......
...@@ -573,6 +573,17 @@ DeprecationInfo GetDeprecationInfo(WebFeature feature) { ...@@ -573,6 +573,17 @@ DeprecationInfo GetDeprecationInfo(WebFeature feature) {
ReplacedWillBeRemoved("maxRetransmitTime", "maxPacketLifeTime", ReplacedWillBeRemoved("maxRetransmitTime", "maxPacketLifeTime",
kM70, "5198350873788416")}; kM70, "5198350873788416")};
case WebFeature::kGridRowTrackPercentIndefiniteHeight:
return {"GridRowTrackPercentIndefiniteHeight", kM70,
String::Format("Percentages row tracks and gutters for "
"indefinite height grid containers will be "
"resolved against the intrinsic height instead of "
"being treated as auto and zero respectively. "
"This change will happen in %s. See "
"https://www.chromestatus.com/feature/"
"6708326821789696 for more details.",
MilestoneString(kM70))};
// Features that aren't deprecated don't have a deprecation message. // Features that aren't deprecated don't have a deprecation message.
default: default:
return {"NotDeprecated", kUnknown, ""}; return {"NotDeprecated", kUnknown, ""};
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "third_party/blink/renderer/core/layout/grid_track_sizing_algorithm.h" #include "third_party/blink/renderer/core/layout/grid_track_sizing_algorithm.h"
#include "third_party/blink/renderer/core/frame/use_counter.h" #include "third_party/blink/renderer/core/frame/deprecation.h"
#include "third_party/blink/renderer/core/layout/grid.h" #include "third_party/blink/renderer/core/layout/grid.h"
#include "third_party/blink/renderer/core/layout/grid_layout_utils.h" #include "third_party/blink/renderer/core/layout/grid_layout_utils.h"
#include "third_party/blink/renderer/core/layout/layout_grid.h" #include "third_party/blink/renderer/core/layout/layout_grid.h"
...@@ -827,7 +827,8 @@ GridTrackSize GridTrackSizingAlgorithm::GetGridTrackSize( ...@@ -827,7 +827,8 @@ GridTrackSize GridTrackSizingAlgorithm::GetGridTrackSize(
// values are treated as <auto>. // values are treated as <auto>.
if (IsRelativeSizedTrackAsAuto(track_size, direction)) { if (IsRelativeSizedTrackAsAuto(track_size, direction)) {
if (direction == kForRows) { if (direction == kForRows) {
UseCounter::Count(layout_grid_->GetDocument(), Deprecation::CountDeprecation(
layout_grid_->GetDocument(),
WebFeature::kGridRowTrackPercentIndefiniteHeight); WebFeature::kGridRowTrackPercentIndefiniteHeight);
} }
if (min_track_breadth.HasPercentage()) if (min_track_breadth.HasPercentage())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment