Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layout: Implement ordered lists, CSS counters, and `quotes` per CSS 2.1 § 12.3-12.5. #5067

Merged
merged 4 commits into from Mar 3, 2015

Conversation

@SimonSapin
Copy link
Member

SimonSapin commented Feb 25, 2015

Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
/r/rust), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.

Moved from #4544, because Critic.

Fixes #4544.

@highfive
Copy link

highfive commented Feb 25, 2015

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
@hoppipolla-critic-bot
Copy link

hoppipolla-critic-bot commented Feb 25, 2015

Critic review: https://critic.hoppipolla.co.uk/r/4104

This is an external review system which you may optionally use for the code review of your pull request.

In order to help critic track your changes, please do not make in-place history rewrites (e.g. via git rebase -i or git commit --amend) when updating this pull request.

@pcwalton
Copy link
Contributor

pcwalton commented Feb 26, 2015

@SimonSapin Did you want me to review the content property parsing refactor?

@SimonSapin
Copy link
Member Author

SimonSapin commented Feb 26, 2015

Yes please. (I’m still reviewing the rest of your changes.)

@SimonSapin
Copy link
Member Author

SimonSapin commented Feb 27, 2015

Done with the first round of review. I had rebased this when opening this new PR but it looks like it already conflicts with master again. Please wait until after review to rebase again.

pcwalton and others added 2 commits Jan 2, 2015
§ 12.3-12.5.

Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.
It wasn’t wrong, but it could be a lot shorter.

* Use try! and match_ignore_ascii_case! macros whenever possible
* Use expect_comma() instead of parse_comma_separated() when comma-separated values don’t have the same syntax
* Prefer Parser::expect_* methods over doing the same with Parser::next
* Take advantage of parse_nested_block returnin the return value of the closure
* Use try! more.
@SimonSapin SimonSapin force-pushed the counters branch from 5b06fa1 to 5080094 Mar 3, 2015
@SimonSapin

This comment has been minimized.

Copy link
Member Author

SimonSapin commented on 5080094 Mar 3, 2015

r+

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

saw approval from SimonSapin
at 5080094

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

merging servo/servo/counters = 5080094 into auto

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

servo/servo/counters = 5080094 merged ok, testing candidate = 4fa7216

@SimonSapin

This comment has been minimized.

Copy link
Member Author

SimonSapin commented on 5080094 Mar 3, 2015

r+

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

saw approval from SimonSapin
at 5080094

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

merging servo/servo/counters = 5080094 into auto

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

servo/servo/counters = 5080094 merged ok, testing candidate = 4fa7216

bors-servo pushed a commit that referenced this pull request Mar 3, 2015
Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.

Moved from #4544, because Critic.
@SimonSapin

This comment has been minimized.

Copy link
Member Author

SimonSapin commented on e209f5e Mar 3, 2015

r+

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

saw approval from SimonSapin
at e209f5e

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

merging servo/servo/counters = e209f5e into auto

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

servo/servo/counters = e209f5e merged ok, testing candidate = 56a21e5

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

@SimonSapin

This comment has been minimized.

Copy link
Member Author

SimonSapin commented on e209f5e Mar 3, 2015

r+

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

saw approval from SimonSapin
at e209f5e

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

merging servo/servo/counters = e209f5e into auto

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

servo/servo/counters = e209f5e merged ok, testing candidate = 56a21e5

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

bors-servo pushed a commit that referenced this pull request Mar 3, 2015
Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.

Moved from #4544, because Critic.
@SimonSapin

This comment has been minimized.

Copy link
Member Author

SimonSapin commented on 4c8bde5 Mar 3, 2015

r+

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

saw approval from SimonSapin
at 4c8bde5

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

merging servo/servo/counters = 4c8bde5 into auto

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

servo/servo/counters = 4c8bde5 merged ok, testing candidate = 5cd6316

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

fast-forwarding master to auto = 5cd6316

@SimonSapin

This comment has been minimized.

Copy link
Member Author

SimonSapin commented on 4c8bde5 Mar 3, 2015

r+

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

saw approval from SimonSapin
at 4c8bde5

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

merging servo/servo/counters = 4c8bde5 into auto

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

servo/servo/counters = 4c8bde5 merged ok, testing candidate = 5cd6316

This comment has been minimized.

Copy link
Contributor

bors-servo replied Mar 3, 2015

fast-forwarding master to auto = 5cd6316

bors-servo pushed a commit that referenced this pull request Mar 3, 2015
Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.

Moved from #4544, because Critic.

Fixes #4544.
@bors-servo bors-servo closed this Mar 3, 2015
@bors-servo bors-servo merged commit 4c8bde5 into master Mar 3, 2015
1 check passed
1 check passed
default all tests passed
@SimonSapin SimonSapin deleted the counters branch Mar 3, 2015
@SimonSapin SimonSapin restored the counters branch Mar 3, 2015
@SimonSapin SimonSapin deleted the counters branch Mar 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants
You can’t perform that action at this time.