[librsvg: 3/4] Wrap all URLs in rust-doc comments with angle brackets
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 3/4] Wrap all URLs in rust-doc comments with angle brackets
- Date: Wed, 16 Mar 2022 22:09:50 +0000 (UTC)
commit 4d3e8b6736f55e45ea2ae8ccb392b44e2c1bcb51
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Mar 16 12:09:13 2022 -0600
Wrap all URLs in rust-doc comments with angle brackets
It seems rustc started warning about those recently.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/682>
src/accept_language.rs | 8 +-
src/cond.rs | 2 +-
src/css.rs | 8 +-
src/error.rs | 2 +-
src/filter_func.rs | 24 +++---
src/filters/context.rs | 4 +-
src/font_props.rs | 34 ++++-----
src/layout.rs | 4 +-
src/limits.rs | 4 +-
src/parsers.rs | 12 +--
src/path_builder.rs | 4 +-
src/properties.rs | 6 +-
src/property_defs.rs | 202 +++++++++++++++++++++++++++----------------------
src/shapes.rs | 7 +-
src/style.rs | 4 +-
src/text.rs | 2 +-
src/transform.rs | 4 +-
src/viewbox.rs | 2 +-
src/xml/mod.rs | 2 +-
19 files changed, 180 insertions(+), 155 deletions(-)
---
diff --git a/src/accept_language.rs b/src/accept_language.rs
index 4034ed5eb..d980c21f6 100644
--- a/src/accept_language.rs
+++ b/src/accept_language.rs
@@ -48,7 +48,7 @@ struct Item {
/// Stores a parsed version of an HTTP Accept-Language header.
///
-/// <https://datatracker.ietf.org/doc/html/rfc7231#section-5.3.5>
+/// RFC 7231: <https://datatracker.ietf.org/doc/html/rfc7231#section-5.3.5>
#[derive(Clone, Debug, PartialEq)]
pub struct AcceptLanguage(Box<[Item]>);
@@ -74,7 +74,9 @@ impl fmt::Display for AcceptLanguageError {
}
}
-/// Optional whitespace, Space or Tab, per https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.3
+/// Optional whitespace, Space or Tab, per RFC 7230.
+///
+/// RFC 7230: <https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.3>
const OWS: [char; 2] = ['\x20', '\x09'];
impl AcceptLanguage {
@@ -165,7 +167,7 @@ impl Item {
/// A list of BCP47 language tags.
///
-/// https://www.rfc-editor.org/info/rfc5664
+/// RFC 5664: <https://www.rfc-editor.org/info/rfc5664>
#[derive(Debug, Clone, PartialEq)]
pub struct LanguageTags(Vec<LanguageTag>);
diff --git a/src/cond.rs b/src/cond.rs
index 401f6534d..0a147bec3 100644
--- a/src/cond.rs
+++ b/src/cond.rs
@@ -19,7 +19,7 @@ pub struct RequiredExtensions(pub bool);
impl RequiredExtensions {
/// Parse a requiredExtensions attribute.
///
- /// http://www.w3.org/TR/SVG/struct.html#RequiredExtensionsAttribute
+ /// <http://www.w3.org/TR/SVG/struct.html#RequiredExtensionsAttribute>
pub fn from_attribute(s: &str) -> Result<RequiredExtensions, ValueErrorKind> {
Ok(RequiredExtensions(
s.split_whitespace()
diff --git a/src/css.rs b/src/css.rs
index 3871d9ba5..e9b80bbda 100644
--- a/src/css.rs
+++ b/src/css.rs
@@ -718,7 +718,7 @@ impl selectors::Element for RsvgElement {
/// Returns whether this element matches `:empty`.
///
/// That is, whether it does not contain any child element or any non-zero-length text node.
- /// See http://dev.w3.org/csswg/selectors-3/#empty-pseudo
+ /// See <http://dev.w3.org/csswg/selectors-3/#empty-pseudo>.
fn is_empty(&self) -> bool {
// .all() returns true for the empty iterator
self.0
@@ -736,9 +736,11 @@ impl selectors::Element for RsvgElement {
}
}
-/// Origin for a stylesheet, per https://www.w3.org/TR/CSS22/cascade.html#cascading-order
+/// Origin for a stylesheet, per CSS 2.2.
///
/// This is used when sorting selector matches according to their origin and specificity.
+///
+/// CSS2.2: <https://www.w3.org/TR/CSS22/cascade.html#cascading-order>
#[derive(Copy, Clone, Eq, Ord, PartialEq, PartialOrd)]
pub enum Origin {
UserAgent,
@@ -760,7 +762,7 @@ pub struct Stylesheet {
///
/// This type implements `Ord` so a list of `Match` can be sorted.
/// That implementation does ordering based on origin and specificity
-/// as per https://www.w3.org/TR/CSS22/cascade.html#cascading-order
+/// as per <https://www.w3.org/TR/CSS22/cascade.html#cascading-order>.
struct Match<'a> {
specificity: u32,
origin: Origin,
diff --git a/src/error.rs b/src/error.rs
index 0cf70177b..1ca9bf0cc 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -95,7 +95,7 @@ pub enum DefsLookupErrorKind {
/// Used when the public API tries to look up an external URL, which is not allowed.
///
/// This catches the case where a public API wants to be misused to access an external
- /// resource. For example, `SvgHandle.has_sub("https://evil.com/phone_home#element_id") will
+ /// resource. For example, `SvgHandle.has_sub("https://evil.com/phone_home#element_id")` will
/// fail with this error.
CannotLookupExternalReferences,
diff --git a/src/filter_func.rs b/src/filter_func.rs
index 5820f38f5..019303ec5 100644
--- a/src/filter_func.rs
+++ b/src/filter_func.rs
@@ -33,7 +33,7 @@ use crate::unit_interval::UnitInterval;
/// CSS Filter functions from the Filter Effects Module Level 1
///
-/// https://www.w3.org/TR/filter-effects/#filter-functions
+/// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#filter-functions>
#[derive(Debug, Clone, PartialEq)]
pub enum FilterFunction {
Blur(Blur),
@@ -50,7 +50,7 @@ pub enum FilterFunction {
/// Parameters for the `blur()` filter function
///
-/// https://www.w3.org/TR/filter-effects/#funcdef-filter-blur
+/// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#funcdef-filter-blur>
#[derive(Debug, Clone, PartialEq)]
pub struct Blur {
std_deviation: Option<Length<Both>>,
@@ -58,7 +58,7 @@ pub struct Blur {
/// Parameters for the `brightness()` filter function
///
-/// https://www.w3.org/TR/filter-effects/#funcdef-filter-brightness
+/// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#funcdef-filter-brightness>
#[derive(Debug, Clone, PartialEq)]
pub struct Brightness {
proportion: Option<f64>,
@@ -66,7 +66,7 @@ pub struct Brightness {
/// Parameters for the `contrast()` filter function
///
-/// https://www.w3.org/TR/filter-effects/#funcdef-filter-contrast
+/// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#funcdef-filter-contrast>
#[derive(Debug, Clone, PartialEq)]
pub struct Contrast {
proportion: Option<f64>,
@@ -74,7 +74,7 @@ pub struct Contrast {
/// Parameters for the `drop-shadow()` filter function
///
-/// https://www.w3.org/TR/filter-effects/#funcdef-filter-drop-shadow
+/// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#funcdef-filter-drop-shadow>
#[derive(Debug, Clone, PartialEq)]
pub struct DropShadow {
color: Option<Color>,
@@ -85,7 +85,7 @@ pub struct DropShadow {
/// Parameters for the `grayscale()` filter function
///
-/// https://www.w3.org/TR/filter-effects/#funcdef-filter-grayscale
+/// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#funcdef-filter-grayscale>
#[derive(Debug, Clone, PartialEq)]
pub struct Grayscale {
proportion: Option<f64>,
@@ -93,7 +93,7 @@ pub struct Grayscale {
/// Parameters for the `hue-rotate()` filter function
///
-/// https://www.w3.org/TR/filter-effects/#funcdef-filter-huerotate
+/// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#funcdef-filter-huerotate>
#[derive(Debug, Clone, PartialEq)]
pub struct HueRotate {
angle: Option<Angle>,
@@ -101,7 +101,7 @@ pub struct HueRotate {
/// Parameters for the `invert()` filter function
///
-/// https://www.w3.org/TR/filter-effects/#funcdef-filter-invert
+/// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#funcdef-filter-invert>
#[derive(Debug, Clone, PartialEq)]
pub struct Invert {
proportion: Option<f64>,
@@ -109,7 +109,7 @@ pub struct Invert {
/// Parameters for the `opacity()` filter function
///
-/// https://www.w3.org/TR/filter-effects/#funcdef-filter-opacity
+/// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#funcdef-filter-opacity>
#[derive(Debug, Clone, PartialEq)]
pub struct Opacity {
proportion: Option<f64>,
@@ -117,7 +117,7 @@ pub struct Opacity {
/// Parameters for the `saturate()` filter function
///
-/// https://www.w3.org/TR/filter-effects/#funcdef-filter-saturate
+/// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#funcdef-filter-saturate>
#[derive(Debug, Clone, PartialEq)]
pub struct Saturate {
proportion: Option<f64>,
@@ -125,7 +125,7 @@ pub struct Saturate {
/// Parameters for the `sepia()` filter function
///
-/// https://www.w3.org/TR/filter-effects/#funcdef-filter-sepia
+/// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#funcdef-filter-sepia>
#[derive(Debug, Clone, PartialEq)]
pub struct Sepia {
proportion: Option<f64>,
@@ -367,7 +367,7 @@ impl Contrast {
impl DropShadow {
/// Converts a DropShadow into the set of filter element primitives.
///
- /// See https://www.w3.org/TR/filter-effects/#dropshadowEquivalent
+ /// See <https://www.w3.org/TR/filter-effects/#dropshadowEquivalent>.
fn to_filter_spec(&self, params: &NormalizeParams, default_color: RGBA) -> FilterSpec {
let user_space_filter = Filter::default().to_user_space(params);
let dx = self.dx.map(|l| l.to_user(params)).unwrap_or(0.0);
diff --git a/src/filters/context.rs b/src/filters/context.rs
index 40cfdffac..47ae32afb 100644
--- a/src/filters/context.rs
+++ b/src/filters/context.rs
@@ -197,7 +197,7 @@ impl FilterContext {
/// Returns a surface filled with the current stroke's paint, for `StrokePaint` inputs in primitives.
///
- /// https://www.w3.org/TR/filter-effects/#attr-valuedef-in-strokepaint
+ /// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#attr-valuedef-in-strokepaint>
fn stroke_paint_image(
&self,
acquired_nodes: &mut AcquiredNodes<'_>,
@@ -217,7 +217,7 @@ impl FilterContext {
/// Returns a surface filled with the current fill's paint, for `FillPaint` inputs in primitives.
///
- /// https://www.w3.org/TR/filter-effects/#attr-valuedef-in-fillpaint
+ /// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#attr-valuedef-in-fillpaint>
fn fill_paint_image(
&self,
acquired_nodes: &mut AcquiredNodes<'_>,
diff --git a/src/font_props.rs b/src/font_props.rs
index e2c9396f5..e4babe022 100644
--- a/src/font_props.rs
+++ b/src/font_props.rs
@@ -14,11 +14,11 @@ use crate::property_defs::{FontStretch, FontStyle, FontVariant};
/// `font` shorthand property.
///
-/// https://www.w3.org/TR/CSS2/fonts.html#font-shorthand
+/// CSS2: <https://www.w3.org/TR/CSS2/fonts.html#font-shorthand>
///
-/// https://www.w3.org/TR/css-fonts-3/#propdef-font
+/// CSS Fonts 3: <https://www.w3.org/TR/css-fonts-3/#propdef-font>
///
-/// https://drafts.csswg.org/css-fonts-4/#font-prop
+/// CSS Fonts 4: <https://drafts.csswg.org/css-fonts-4/#font-prop>
///
/// This is a shorthand, which expands to the longhands `font-family`, `font-size`, etc.
// servo/components/style/properties/shorthands/font.mako.rs is a good reference for this
@@ -172,11 +172,11 @@ fn parse_font_spec_identifiers<'i>(parser: &mut Parser<'i, '_>) -> Result<Font,
/// `font-size` property.
///
-/// https://www.w3.org/TR/SVG/text.html#FontSizeProperty
+/// SVG1.1: <https://www.w3.org/TR/SVG11/text.html#FontSizeProperty>
///
-/// https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#propdef-font-size
+/// CSS2: <https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#propdef-font-size>
///
-/// https://www.w3.org/TR/css-fonts-3/#font-size-prop
+/// CSS Fonts 3: <https://www.w3.org/TR/css-fonts-3/#font-size-prop>
#[allow(clippy::upper_case_acronyms)]
#[derive(Debug, Clone, PartialEq)]
pub enum FontSize {
@@ -276,9 +276,9 @@ impl Parse for FontSize {
/// `font-weight` property.
///
-/// https://drafts.csswg.org/css-fonts-4/#font-weight-prop
+/// CSS Fonts 3: <https://www.w3.org/TR/css-fonts-3/#propdef-font-weight>
///
-/// https://www.w3.org/TR/css-fonts-3/#propdef-font-weight
+/// CSS Fonts 4: <https://drafts.csswg.org/css-fonts-4/#font-weight-prop>
#[derive(Debug, Copy, Clone, PartialEq)]
pub enum FontWeight {
Normal,
@@ -368,9 +368,9 @@ impl FontWeight {
/// `letter-spacing` property.
///
-/// https://www.w3.org/TR/SVG/text.html#LetterSpacingProperty
+/// SVG1.1: <https://www.w3.org/TR/SVG11/text.html#LetterSpacingProperty>
///
-/// https://www.w3.org/TR/css-text-3/#letter-spacing-property
+/// CSS Text 3: <https://www.w3.org/TR/css-text-3/#letter-spacing-property>
#[derive(Debug, Clone, PartialEq)]
pub enum LetterSpacing {
Normal,
@@ -415,9 +415,7 @@ impl Parse for LetterSpacing {
/// `line-height` property.
///
-/// https://drafts.csswg.org/css2/visudet.html#propdef-line-height
-///
-/// https://www.w3.org/TR/CSS2/visudet.html#propdef-line-height
+/// CSS2: <https://www.w3.org/TR/CSS2/visudet.html#propdef-line-height>
#[derive(Debug, Clone, PartialEq)]
pub enum LineHeight {
Normal,
@@ -489,11 +487,11 @@ impl Parse for LineHeight {
/// `font-family` property.
///
-/// https://www.w3.org/TR/SVG/text.html#FontFamilyProperty
+/// SVG1.1: <https://www.w3.org/TR/SVG11/text.html#FontFamilyProperty>
///
-/// https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#propdef-font-family
+/// CSS 2: <https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#propdef-font-family>
///
-/// https://www.w3.org/TR/css-fonts-3/#font-family-prop
+/// CSS Fonts 3: <https://www.w3.org/TR/css-fonts-3/#font-family-prop>
#[derive(Debug, Clone, PartialEq)]
pub struct FontFamily(pub String);
@@ -539,9 +537,9 @@ impl FontFamily {
/// now it only takes values `auto`, `0deg`, `90deg`, `0`, `90`. At parsing time, this
/// gets translated to fixed enum values.
///
-/// https://www.w3.org/TR/css-writing-modes-3/#propdef-glyph-orientation-vertical
+/// CSS Writing Modes 3: <https://www.w3.org/TR/css-writing-modes-3/#propdef-glyph-orientation-vertical>
///
-/// Obsolete: https://www.w3.org/TR/SVG11/text.html#GlyphOrientationVerticalProperty
+/// Obsolete SVG1.1: <https://www.w3.org/TR/SVG11/text.html#GlyphOrientationVerticalProperty>
#[derive(Debug, Copy, Clone, PartialEq)]
pub enum GlyphOrientationVertical {
Auto,
diff --git a/src/layout.rs b/src/layout.rs
index 1a1fc54e1..f68eb1cf5 100644
--- a/src/layout.rs
+++ b/src/layout.rs
@@ -27,14 +27,14 @@ use crate::unit_interval::UnitInterval;
/// SVG Stacking context, an inner node in the layout tree.
///
-/// https://www.w3.org/TR/SVG2/render.html#EstablishingStackingContex
+/// <https://www.w3.org/TR/SVG2/render.html#EstablishingStackingContex>
///
/// This is not strictly speaking an SVG2 stacking context, but a
/// looser version of it. For example. the SVG spec mentions that a
/// an element should establish a stacking context if the `filter`
/// property applies to the element and is not `none`. In that case,
/// the element is rendered as an "isolated group" -
-/// https://www.w3.org/TR/2015/CR-compositing-1-20150113/#csscompositingrules_SVG
+/// <https://www.w3.org/TR/2015/CR-compositing-1-20150113/#csscompositingrules_SVG>
///
/// Here we store all the parameters that may lead to the decision to actually
/// render an element as an isolated group.
diff --git a/src/limits.rs b/src/limits.rs
index 906cfee60..c3e6703c9 100644
--- a/src/limits.rs
+++ b/src/limits.rs
@@ -3,8 +3,8 @@
/// Maximum number of times that elements can be referenced through URL fragments.
///
/// This is a mitigation for the security-related bugs:
-/// https://gitlab.gnome.org/GNOME/librsvg/issues/323
-/// https://gitlab.gnome.org/GNOME/librsvg/issues/515
+/// <https://gitlab.gnome.org/GNOME/librsvg/issues/323>
+/// <https://gitlab.gnome.org/GNOME/librsvg/issues/515>
///
/// Imagine the XML [billion laughs attack], but done in SVG's terms:
///
diff --git a/src/parsers.rs b/src/parsers.rs
index e227b8712..d15b4d1a2 100644
--- a/src/parsers.rs
+++ b/src/parsers.rs
@@ -92,7 +92,7 @@ impl Parse for NonNegative {
/// CSS number-optional-number
///
-/// https://www.w3.org/TR/SVG/types.html#DataTypeNumberOptionalNumber
+/// SVG1.1: <https://www.w3.org/TR/SVG11/types.html#DataTypeNumberOptionalNumber>
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct NumberOptionalNumber<T: Parse>(pub T, pub T);
@@ -112,7 +112,7 @@ impl<T: Parse + Copy> Parse for NumberOptionalNumber<T> {
/// CSS number-percentage
///
-/// https://www.w3.org/TR/css3-values/#typedef-number-percentage
+/// CSS Values and Units 3: <https://www.w3.org/TR/css3-values/#typedef-number-percentage>
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct NumberOrPercentage {
pub value: f64,
@@ -138,7 +138,7 @@ impl Parse for NumberOrPercentage {
impl Parse for i32 {
/// CSS integer
///
- /// <https://www.w3.org/TR/SVG11/types.html#DataTypeInteger>
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/types.html#DataTypeInteger>
fn parse<'i>(parser: &mut Parser<'i, '_>) -> Result<Self, ParseError<'i>> {
Ok(parser.expect_integer()?)
}
@@ -156,7 +156,7 @@ impl Parse for u32 {
}
}
-/// CSS number-list values.
+/// Number lists with bounds for the required and maximum number of items.
#[derive(Debug, PartialEq)]
pub struct NumberList<const REQUIRED: usize, const MAX: usize>(pub Vec<f64>);
@@ -219,7 +219,9 @@ macro_rules! parse_identifiers {
};
}
-/// https://www.w3.org/TR/css-values-4/#custom-idents
+/// CSS Custom identifier.
+///
+/// CSS Values and Units 4: <https://www.w3.org/TR/css-values-4/#custom-idents>
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct CustomIdent(pub String);
diff --git a/src/path_builder.rs b/src/path_builder.rs
index eb9449b89..1e6b5bd83 100644
--- a/src/path_builder.rs
+++ b/src/path_builder.rs
@@ -121,8 +121,8 @@ impl EllipticalArc {
///
/// Radii may be adjusted if there is no solution.
///
- /// See section B.2.4. Conversion from endpoint to center parameterization
- /// https://www.w3.org/TR/SVG2/implnote.html#ArcConversionEndpointToCenter
+ /// See section [B.2.4. Conversion from endpoint to center
+ /// parameterization](https://www.w3.org/TR/SVG2/implnote.html#ArcConversionEndpointToCenter)
pub(crate) fn center_parameterization(&self) -> ArcParameterization {
let Self {
r: (mut rx, mut ry),
diff --git a/src/properties.rs b/src/properties.rs
index eb5fc24c6..893afaf00 100644
--- a/src/properties.rs
+++ b/src/properties.rs
@@ -78,7 +78,7 @@ where
/// Whether a property also has a presentation attribute.
///
-/// https://svgwg.org/svg2-draft/styling.html#PresentationAttributes
+/// <https://svgwg.org/svg2-draft/styling.html#PresentationAttributes>
#[derive(PartialEq)]
enum PresentationAttr {
No,
@@ -135,14 +135,14 @@ impl ComputedValues {
/// Whether we should draw the element or skip both space allocation
/// and drawing.
- /// https://www.w3.org/TR/SVG2/render.html#VisibilityControl
+ /// <https://www.w3.org/TR/SVG2/render.html#VisibilityControl>
pub fn is_displayed(&self) -> bool {
self.display() != Display::None
}
/// Whether we should draw the element or allocate its space but
/// skip drawing.
- /// https://www.w3.org/TR/SVG2/render.html#VisibilityControl
+ /// <https://www.w3.org/TR/SVG2/render.html#VisibilityControl>
pub fn is_visible(&self) -> bool {
self.visibility() == Visibility::Visible
}
diff --git a/src/property_defs.rs b/src/property_defs.rs
index a28bf365e..435e14127 100644
--- a/src/property_defs.rs
+++ b/src/property_defs.rs
@@ -59,9 +59,9 @@ use crate::unit_interval::UnitInterval;
make_property!(
/// `baseline-shift` property.
///
- /// https://www.w3.org/TR/SVG/text.html#BaselineShiftProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/text.html#BaselineShiftProperty>
///
- /// https://www.w3.org/TR/SVG2/text.html#BaselineShiftProperty
+ /// SVG2: <https://www.w3.org/TR/SVG2/text.html#BaselineShiftProperty>
BaselineShift,
default: Length::<Both>::parse_str("0.0").unwrap(),
newtype: Length<Both>,
@@ -122,9 +122,9 @@ make_property!(
make_property!(
/// `clip-path` property.
///
- /// https://www.w3.org/TR/SVG/masking.html#ClipPathPropert
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/masking.html#ClipPathProperty>
///
- /// https://www.w3.org/TR/css-masking-1/#the-clip-path
+ /// CSS Masking 1: <https://www.w3.org/TR/css-masking-1/#the-clip-path>
ClipPath,
default: Iri::None,
inherits_automatically: false,
@@ -134,9 +134,9 @@ make_property!(
make_property!(
/// `clip-rule` property.
///
- /// https://www.w3.org/TR/SVG/masking.html#ClipRuleProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/masking.html#ClipRuleProperty>
///
- /// https://www.w3.org/TR/css-masking-1/#the-clip-rule
+ /// CSS Masking 1: <https://www.w3.org/TR/css-masking-1/#the-clip-rule>
ClipRule,
default: NonZero,
inherits_automatically: true,
@@ -149,9 +149,9 @@ make_property!(
make_property!(
/// `color` property, the fallback for `currentColor` values.
///
- /// https://www.w3.org/TR/SVG/color.html#ColorProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/color.html#ColorProperty>
///
- /// https://www.w3.org/TR/SVG2/painting.html#ColorProperty
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#ColorProperty>
///
/// The SVG spec allows the user agent to choose its own initial value for the "color"
/// property. Here we start with opaque black for the initial value. Clients can
@@ -168,9 +168,9 @@ make_property!(
make_property!(
/// `color-interpolation-filters` property.
///
- /// https://www.w3.org/TR/SVG11/painting.html#ColorInterpolationProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/painting.html#ColorInterpolationFiltersProperty>
///
- /// https://www.w3.org/TR/filter-effects/#propdef-color-interpolation-filters
+ /// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#propdef-color-interpolation-filters>
ColorInterpolationFilters,
default: LinearRgb,
inherits_automatically: true,
@@ -182,9 +182,11 @@ make_property!(
);
make_property!(
- /// `cx` attribute.
+ /// `cx` property.
///
- /// https://www.w3.org/TR/SVG2/geometry.html#CX
+ /// SVG2: <https://www.w3.org/TR/SVG2/geometry.html#CX>
+ ///
+ /// Note that in SVG1.1, this was an attribute, not a property.
CX,
default: Length::<Horizontal>::parse_str("0").unwrap(),
inherits_automatically: false,
@@ -194,7 +196,9 @@ make_property!(
make_property!(
/// `cy` attribute.
///
- /// https://www.w3.org/TR/SVG2/geometry.html#CY
+ /// SVG2: <https://www.w3.org/TR/SVG2/geometry.html#CY>
+ ///
+ /// Note that in SVG1.1, this was an attribute, not a property.
CY,
default: Length::<Vertical>::parse_str("0").unwrap(),
inherits_automatically: false,
@@ -204,9 +208,9 @@ make_property!(
make_property!(
/// `direction` property.
///
- /// https://www.w3.org/TR/SVG/text.html#DirectionProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/text.html#DirectionProperty>
///
- /// https://www.w3.org/TR/SVG2/text.html#DirectionProperty
+ /// SVG2: <https://www.w3.org/TR/SVG2/text.html#DirectionProperty>
Direction,
default: Ltr,
inherits_automatically: true,
@@ -219,9 +223,9 @@ make_property!(
make_property!(
/// `display` property.
///
- /// https://www.w3.org/TR/CSS2/visuren.html#display-prop
+ /// SVG1.1: <https://www.w3.org/TR/CSS2/visuren.html#display-prop>
///
- /// https://www.w3.org/TR/SVG2/render.html#VisibilityControl
+ /// SVG2: <https://www.w3.org/TR/SVG2/render.html#VisibilityControl>
Display,
default: Inline,
inherits_automatically: false,
@@ -248,7 +252,7 @@ make_property!(
/// `enable-background` property.
///
-/// https://www.w3.org/TR/SVG/filters.html#EnableBackgroundProperty
+/// SVG1.1: <https://www.w3.org/TR/SVG11/filters.html#EnableBackgroundProperty>
///
/// This is deprecated in SVG2. We just have a parser for it to avoid setting elements in
/// error if they have this property. Librsvg does not use the value of this property.
@@ -319,9 +323,9 @@ fn parses_enable_background() {
make_property!(
/// `fill` property.
///
- /// https://www.w3.org/TR/SVG/painting.html#FillProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/painting.html#FillProperty>
///
- /// https://www.w3.org/TR/SVG2/painting.html#FillProperty
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#FillProperty>
Fill,
default: PaintServer::parse_str("#000").unwrap(),
inherits_automatically: true,
@@ -331,9 +335,9 @@ make_property!(
make_property!(
/// `fill-opacity` property.
///
- /// https://www.w3.org/TR/SVG/painting.html#FillOpacityProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/painting.html#FillOpacityProperty>
///
- /// https://www.w3.org/TR/SVG2/painting.html#FillOpacity
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#FillOpacity>
FillOpacity,
default: UnitInterval(1.0),
inherits_automatically: true,
@@ -343,9 +347,9 @@ make_property!(
make_property!(
/// `fill-rule` property.
///
- /// https://www.w3.org/TR/SVG/painting.html#FillRuleProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/painting.html#FillRuleProperty>
///
- /// https://www.w3.org/TR/SVG2/painting.html#WindingRule
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#WindingRule>
FillRule,
default: NonZero,
inherits_automatically: true,
@@ -357,9 +361,9 @@ make_property!(
/// `filter` property.
///
-/// https://www.w3.org/TR/SVG/filters.html#FilterProperty
+/// SVG1.1: <https://www.w3.org/TR/SVG11/filters.html#FilterProperty>
///
-/// https://www.w3.org/TR/filter-effects/#FilterProperty
+/// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#FilterProperty>
///
/// Note that in SVG2, the filters got offloaded to the [Filter Effects Module Level
/// 1](https://www.w3.org/TR/filter-effects/) specification.
@@ -393,9 +397,9 @@ make_property!(
make_property!(
/// `flood-color` property, for `feFlood` and `feDropShadow` filter elements.
///
- /// https://www.w3.org/TR/SVG11/filters.html#feFloodElement
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/filters.html#feFloodElement>
///
- /// https://www.w3.org/TR/filter-effects/#FloodColorProperty
+ /// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#FloodColorProperty>
FloodColor,
default: cssparser::Color::RGBA(cssparser::RGBA::new(0, 0, 0, 255)),
inherits_automatically: false,
@@ -405,9 +409,9 @@ make_property!(
make_property!(
/// `flood-opacity` property, for `feFlood` and `feDropShadow` filter elements.
///
- /// https://www.w3.org/TR/SVG11/filters.html#feFloodElement
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/filters.html#feFloodElement>
///
- /// https://www.w3.org/TR/filter-effects/#FloodOpacityProperty
+ /// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#FloodOpacityProperty>
FloodOpacity,
default: UnitInterval(1.0),
inherits_automatically: false,
@@ -448,9 +452,9 @@ make_property!(
make_property!(
/// `font-stretch` property.
///
- /// https://www.w3.org/TR/SVG/text.html#FontStretchProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/text.html#FontStretchProperty>
///
- /// https://www.w3.org/TR/css-fonts-3/#font-size-propstret
+ /// CSS Fonts 3: <https://www.w3.org/TR/css-fonts-3/#font-size-propstret>
FontStretch,
default: Normal,
inherits_automatically: true,
@@ -472,9 +476,9 @@ make_property!(
make_property!(
/// `font-style` property.
///
- /// https://www.w3.org/TR/SVG/text.html#FontStyleProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/text.html#FontStyleProperty>
///
- /// https://www.w3.org/TR/css-fonts-3/#font-size-propstret
+ /// CSS Fonts 3: <https://www.w3.org/TR/css-fonts-3/#font-size-propstret>
FontStyle,
default: Normal,
inherits_automatically: true,
@@ -488,9 +492,9 @@ make_property!(
make_property!(
/// `font-variant` property.
///
- /// https://www.w3.org/TR/SVG/text.html#FontVariantProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/text.html#FontVariantProperty>
///
- /// https://www.w3.org/TR/css-fonts-3/#propdef-font-variant
+ /// CSS Fonts 3: <https://www.w3.org/TR/css-fonts-3/#propdef-font-variant>
///
/// Note that in CSS3, this is a lot more complex than CSS2.1 / SVG1.1.
FontVariant,
@@ -531,9 +535,11 @@ make_property!(
);
make_property!(
- /// `height` attribute.
+ /// `height` property.
+ ///
+ /// SVG2: <https://www.w3.org/TR/SVG2/geometry.html#Sizing>
///
- /// https://www.w3.org/TR/SVG2/geometry.html#Sizing
+ /// Note that in SVG1.1, this was an attribute, not a property.
Height,
default: LengthOrAuto::<Vertical>::Auto,
inherits_automatically: false,
@@ -543,7 +549,7 @@ make_property!(
make_property!(
/// `isolation` property.
///
- /// https://www.w3.org/TR/compositing-1/#isolation
+ /// CSS Compositing and Blending 1: <https://www.w3.org/TR/compositing-1/#isolation>
Isolation,
default: Auto,
inherits_automatically: false,
@@ -580,9 +586,9 @@ make_property!(
make_property!(
/// `lighting-color` property for `feDiffuseLighting` and `feSpecularLighting` filter elements.
///
- /// https://www.w3.org/TR/SVG/filters.html#LightingColorProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/filters.html#LightingColorProperty>
///
- /// https://www.w3.org/TR/filter-effects/#LightingColorProperty
+ /// Filter Effects 1: <https://www.w3.org/TR/filter-effects/#LightingColorProperty>
LightingColor,
default: cssparser::Color::RGBA(cssparser::RGBA::new(255, 255, 255, 255)),
inherits_automatically: false,
@@ -592,7 +598,7 @@ make_property!(
make_property!(
/// `marker` shorthand property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#MarkerShorthand
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#MarkerShorthand>
///
/// This is a shorthand, which expands to the `marker-start`, `marker-mid`,
/// `marker-end` longhand properties.
@@ -605,7 +611,7 @@ make_property!(
make_property!(
/// `marker-end` property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties>
MarkerEnd,
default: Iri::None,
inherits_automatically: true,
@@ -615,7 +621,7 @@ make_property!(
make_property!(
/// `marker-mid` property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties>
MarkerMid,
default: Iri::None,
inherits_automatically: true,
@@ -625,7 +631,7 @@ make_property!(
make_property!(
/// `marker-start` property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties>
MarkerStart,
default: Iri::None,
inherits_automatically: true,
@@ -635,9 +641,9 @@ make_property!(
make_property!(
/// `mask` shorthand property.
///
- /// https://www.w3.org/TR/SVG/masking.html#MaskProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/masking.html#MaskProperty>
///
- /// https://www.w3.org/TR/css-masking-1/#the-mask
+ /// CSS Masking 1: <https://www.w3.org/TR/css-masking-1/#the-mask>
///
/// Note that librsvg implements SVG1.1 semantics, where this is not a shorthand.
Mask,
@@ -649,7 +655,7 @@ make_property!(
make_property!(
/// `mask-type` property.
///
- /// https://www.w3.org/TR/css-masking-1/#the-mask-type
+ /// CSS Masking 1: <https://www.w3.org/TR/css-masking-1/#the-mask-type>
MaskType,
default: Luminance,
inherits_automatically: false,
@@ -662,7 +668,7 @@ make_property!(
make_property!(
/// `mix-blend-mode` property.
///
- /// https://www.w3.org/TR/compositing/#mix-blend-mode
+ /// Compositing and Blending 1: <https://www.w3.org/TR/compositing/#mix-blend-mode>
MixBlendMode,
default: Normal,
inherits_automatically: false,
@@ -689,7 +695,7 @@ make_property!(
make_property!(
/// `opacity` property.
///
- /// https://www.w3.org/TR/css-color-3/#opacity
+ /// CSS Color 3: <https://www.w3.org/TR/css-color-3/#opacity>
Opacity,
default: UnitInterval(1.0),
inherits_automatically: false,
@@ -699,9 +705,9 @@ make_property!(
make_property!(
/// `overflow` shorthand property.
///
- /// https://www.w3.org/TR/CSS2/visufx.html#overflow
+ /// CSS2: <https://www.w3.org/TR/CSS2/visufx.html#overflow>
///
- /// https://www.w3.org/TR/css-overflow-3/#propdef-overflow
+ /// CSS Overflow 3: <https://www.w3.org/TR/css-overflow-3/#propdef-overflow>
///
/// Note that librsvg implements SVG1.1 semantics, where this is not a shorthand.
Overflow,
@@ -727,7 +733,7 @@ pub enum PaintTarget {
make_property!(
/// `paint-order` property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#PaintOrder
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#PaintOrder>
///
/// The `targets` field specifies the order in which graphic elements should be filled/stroked.
/// Instead of hard-coding an order of fill/stroke/markers, use the order specified by the `targets`.
@@ -805,9 +811,11 @@ fn parses_paint_order() {
}
make_property!(
- /// `r` attribute.
+ /// `r` property.
///
- /// https://www.w3.org/TR/SVG2/geometry.html#R
+ /// SVG2: <https://www.w3.org/TR/SVG2/geometry.html#R>
+ ///
+ /// Note that in SVG1.1, this was an attribute, not a property.
R,
default: ULength::<Both>::parse_str("0").unwrap(),
inherits_automatically: false,
@@ -815,9 +823,11 @@ make_property!(
);
make_property!(
- /// `rx` attribute.
+ /// `rx` property.
+ ///
+ /// SVG2: <https://www.w3.org/TR/SVG2/geometry.html#RX>
///
- /// https://www.w3.org/TR/SVG2/geometry.html#RX
+ /// Note that in SVG1.1, this was an attribute, not a property.
RX,
default: LengthOrAuto::<Horizontal>::Auto,
inherits_automatically: false,
@@ -825,9 +835,11 @@ make_property!(
);
make_property!(
- /// `ry` attribute.
+ /// `ry` property.
+ ///
+ /// SVG2: <https://www.w3.org/TR/SVG2/geometry.html#RY>
///
- /// https://www.w3.org/TR/SVG2/geometry.html#RY
+ /// Note that in SVG1.1, this was an attribute, not a property.
RY,
default: LengthOrAuto::<Vertical>::Auto,
inherits_automatically: false,
@@ -837,7 +849,7 @@ make_property!(
make_property!(
/// `shape-rendering` property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#ShapeRendering
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#ShapeRendering>
ShapeRendering,
default: Auto,
inherits_automatically: true,
@@ -852,7 +864,7 @@ make_property!(
make_property!(
/// `stop-color` property for gradient stops.
///
- /// https://www.w3.org/TR/SVG2/pservers.html#StopColorProperty
+ /// SVG2: <https://www.w3.org/TR/SVG2/pservers.html#StopColorProperty>
StopColor,
default: cssparser::Color::RGBA(cssparser::RGBA::new(0, 0, 0, 255)),
inherits_automatically: false,
@@ -862,7 +874,7 @@ make_property!(
make_property!(
/// `stop-opacity` property for gradient stops.
///
- /// https://www.w3.org/TR/SVG2/pservers.html#StopOpacityProperty
+ /// SVG2: <https://www.w3.org/TR/SVG2/pservers.html#StopOpacityProperty>
StopOpacity,
default: UnitInterval(1.0),
inherits_automatically: false,
@@ -872,7 +884,7 @@ make_property!(
make_property!(
/// `stroke` property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#SpecifyingStrokePaint
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#SpecifyingStrokePaint>
Stroke,
default: PaintServer::None,
inherits_automatically: true,
@@ -882,7 +894,7 @@ make_property!(
make_property!(
/// `stroke-dasharray` property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#StrokeDashing
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#StrokeDashing>
StrokeDasharray,
default: Dasharray::default(),
inherits_automatically: true,
@@ -892,7 +904,7 @@ make_property!(
make_property!(
/// `stroke-dashoffset` property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#StrokeDashingdas
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#StrokeDashingdas>
StrokeDashoffset,
default: Length::<Both>::default(),
inherits_automatically: true,
@@ -902,7 +914,7 @@ make_property!(
make_property!(
/// `stroke-linecap` property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#LineCaps
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#LineCaps>
StrokeLinecap,
default: Butt,
inherits_automatically: true,
@@ -916,7 +928,7 @@ make_property!(
make_property!(
/// `stroke-linejoin` property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#LineJoin
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#LineJoin>
StrokeLinejoin,
default: Miter,
inherits_automatically: true,
@@ -930,7 +942,7 @@ make_property!(
make_property!(
/// `stroke-miterlimit` property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#StrokeMiterlimitProperty
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#StrokeMiterlimitProperty>
StrokeMiterlimit,
default: 4f64,
inherits_automatically: true,
@@ -940,7 +952,7 @@ make_property!(
make_property!(
/// `stroke-opacity` property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#StrokeOpacity
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#StrokeOpacity>
StrokeOpacity,
default: UnitInterval(1.0),
inherits_automatically: true,
@@ -950,7 +962,7 @@ make_property!(
make_property!(
/// `stroke-width` property.
///
- /// https://www.w3.org/TR/SVG2/painting.html#StrokeWidth
+ /// SVG2: <https://www.w3.org/TR/SVG2/painting.html#StrokeWidth>
StrokeWidth,
default: Length::<Both>::parse_str("1.0").unwrap(),
inherits_automatically: true,
@@ -960,7 +972,7 @@ make_property!(
make_property!(
/// `text-anchor` property.
///
- /// https://www.w3.org/TR/SVG/text.html#TextAnchorProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/text.html#TextAnchorProperty>
TextAnchor,
default: Start,
inherits_automatically: true,
@@ -974,9 +986,9 @@ make_property!(
make_property!(
/// `text-decoration` shorthand property.
///
- /// https://www.w3.org/TR/SVG/text.html#TextDecorationProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/text.html#TextDecorationProperty>
///
- /// https://www.w3.org/TR/css-text-decor-3/#text-decoration-property
+ /// CSS Text Decoration 3: <https://www.w3.org/TR/css-text-decor-3/#text-decoration-property>
///
/// Note that librsvg implements SVG1.1 semantics, where this is not a shorthand.
TextDecoration,
@@ -1075,7 +1087,7 @@ fn parses_text_decoration() {
make_property!(
/// `text-orientation` property.
///
- /// https://www.w3.org/TR/css-writing-modes-3/#propdef-text-orientation
+ /// CSS Writing Modes 3: <https://www.w3.org/TR/css-writing-modes-3/#propdef-text-orientation>
TextOrientation,
default: Mixed,
inherits_automatically: true,
@@ -1089,7 +1101,7 @@ make_property!(
impl From<GlyphOrientationVertical> for TextOrientation {
/// Converts the `glyph-orientation-vertical` shorthand to a `text-orientation` longhand.
///
- /// See https://www.w3.org/TR/css-writing-modes-3/#propdef-glyph-orientation-vertical for the conversion
table.
+ /// See <https://www.w3.org/TR/css-writing-modes-3/#propdef-glyph-orientation-vertical> for the
conversion table.
fn from(o: GlyphOrientationVertical) -> TextOrientation {
match o {
GlyphOrientationVertical::Auto => TextOrientation::Mixed,
@@ -1102,7 +1114,7 @@ impl From<GlyphOrientationVertical> for TextOrientation {
make_property!(
/// `text-rendering` property.
///
- /// https://www.w3.org/TR/SVG/painting.html#TextRenderingProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/painting.html#TextRenderingProperty>
TextRendering,
default: Auto,
inherits_automatically: true,
@@ -1117,7 +1129,7 @@ make_property!(
make_property!(
/// `transform` property.
///
- /// https://www.w3.org/TR/css-transforms-1/#transform-property
+ /// CSS Transforms 1: <https://www.w3.org/TR/css-transforms-1/#transform-property>
Transform,
default: TransformProperty::None,
inherits_automatically: false,
@@ -1127,7 +1139,7 @@ make_property!(
make_property!(
/// `unicode-bidi` property.
///
- /// https://www.w3.org/TR/css-writing-modes-3/#unicode-bidi
+ /// CSS Writing Modes 3: <https://www.w3.org/TR/css-writing-modes-3/#unicode-bidi>
UnicodeBidi,
default: Normal,
inherits_automatically: false,
@@ -1144,9 +1156,7 @@ make_property!(
make_property!(
/// `visibility` property.
///
- /// https://www.w3.org/TR/CSS2/visufx.html#visibility
- ///
- /// https://drafts.csswg.org/css2/#propdef-visibility
+ /// CSS2: <https://www.w3.org/TR/CSS2/visufx.html#visibility>
Visibility,
default: Visible,
inherits_automatically: true,
@@ -1158,9 +1168,11 @@ make_property!(
);
make_property!(
- /// `width` attribute.
+ /// `width` property.
+ ///
+ /// SVG2: <https://www.w3.org/TR/SVG2/geometry.html#Sizing>
///
- /// https://www.w3.org/TR/SVG2/geometry.html#Sizing
+ /// Note that in SVG1.1, this was an attribute, not a property.
Width,
default: LengthOrAuto::<Horizontal>::Auto,
inherits_automatically: false,
@@ -1170,9 +1182,11 @@ make_property!(
make_property!(
/// `writing-mode` property.
///
- /// https://www.w3.org/TR/css-writing-modes-3/#block-flow
- /// https://svgwg.org/svg2-draft/text.html#WritingModeProperty
- /// https://www.w3.org/TR/SVG/text.html#WritingModeProperty
+ /// SVG1.1: <https://www.w3.org/TR/SVG11/text.html#WritingModeProperty>
+ ///
+ /// SVG2: <https://svgwg.org/svg2-draft/text.html#WritingModeProperty>
+ ///
+ /// CSS Writing Modes 3: <https://www.w3.org/TR/css-writing-modes-3/#block-flow>
///
/// See the comments in the SVG2 spec for how the SVG1.1 values must be translated
/// into CSS Writing Modes 3 values.
@@ -1218,9 +1232,11 @@ impl WritingMode {
}
make_property!(
- /// `x` attribute.
+ /// `x` property.
+ ///
+ /// SVG2: <https://www.w3.org/TR/SVG2/geometry.html#X>
///
- /// https://www.w3.org/TR/SVG2/geometry.html#X
+ /// Note that in SVG1.1, this was an attribute, not a property.
X,
default: Length::<Horizontal>::parse_str("0").unwrap(),
inherits_automatically: false,
@@ -1230,7 +1246,7 @@ make_property!(
make_property!(
/// `xml:lang` attribute.
///
- /// https://www.w3.org/TR/xml/#sec-lang-tag
+ /// XML1.0: <https://www.w3.org/TR/xml/#sec-lang-tag>
///
/// Similar to `XmlSpace`, this is a hack in librsvg: the `xml:lang` attribute is
/// supposed to apply to an element and all its children. This more or less matches
@@ -1269,7 +1285,7 @@ fn parses_xml_lang() {
make_property!(
/// `xml:space` attribute.
///
- /// https://www.w3.org/TR/xml/#sec-white-space
+ /// XML1.0: <https://www.w3.org/TR/xml/#sec-white-space>
///
/// Similar to `XmlLang`, this is a hack in librsvg. The `xml:space` attribute is
/// supposed to be applied to all the children of the element in which it appears, so
@@ -1286,9 +1302,11 @@ make_property!(
);
make_property!(
- /// `y` attribute.
+ /// `y` property.
+ ///
+ /// SVG2: <https://www.w3.org/TR/SVG2/geometry.html#Y>
///
- /// https://www.w3.org/TR/SVG2/geometry.html#Y
+ /// Note that in SVG1.1, this was an attribute, not a property.
Y,
default: Length::<Vertical>::parse_str("0").unwrap(),
inherits_automatically: false,
diff --git a/src/shapes.rs b/src/shapes.rs
index 5b3f55f2c..35716c93e 100644
--- a/src/shapes.rs
+++ b/src/shapes.rs
@@ -255,6 +255,11 @@ impl BasicShape for Path {
}
}
+/// List-of-points for polyline and polygon elements.
+///
+/// SVG1.1: <https://www.w3.org/TR/SVG/shapes.html#PointsBNF>
+///
+/// SVG2: <https://www.w3.org/TR/SVG/shapes.html#DataTypePoints>
#[derive(Debug, Default, PartialEq)]
struct Points(Vec<(f64, f64)>);
@@ -266,8 +271,6 @@ impl Deref for Points {
}
}
-// Parse a list-of-points as for polyline and polygon elements
-// https://www.w3.org/TR/SVG/shapes.html#PointsBNF
impl Parse for Points {
fn parse<'i>(parser: &mut Parser<'i, '_>) -> Result<Points, ParseError<'i>> {
let mut v = Vec::new();
diff --git a/src/style.rs b/src/style.rs
index 4c24d8108..0d566c5be 100644
--- a/src/style.rs
+++ b/src/style.rs
@@ -10,8 +10,8 @@ use crate::xml::Attributes;
///
/// Currently only "text/css" is supported.
///
-/// https://www.w3.org/TR/SVG11/styling.html#StyleElementTypeAttribute
-/// https://www.w3.org/TR/SVG11/styling.html#ContentStyleTypeAttribute
+/// <https://www.w3.org/TR/SVG11/styling.html#StyleElementTypeAttribute>
+/// <https://www.w3.org/TR/SVG11/styling.html#ContentStyleTypeAttribute>
#[derive(Copy, Clone, PartialEq, Debug)]
pub enum StyleType {
TextCss,
diff --git a/src/text.rs b/src/text.rs
index 7f897eb42..842010166 100644
--- a/src/text.rs
+++ b/src/text.rs
@@ -1132,7 +1132,7 @@ impl BidiControl {
/// Creates a `BidiControl` from the properties that determine it.
///
/// See the table titled "Bidi control codes injected..." in
- /// https://www.w3.org/TR/css-writing-modes-3/#unicode-bidi
+ /// <https://www.w3.org/TR/css-writing-modes-3/#unicode-bidi>
#[rustfmt::skip]
fn from_unicode_bidi_and_direction(unicode_bidi: UnicodeBidi, direction: Direction) -> BidiControl {
use UnicodeBidi::*;
diff --git a/src/transform.rs b/src/transform.rs
index 7ab0072ea..6826d905b 100644
--- a/src/transform.rs
+++ b/src/transform.rs
@@ -35,7 +35,7 @@ pub struct Transform {
/// The `transform` property from the CSS Transforms Module Level 1.
///
-/// https://www.w3.org/TR/css-transforms-1/#transform-property
+/// CSS Transforms 1: <https://www.w3.org/TR/css-transforms-1/#transform-property>
#[derive(Debug, Clone, PartialEq)]
pub enum TransformProperty {
None,
@@ -44,7 +44,7 @@ pub enum TransformProperty {
/// The `transform` attribute from SVG1.1
///
-/// https://www.w3.org/TR/SVG11/coords.html#TransformAttribute
+/// SVG1.1: <https://www.w3.org/TR/SVG11/coords.html#TransformAttribute>
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TransformAttribute(Transform);
diff --git a/src/viewbox.rs b/src/viewbox.rs
index e391722d9..e6ad39a93 100644
--- a/src/viewbox.rs
+++ b/src/viewbox.rs
@@ -10,7 +10,7 @@ use crate::rect::Rect;
/// Newtype around a [`Rect`], used to represent the `viewBox` attribute.
///
/// A `ViewBox` is a new user-space coordinate system mapped onto the rectangle defined by
-/// the current viewport. See https://www.w3.org/TR/SVG2/coords.html#ViewBoxAttribute
+/// the current viewport. See <https://www.w3.org/TR/SVG2/coords.html#ViewBoxAttribute>
///
/// `ViewBox` derefs to [`Rect`], so you can use [`Rect`]'s methods and fields directly like
/// `vbox.x0` or `vbox.width()`.
diff --git a/src/xml/mod.rs b/src/xml/mod.rs
index 852109047..8a6c7ed40 100644
--- a/src/xml/mod.rs
+++ b/src/xml/mod.rs
@@ -117,7 +117,7 @@ pub struct XmlState {
/// Errors returned from XmlState::acquire()
///
-/// These follow the terminology from https://www.w3.org/TR/xinclude/#terminology
+/// These follow the terminology from <https://www.w3.org/TR/xinclude/#terminology>
enum AcquireError {
/// Resource could not be acquired (file not found), or I/O error.
/// In this case, the `xi:fallback` can be used if present.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]