|
|
Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
|
Source map for stylesheet text produced by concatenating <style> text/CDATA children. More...
#include "donner/svg/components/StylesheetComponent.h"
Public Member Functions | |
| void | addSegment (std::size_t cssStartOffset, std::size_t cssEndOffset, FileOffset documentStartOffset) |
| Add one local-CSS to document-source mapping segment. | |
| bool | empty () const |
| Return true when no local CSS offsets can be mapped to document source. | |
| std::optional< SourceRange > | mapToDocumentSource (const SourceRange &localRange) const |
| Map a local CSS source range back to the SVG document source. | |
| std::optional< std::size_t > | mapToLocalCssOffset (std::size_t documentOffset) const |
| Map a document source offset back to this stylesheet's local CSS offset. | |
| std::span< const StylesheetSourceMapSegment > | segments () const |
| Get the stored mapping segments. | |
Source map for stylesheet text produced by concatenating <style> text/CDATA children.
| void donner::svg::components::StylesheetSourceMap::addSegment | ( | std::size_t | cssStartOffset, |
| std::size_t | cssEndOffset, | ||
| FileOffset | documentStartOffset ) |
Add one local-CSS to document-source mapping segment.
| cssStartOffset | First local CSS byte covered by this segment. |
| cssEndOffset | First local CSS byte after this segment. |
| documentStartOffset | Document source offset for cssStartOffset. |
| std::optional< SourceRange > donner::svg::components::StylesheetSourceMap::mapToDocumentSource | ( | const SourceRange & | localRange | ) | const |
Map a local CSS source range back to the SVG document source.
| localRange | Range in the parsed CSS string. |
std::nullopt when either endpoint is unmappable. | std::optional< std::size_t > donner::svg::components::StylesheetSourceMap::mapToLocalCssOffset | ( | std::size_t | documentOffset | ) | const |
Map a document source offset back to this stylesheet's local CSS offset.
| documentOffset | Offset in the SVG document source. |
std::nullopt if documentOffset is outside this stylesheet.