Closed Bug 1215099 Opened 9 years ago Closed 9 years ago

[css-grid] An empty grid should still have one explicit grid line in each axis

Categories

(Core :: Layout, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox44 --- affected
firefox45 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

References

Details

Attachments

(2 files)

Somewhat recent spec change:
"If these properties don’t define any explicit tracks, the explicit grid
still contains one grid line in each axis."
https://drafts.csswg.org/css-grid/#grid-definition

So bug 1206703 needs to be reverted, and a small change to support
getting the position of that non-existent line 1 is needed.
Depends on: 1206703
This is a clean backout of bug 1206703, so I think you can rubberstamp it.
Attachment #8674218 - Flags: review?(dholbert)
Make GridLinePosition return nscoord(0) for this non-existent line 1
when the grid is empty.

This also adds back the grid-abspos-items-011 test, with an updated -ref.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=9d9fe384d7d2
Attachment #8674219 - Flags: review?(dholbert)
Comment on attachment 8674218 [details] [diff] [review]
part 1 - [css-grid] Backout bug 1206703.

Review of attachment 8674218 [details] [diff] [review]:
-----------------------------------------------------------------

rs=me on the clean backout
Attachment #8674218 - Flags: review?(dholbert) → review+
Comment on attachment 8674219 [details] [diff] [review]
part 2 - [css-grid] An empty grid should still have one explicit grid line in each axis.

Review of attachment 8674219 [details] [diff] [review]:
-----------------------------------------------------------------

r=me, w/ nits addressed

::: layout/reftests/css-grid/grid-abspos-items-011-ref.html
@@ +5,5 @@
> +-->
> +<html><head>
> +  <meta charset="utf-8">
> +  <title>CSS Grid Test: abs pos areas in empty grid</title>
> +  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">

Missing bug number in the URL here.

::: layout/reftests/css-grid/grid-abspos-items-011.html
@@ +5,5 @@
> +-->
> +<html><head>
> +  <meta charset="utf-8">
> +  <title>CSS Grid Test: abs pos areas in empty grid</title>
> +  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">

Missing bug number in the URL here.

@@ +41,5 @@
> +There should be no red areas.
> +<br clear="all">
> +
> +<div><span class="cs"></span></div>
> +<div class="green"><span class="ce red"></span></div>

The "red" CSS class that you use here isn't actually defined in this file. I think you might've left it out?  (You probably want to add one to the <style> block, or just remove it from the class attribute here if it's not actually needed.)
Attachment #8674219 - Flags: review?(dholbert) → review+
I fixed the test nits.
https://hg.mozilla.org/mozilla-central/rev/eb15cd3ed6fa
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: