counter(page) and counter(pages) support in @page margin boxes.
Still no support for generic counters, only the two magical pagination
counters. It may be that we should integrate those more closely with the
counters machinery, but the main exercise with this CL is to add logic
for re-laying out if needed when the total page count is known.
Furthermore, the "page" and "pages" counters are expected to interact
with the document contents, so that you can add, say:
div::before { "Just so you know, you are on page " counter(page); }
But we don't support that yet. Then again, that really only becomes
useful if we are to add support for cross references [1], so that you
could e.g. create a table of contents with correct page numbers for
free.
[1] https://www.w3.org/TR/css-content-3/#cross-references
Bug: 40529222
Change-Id: Id93b4ad8b06ee364f7407f8d642115372da1406c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5701781
Commit-Queue: Morten Stenshorne mstensho@chromium.org
Reviewed-by: Ian Kilpatrick ikilpatrick@chromium.org
Cr-Commit-Position: refs/heads/main@{#1327390}