Closed Bug 1221677 Opened 9 years ago Closed 9 years ago

[css-grid] Put the 'subgrid' support behind a pref, disabled by default

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: tschneider)

References

Details

(Keywords: dev-doc-needed)

Attachments

(1 file, 1 obsolete file)

The 'subgrid' feature is at-risk: https://drafts.csswg.org/css-grid/ Since we don't intend to support it in the initial release we should put the style system support we have behind a pref.
Assignee: nobody → schneider
Attached patch Patch 1: Pref out support for 'subgrid'. (obsolete) (deleted) — Splinter Review
Attachment #8686855 - Attachment description: Patch 1: Pref out support for subgrid X". → Patch 1: Pref out support for 'subgrid'.
Attachment #8686855 - Flags: review?(mats)
Comment on attachment 8686855 [details] [diff] [review] Patch 1: Pref out support for 'subgrid'. This looks great, thanks! A couple of nits: >layout/base/nsLayoutUtils.cpp >+nsLayoutUtils::IsGridTemplateSubgridValueEnabled() >+{ >+ static bool sGridTemplateSubgridValueEnabled; >+ static bool sTGridTemplateSubgridValueEnabledPrefCached = false; The first T in sTGrid... looks like a typo? Please remove that T so we follow the established naming scheme in surrounding code. >layout/style/nsCSSParser.cpp > if (ident->LowerCaseEqualsLiteral("subgrid")) { >+ if (!nsLayoutUtils::IsGridTemplateSubgridValueEnabled()) { >+ return false; >+ } I think it would be helpful to add an explicit error message in these places that explains to the author that we don't support 'subgrid' in this version. Something like: REPORT_UNEXPECTED(PESubgridNotSupported); with the associated message string: "The 'subgrid' keyword of CSS Grid isn't supported in this version." or something like that. >layout/style/test/property_database.js >+ if (IsCSSPropertyPrefEnabled("layout.css.grid-template-subgrid-value.enabled")) { >+ gCSSProperties["grid-template-columns"].other_values.push( > ... >+ gCSSProperties["grid-template-columns"].invalid_values.push( > ... Could you move the above two sections to just after the "gCSSProperties["grid-template-columns"] = ..." section? That way we will also include these into 'grid-template-rows' which follows and copies the values off -columns: http://mxr.mozilla.org/mozilla-central/source/layout/style/test/property_database.js#5864 >+ gCSSProperties["grid-templaye"].other_values.push( > ... Typo: s/templaye/template/ >+ gCSSProperties["grid-templaye"].invalid_values.push( Again. And move these two to just after the "gCSSProperties["grid-template"] =" section please.
Attachment #8686855 - Flags: feedback+
I think it would be good idea to submit two separate Try jobs for testing: one with the patch as is, and one with the pref set to true. (in both cases, "-u mochitests,reftest" should be sufficient I think)
Attachment #8686855 - Attachment is obsolete: true
Attachment #8686855 - Flags: review?(mats)
Attachment #8687392 - Flags: review?(mats)
Comment on attachment 8687392 [details] [diff] [review] Patch 1 (v2): Pref out support for 'subgrid'. Thanks, this look good to me. r=mats The Try jobs doesn't look good though. You we're probably just unlucky and used a bad revision as parent. Might be worth to rebase and resubmit?
Attachment #8687392 - Flags: review?(mats) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Depends on: 983175
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: