Skip to content

style: Move list quotes out of mako - #19154

Closed
cbrewster wants to merge 1 commit into
servo:masterfrom
cbrewster:list_quotes_nomako
Closed

cbrewster wants to merge 1 commit into
servo:masterfrom
cbrewster:list_quotes_nomako

Conversation

@cbrewster

@cbrewster cbrewster commented Nov 8, 2017 •

Copy link
Copy Markdown
Contributor

  • There are tests for these changes OR
  • These changes do not require tests because refactoring

This change is Reviewable

@highfive

highfive commented Nov 8, 2017

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @bholley: components/style/values/computed/list.rs, components/style/properties/longhand/list.mako.rs, components/style/values/specified/mod.rs, components/style/values/computed/mod.rs, components/style/values/specified/list.rs
  • @canaltinova: components/style/values/computed/list.rs, components/style/properties/longhand/list.mako.rs, components/style/values/specified/mod.rs, components/style/values/computed/mod.rs, components/style/values/specified/list.rs
  • @emilio: components/style/values/computed/list.rs, components/style/properties/longhand/list.mako.rs, components/style/values/specified/mod.rs, components/style/values/computed/mod.rs, components/style/values/specified/list.rs

@highfive

highfive commented Nov 8, 2017

Copy link
Copy Markdown

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 8, 2017
@cbrewster

Copy link
Copy Markdown
Contributor Author

r? @emilio

@highfive highfive assigned emilio and unassigned jdm Nov 8, 2017

@emilio emilio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, as usual, thanks a lot @cbrewster!

A couple nits, mostly about making this slightly nicer, but all of them are pre-existing, so feel free to file issues instead :)

}

let mut first = true;
for pair in &self.0 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This could read nicer, maybe with for &(ref first, ref second) in ..

Also I believe we have helpers to serialize this in a nicer way, and even derive(..) it? I think to recall SequenceWriter and css(comma).

Maybe converting the (String, String) into something like:

struct QuotePair {
    first: String,
    second: String,
}

You could derive this if tuples don't work... But not sure if worth though.


/// Specified and computed `quote` property
#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue)]
pub struct Quotes(pub Vec<(String, String)>);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These strings and this Vec should probably be box, to save space:

pub struct Quotes(pub Box<[(Box<str>, Box<str>)]>);

Not sure if you feel like fixing it, but if not please file an issue :)

@emilio emilio mentioned this pull request Nov 10, 2017
48 of 49 tasks
@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #19548) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Dec 14, 2017
@emilio

emilio commented Dec 14, 2017

Copy link
Copy Markdown
Member

I rebased this at #19556. Thanks!

@emilio emilio closed this Dec 14, 2017
bors-servo pushed a commit that referenced this pull request Dec 14, 2017
Move list quotes out of mako.

Rebase of #19154.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19556)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this pull request Dec 14, 2017
Move list quotes out of mako.

Rebase of #19154.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19556)
<!-- Reviewable:end -->
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Dec 15, 2017
…s-mako); r=emilio

Rebase of servo/servo#19154.

Source-Repo: https://github.com/servo/servo
Source-Revision: 26feea3be5bc70fed7a642ca768187d29469fee0

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 7e29dfb2e654d65b512942e77f2bb48c449df9b9
xeonchen pushed a commit to xeonchen/gecko-cinnabar that referenced this pull request Dec 15, 2017
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 2, 2019
…s-mako); r=emilio

Rebase of servo/servo#19154.

Source-Repo: https://github.com/servo/servo
Source-Revision: 26feea3be5bc70fed7a642ca768187d29469fee0

UltraBlame original commit: 1e60dbbef9973cccdaabfec0b40ee27be873a9da
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 2, 2019
…s-mako); r=emilio

Rebase of servo/servo#19154.

Source-Repo: https://github.com/servo/servo
Source-Revision: 26feea3be5bc70fed7a642ca768187d29469fee0

UltraBlame original commit: 1e60dbbef9973cccdaabfec0b40ee27be873a9da
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 2, 2019
…s-mako); r=emilio

Rebase of servo/servo#19154.

Source-Repo: https://github.com/servo/servo
Source-Revision: 26feea3be5bc70fed7a642ca768187d29469fee0

UltraBlame original commit: 1e60dbbef9973cccdaabfec0b40ee27be873a9da
gcp pushed a commit to gcp/enterprise-firefox-old that referenced this pull request Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants