mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
layout: Implement ordered lists, CSS counters, and quotes
per CSS 2.1
§ 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.
This commit is contained in:
parent
417a932e30
commit
30fd28d107
36 changed files with 1734 additions and 495 deletions
29
tests/ref/counters_nested_ref.html
Normal file
29
tests/ref/counters_nested_ref.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- Tests that `counters` works with nested counters. -->
|
||||
<style>
|
||||
h1, h2, h3 {
|
||||
font-size: 24px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<section>
|
||||
<h1>1. Foo</h1>
|
||||
<section>
|
||||
<h2>1.1. Boo</h2>
|
||||
<h2>1.2. Quux</h2>
|
||||
<section>
|
||||
<h3>1.2.1. Blah</h3>
|
||||
</section>
|
||||
</section>
|
||||
<h1>1.3. Bar</h1>
|
||||
<section></section>
|
||||
<h2>1.1. Boo</h2>
|
||||
<h2>1.2. Quux</h2>
|
||||
<h1>1.3. Baz</h1>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue