-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Support cross references by target-counter()/target-counters() #248
Commits on Jun 1, 2016
-
Support
target-counter()
/target-counters()
for counters on elements- `target-counter()`/`target-counters()` support for counters on elements, i.e., defined by `counter-reset`/`counter-increment` specified on elements. - Page-based counters are not yet taken into account in this implementation. - `attr()` function cannot be used inside `target-counter()`/`target-counters()` yet. - If target element is in a source document other than the current one (on which `target-counter()`/`target-counters()` is specified), the target counter cannot be retrieved and fallback to 0.
Configuration menu - View commit details
-
Copy full SHA for 433284f - Browse repository at this point
Copy the full SHA 433284fView commit details -
Support
attr()
function in the first argument oftarget-counter()
……/`target-counters()` function
Configuration menu - View commit details
-
Copy full SHA for eb48049 - Browse repository at this point
Copy the full SHA eb48049View commit details -
Merge functionalities of
vivliostyle.page.PageCounterStore
into `vi……vliostyle.counters.CounterStore` - `adapt.csscasc.PageCounterResolver` interface has been removed. Its methods are merged into `adapt.csscasc.CounterResolver`. - `vivliostyle.page.PageCounterStore` class has bee removed. Its functionalities are merged into `vivliostyle.counters.CounterStore`.
Configuration menu - View commit details
-
Copy full SHA for 6b43120 - Browse repository at this point
Copy the full SHA 6b43120View commit details -
[WIP] Support
target-counter()
/target-counters()
for page-based c……ounters - Only effective for a target ID such that the corresponding element is already laid out before the referring pseudoelement (i.e. the pseudoelement on which `target-counter()`/`target-counters()` is specified)
Configuration menu - View commit details
-
Copy full SHA for 6936785 - Browse repository at this point
Copy the full SHA 6936785View commit details -
Configuration menu - View commit details
-
Copy full SHA for 348f350 - Browse repository at this point
Copy the full SHA 348f350View commit details -
Refactoring: move a duplicate procedure rendering a single page into …
…a separate method
Configuration menu - View commit details
-
Copy full SHA for 5c0148f - Browse repository at this point
Copy the full SHA 5c0148fView commit details -
target-counter()
: re-layout pages with page number references when ……the target element is laid out - Added `vivliostyle.counters.TargetCounterReference` class. If no element-based counter id defined on the element specified by ID in `target-counter()` and the element has not been laid out yet, a `TargetCounterReference` object is saved in `CounterStore`. - When finishing layout of a page, elements with IDs and unresolved references that appeared on the page are collected. After that, it is deteremined that whether any unresolved references appeared so far can be resolved by the elements with IDs in the page. If there are any, each page containing such references are re-laid out, calling `renderSinglePage` method recursively. - Note that in this commit only a single page is re-laid out at a time, i.e., even if the end position of the page is changed as a result of the re-layout, the next page is not re-laid out. - TODO: take unresolved element-based (non page-based) counters into account (when the referenced element is in another source document in EPUB) - TODO: support `target-counters()` too. - TODO: control visibility of the re-laid out page appropriately.
Configuration menu - View commit details
-
Copy full SHA for 9d95b63 - Browse repository at this point
Copy the full SHA 9d95b63View commit details
Commits on Jun 6, 2016
-
Fix incorrect page reference in some cases
If an element with an ID does not fit in a page, the view node is removed and deferred to the next page. However, the ID and the element are registered to an `adapt.vtree.Page` object during creation of the view node and the regitration has not been removed even if the element does not fit in the page. This has been causing incorrect page references. In this commit, the registered IDs are checked after layout of the page. If the page container does not contain an element (elements) corresponding to a registered ID, the registration of the ID is removed.
Configuration menu - View commit details
-
Copy full SHA for 1d9d334 - Browse repository at this point
Copy the full SHA 1d9d334View commit details -
Refresh page display when a currently displayed page is re-laid out b…
…y resolutions of cross references
Configuration menu - View commit details
-
Copy full SHA for d5d7125 - Browse repository at this point
Copy the full SHA d5d7125View commit details
Commits on Jun 7, 2016
-
Configuration menu - View commit details
-
Copy full SHA for ede7e10 - Browse repository at this point
Copy the full SHA ede7e10View commit details -
Properly resolves references (by 'target-counter()') to another sourc…
…e document in the EPUB
Configuration menu - View commit details
-
Copy full SHA for f6211a0 - Browse repository at this point
Copy the full SHA f6211a0View commit details -
Make 'target-counter()` work even if the target URL points to another…
… source document in EPUB and does not have a fragment
Configuration menu - View commit details
-
Copy full SHA for 95e5ab9 - Browse repository at this point
Copy the full SHA 95e5ab9View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf1a2d9 - Browse repository at this point
Copy the full SHA cf1a2d9View commit details -
Optimize 'target-counter()' for a case where the target element comes…
… before the reference
Configuration menu - View commit details
-
Copy full SHA for 2767d8f - Browse repository at this point
Copy the full SHA 2767d8fView commit details -
Optimize 'target-counter()' for a case where the target element comes…
… before the reference
Configuration menu - View commit details
-
Copy full SHA for ff40b52 - Browse repository at this point
Copy the full SHA ff40b52View commit details -
Re-layout next page too if page break position has been moved by cros…
…s reference resolution
Configuration menu - View commit details
-
Copy full SHA for aed6cf9 - Browse repository at this point
Copy the full SHA aed6cf9View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff87651 - Browse repository at this point
Copy the full SHA ff87651View commit details -
Configuration menu - View commit details
-
Copy full SHA for f738271 - Browse repository at this point
Copy the full SHA f738271View commit details
Commits on Jun 8, 2016
-
Re-layout next page too if page break position has been moved by cros…
…s reference resolution *only if the next page has been already laid out*
Configuration menu - View commit details
-
Copy full SHA for 5bec940 - Browse repository at this point
Copy the full SHA 5bec940View commit details -
Mark the unresolved reference as resolved even if no counter with the…
… name is defined
Configuration menu - View commit details
-
Copy full SHA for ab3d9c9 - Browse repository at this point
Copy the full SHA ab3d9c9View commit details -
Prevent reference target from going back to the previous page by refe…
…rence resolution If a reference target is allowed to go back to a page earlier than one on which it was placed previously, reference resolution can lead to an infinite loop. To avoid infinite loops, a reference target is allowed to go to a page later than one on which it was placed previously, but it is not allowed to go back to an earlier page. If the target can fit in an earlier page, a page break is inserted just before the target and the target is laid out on the page on which it was placed previously. To represent the influence reference resolution has on layout, `adapt.layout.LayoutConstraint` interface is introduced. `allowLayout` method of `LayoutConstraint` receives a `NodeContext` and returns whether it can be laid out at the current position. In this case, a `NodeContext` is not allowed to be laid out at the current position if the page index of the current position is earlier than the index of the page on which the target was placed previously.
Configuration menu - View commit details
-
Copy full SHA for b0288a3 - Browse repository at this point
Copy the full SHA b0288a3View commit details -
Refresh cross reference that was already resolved from the beginning …
…when it has been moved to another page
Configuration menu - View commit details
-
Copy full SHA for 0d9973b - Browse repository at this point
Copy the full SHA 0d9973bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6aa423e - Browse repository at this point
Copy the full SHA 6aa423eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d151f1 - Browse repository at this point
Copy the full SHA 0d151f1View commit details