Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

Bug 1312588 - Part 2: Support fit-content() in style.
ClosedPublic

Authored by boris on Mar 4 2021, 12:38 AM.
Referenced Files
Unknown Object (File)
Jul 10 2024, 11:25 AM
Unknown Object (File)
Jun 18 2024, 5:49 PM
Unknown Object (File)
Dec 6 2023, 4:39 PM
Unknown Object (File)
Dec 6 2023, 4:39 PM
Unknown Object (File)
Dec 6 2023, 7:34 AM
Unknown Object (File)
Nov 29 2023, 10:30 PM
Unknown Object (File)
Nov 29 2023, 10:29 PM
Unknown Object (File)
Nov 29 2023, 10:29 PM
Subscribers

Details

Summary

Support fit-content for preferred size, min size, and max size. This
patch only implement the style system. For layout part, we will do that
in the following patches.

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Lint
Lint Not Applicable
Unit
Tests Not Applicable
Build Status
Buildable 327173
Build 421170: arc lint + arc unit

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
boris retitled this revision from Bug 1312588 - Suppoert fit-content() in style. to Bug 1312588 - Support fit-content() in style..Mar 4 2021, 12:40 AM

The analysis task source-test-coverity-coverity failed, but we could not detect any issue.
Please check this task manually.

If you see a problem in this automated review, please report it here.

The analysis task source-test-coverity-coverity failed, but we could not detect any issue.
Please check this task manually.

If you see a problem in this automated review, please report it here.

boris retitled this revision from Bug 1312588 - Support fit-content() in style. to Bug 1312588 - Part 2: Support fit-content() in style..Apr 21 2021, 10:08 PM

Looks good, but I wonder why the Func thing in the name? We don't do that anywhere else.

servo/components/style/values/generics/length.rs
163

Why not just FitContent?

servo/components/style/values/specified/length.rs
1284

Can we avoid duplicating this?

servo/components/style/values/generics/length.rs
163

I expect we will update MozFitContent to FitContent in the future, so use FitContentFunc here.

servo/components/style/values/specified/length.rs
1284

Sure. I will factor this out to remove the duplicate. Thanks.

Use macro to remove the duplicates

emilio added a project: testing-approved.
emilio added inline comments.
servo/components/style/values/generics/length.rs
216

I think I'd still spell it FitContentFunction, but if you feel strongly about those extra characters feel free to leave it as-is.

This revision is now accepted and ready to land.Apr 30 2021, 11:29 AM
boris marked an inline comment as done.

Rename enum arm name, FitContentFunction and address comments

Addressed comments and rebased.