#include <cstddef>#include <cstdint>#include <limits>#include <memory>#include <ostream>#include <span>#include <vector>#include "donner/base/Utils.h"#include "donner/css/Declaration.h"#include "donner/css/FontFace.h"#include "donner/css/Selector.h"Classes | |
| struct | donner::css::LayerNode |
| A layer name segment, scoped to its parent in the same sheet. More... | |
| struct | donner::css::LayerEvent |
| Source-order layer declarations and retained import positions. More... | |
| struct | donner::css::StylesheetLayers |
| Immutable sheet-local layer syntax, allocated only for a sheet that uses layers. More... | |
| struct | donner::css::EditedRuleWindow |
| Qualified rule indices replaced by a verified text splice. The two counts refer to the previous and updated stylesheet respectively; unaffected suffix rules may shift. More... | |
| struct | donner::css::SelectorRule |
| A rule in a stylesheet, which consists of a selector and a list of declarations. More... | |
| struct | donner::css::ImportRule |
| An unconditional @import rule retained by the stylesheet parser, such as @import url("theme.css");. More... | |
| class | donner::css::Stylesheet |
| A CSS stylesheet, which is a list of rules. More... | |
| struct | donner::css::Stylesheet::SecurityStats |
| Resource-limit accounting produced while parsing an untrusted stylesheet. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
| namespace | donner::css |
| Donner CSS library, a standalone composable CSS parser. | |
Typedefs | |
| using | donner::css::LayerId = std::uint16_t |
| One layer segment in the sheet's local layer tree. | |
Variables | |
| constexpr LayerId | donner::css::kUnlayered = std::numeric_limits<LayerId>::max() |
| The implicit sheet root and layer identity of unlayered rules. | |
| struct donner::css::LayerNode |
| struct donner::css::StylesheetLayers |
Immutable sheet-local layer syntax, allocated only for a sheet that uses layers.
| Class Members | ||
|---|---|---|
| vector< LayerEvent > | events | |
| vector< LayerId > | fontFaceLayers | Sheet-local layer of each font face, populated only when a face is layered. |
| vector< LayerNode > | nodes | |
| struct donner::css::EditedRuleWindow |
| struct donner::css::ImportRule |
An unconditional @import rule retained by the stylesheet parser, such as @import url("theme.css");.
Only imports that apply unconditionally are retained. Imports with supports() or media conditions other than all, and imports that appear after another rule, are diagnosed and dropped by the parser. The parser never resolves or fetches the URL; loading is the responsibility of the document that owns the stylesheet.
| Class Members | ||
|---|---|---|
| LayerId | layer = kUnlayered | Optional named or anonymous import layer. |
| FileOffset | sourceOffset = FileOffset::EndOfString() | Source position of the @ token in the local CSS source. |
| RcString | url | URL of the imported stylesheet, exactly as authored (unresolved). |
| struct donner::css::Stylesheet::SecurityStats |
Resource-limit accounting produced while parsing an untrusted stylesheet.