Closed
Bug 1379922
Opened 7 years ago
Closed 7 years ago
stylo: make grid-template-areas/columns/rows animatable
Categories
(Core :: CSS Parsing and Computation, enhancement, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox55 | --- | wontfix |
firefox56 | --- | wontfix |
firefox57 | --- | fixed |
People
(Reporter: daisuke, Assigned: daisuke)
References
Details
Attachments
(2 files, 3 obsolete files)
Need to make following properties animatable discretely.
* grid-template-areas
* grid-template-columns
* grid-template-rows
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8891945 [details]
Bug 1379922 - Part 2: Support calc for fit-content().
https://reviewboard.mozilla.org/r/162976/#review168264
::: commit-message-380ae:1
(Diff revision 1)
> +Bug 1379922 - Part 2: fit-content() should support calc. r?hiro
Support calc for fit-content().
dholbert taught me that "do not use 'should' in the summary of the commit message". Also I did remember I told it to you at the last all hands. :)
Attachment #8891945 -
Flags: review?(hikezoe) → review+
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8891947 [details]
Bug 1379922 - Part 4: remove test fail annotations from meta in wpt.
https://reviewboard.mozilla.org/r/162980/#review168268
Attachment #8891947 -
Flags: review?(hikezoe) → review+
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8891944 [details]
Bug 1379922 - Part 1: make grid-template-areas animatable.
https://reviewboard.mozilla.org/r/162974/#review168260
::: commit-message-3a747:3
(Diff revision 1)
> +Bug 1379922 - Part 1: make grid-template-areas animatable. r?hiro
> +
> +grid-template-areas property should animate discretely.
I don't think this message is necessary.
Attachment #8891944 -
Flags: review?(hikezoe) → review+
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8891946 [details]
Bug 1379922 - Part 3: make grid-template-columns/rows animatable.
https://reviewboard.mozilla.org/r/162978/#review168584
I asked waffles on IRC to review this. Thank you waffles!
Updated•7 years ago
|
Attachment #8891946 -
Flags: review?(hikezoe) → review?(wafflespeanut)
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8891946 [details]
Bug 1379922 - Part 3: make grid-template-columns/rows animatable.
https://reviewboard.mozilla.org/r/162978/#review168604
::: servo/components/style/properties/gecko.mako.rs:1601
(Diff revision 1)
> + }
> +
> + #[inline]
> + fn to_boxed_customident_slice(gecko_names: &nsTArray<nsStringRepr>) -> Box<[CustomIdent]> {
> + let idents: Vec<CustomIdent> =
> + gecko_names.iter().map(|gecko_name| {
Nit: This line isn't really long. It could just be inlined along with the previous line.
::: servo/components/style/properties/gecko.mako.rs:1618
(Diff revision 1)
> + }
> +
> + if ${self_grid}.mIsSubgrid() {
> + let mut names_vec = to_line_names_vec(&${self_grid}.mLineNameLists);
> + let fill_idx =
> + if ${self_grid}.mIsAutoFill() {
Nit: Please write it like,
```rust
let fill_idx = if ${self_grid}.mIsAutoFill() {
//
} else {
//
};
```
::: servo/components/style/properties/gecko.mako.rs:1620
(Diff revision 1)
> + if ${self_grid}.mIsSubgrid() {
> + let mut names_vec = to_line_names_vec(&${self_grid}.mLineNameLists);
> + let fill_idx =
> + if ${self_grid}.mIsAutoFill() {
> + names_vec.insert(
> + ${self_grid}.mRepeatAutoIndex as usize,
Nit: Might be worth to have the index and the value as a variable above.
::: servo/components/style/properties/gecko.mako.rs:1640
(Diff revision 1)
> + let min_max_iter = ${self_grid}.mMinTrackSizingFunctions.iter()
> + .zip(${self_grid}.mMaxTrackSizingFunctions.iter());
> + for (i, (gecko_min, gecko_max)) in min_max_iter.enumerate() {
> + let track_size = TrackSize::from_gecko_style_coords(gecko_min, gecko_max);
> +
> + if i == ${self_grid}.mRepeatAutoIndex as usize {
Nit: We seem to be using the repeat index a lot, so it's probably better to have it in a variable in the top than casting every time in the loop.
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8891944 [details]
Bug 1379922 - Part 1: make grid-template-areas animatable.
https://reviewboard.mozilla.org/r/162974/#review168594
::: servo/components/style/properties/gecko.mako.rs:1622
(Diff revision 1)
> + pub fn clone_grid_template_areas(&self) -> longhands::grid_template_areas::computed_value::T {
> + use properties::longhands::grid_template_areas::{NamedArea, TemplateAreas};
> + use std::ops::Range;
> +
> + if self.gecko.mGridTemplateAreas.mRawPtr.is_null() {
> + return Either::Second(::values::None_);
Nit: Import the value above please.
::: servo/components/style/properties/gecko.mako.rs:1631
(Diff revision 1)
> + let areas = unsafe {
> + let vec: Vec<NamedArea> =
> + (*gecko_grid_template_areas).mNamedAreas.iter().map(|gecko_name_area| {
> + let name = gecko_name_area.mName.to_string().into_boxed_str();
> + let rows =
> + Range{ start: gecko_name_area.mRowStart, end: gecko_name_area.mRowEnd };
Nit: Please have a space between struct names and the open curly braces (here and everywhere).
We usually go for something like,
```rust
let rows = Range {
start: ...,
end: ...
};
```
Comment 11•7 years ago
|
||
It looks good to me. Mostly just style nits. r=me after fixing that :)
Assignee | ||
Comment 12•7 years ago
|
||
(In reply to Ravi Shankar [:waffles] from comment #11)
> It looks good to me. Mostly just style nits. r=me after fixing that :)
Thank you very much, waffles!
I'll fix those soon!
Updated•7 years ago
|
Attachment #8891946 -
Flags: review?(wafflespeanut)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 17•7 years ago
|
||
Comment 18•7 years ago
|
||
mozreview-review |
Comment on attachment 8891946 [details]
Bug 1379922 - Part 3: make grid-template-columns/rows animatable.
https://reviewboard.mozilla.org/r/162978/#review168644
r+ on behalf of waffles.
Attachment #8891946 -
Flags: review+
Assignee | ||
Comment 19•7 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #18)
> Comment on attachment 8891946 [details]
> Bug 1379922 - Part 3: make grid-template-columns/rows animatable.
>
> https://reviewboard.mozilla.org/r/162978/#review168644
>
> r+ on behalf of waffles.
Thanks, Hiro!
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8891944 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #8891945 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #8891946 -
Attachment is obsolete: true
Attachment #8891946 -
Flags: review?(wafflespeanut)
Comment 21•7 years ago
|
||
Pushed by dakatsuka@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/406fa7a9a33d
Part 4: remove test fail annotations from meta in wpt. r=hiro
Assignee | ||
Comment 22•7 years ago
|
||
Updated•7 years ago
|
Priority: -- → P2
Comment 23•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•7 years ago
|
status-firefox55:
--- → wontfix
status-firefox56:
--- → wontfix
status-firefox-esr52:
--- → unaffected
You need to log in
before you can comment on or make changes to this bug.
Description
•