[librsvg: 1/3] Rename allowed_url.rs to url_resolver.rs
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/3] Rename allowed_url.rs to url_resolver.rs
- Date: Wed, 7 Oct 2020 00:26:09 +0000 (UTC)
commit 8e89e45cab5d0093d9834d107235f4eb93ec5b64
Author: Lars Schmertmann <SmallLars t-online de>
Date: Wed Apr 22 17:01:14 2020 +0200
Rename allowed_url.rs to url_resolver.rs
Makefile.am | 2 +-
po/POTFILES.in | 2 +-
rsvg_internals/src/css.rs | 4 ++--
rsvg_internals/src/document.rs | 2 +-
rsvg_internals/src/drawing_ctx.rs | 2 +-
rsvg_internals/src/error.rs | 2 +-
rsvg_internals/src/filter.rs | 2 +-
rsvg_internals/src/filters/image.rs | 2 +-
rsvg_internals/src/gradient.rs | 2 +-
rsvg_internals/src/handle.rs | 2 +-
rsvg_internals/src/image.rs | 2 +-
rsvg_internals/src/io.rs | 2 +-
rsvg_internals/src/iri.rs | 2 +-
rsvg_internals/src/lib.rs | 2 +-
rsvg_internals/src/marker.rs | 2 +-
rsvg_internals/src/paint_server.rs | 2 +-
rsvg_internals/src/pattern.rs | 2 +-
rsvg_internals/src/structure.rs | 2 +-
rsvg_internals/src/text.rs | 2 +-
rsvg_internals/src/{allowed_url.rs => url_resolver.rs} | 0
rsvg_internals/src/xml.rs | 2 +-
21 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index a60d2d45..1d77e855 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,7 +31,6 @@ LIBRSVG_INTERNALS_SRC = \
Cargo.toml \
rsvg_internals/Cargo.toml \
rsvg_internals/build.rs \
- rsvg_internals/src/allowed_url.rs \
rsvg_internals/src/angle.rs \
rsvg_internals/src/aspect_ratio.rs \
rsvg_internals/src/attributes.rs \
@@ -101,6 +100,7 @@ LIBRSVG_INTERNALS_SRC = \
rsvg_internals/src/text.rs \
rsvg_internals/src/transform.rs \
rsvg_internals/src/unit_interval.rs \
+ rsvg_internals/src/url_resolver.rs \
rsvg_internals/src/util.rs \
rsvg_internals/src/viewbox.rs \
rsvg_internals/src/xml.rs \
diff --git a/po/POTFILES.in b/po/POTFILES.in
index cbef3f21..d9844a81 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,7 +6,6 @@ rsvg_internals/benches/lighting.rs
rsvg_internals/benches/pixel_iterators.rs
rsvg_internals/benches/srgb.rs
rsvg_internals/build.rs
-rsvg_internals/src/allowed_url.rs
rsvg_internals/src/aspect_ratio.rs
rsvg_internals/src/attributes.rs
rsvg_internals/src/bbox.rs
@@ -69,6 +68,7 @@ rsvg_internals/src/text.rs
rsvg_internals/src/transform.rs
rsvg_internals/src/tree.rs
rsvg_internals/src/unit_interval.rs
+rsvg_internals/src/url_resolver.rs
rsvg_internals/src/util.rs
rsvg_internals/src/viewbox.rs
rsvg_internals/src/viewport.rs
diff --git a/rsvg_internals/src/css.rs b/rsvg_internals/src/css.rs
index 0bb698ad..94ba2886 100644
--- a/rsvg_internals/src/css.rs
+++ b/rsvg_internals/src/css.rs
@@ -87,11 +87,11 @@ use std::fmt;
use std::str;
use url::Url;
-use crate::allowed_url::AllowedUrl;
use crate::error::*;
use crate::io::{self, BinaryData};
use crate::node::{Node, NodeBorrow, NodeCascade};
use crate::properties::{parse_property, ComputedValues, ParsedProperty};
+use crate::url_resolver::AllowedUrl;
/// A parsed CSS declaration
///
@@ -797,9 +797,9 @@ mod tests {
use glib::{self, prelude::*};
use selectors::Element;
- use crate::allowed_url::Fragment;
use crate::document::Document;
use crate::handle::LoadOptions;
+ use crate::url_resolver::Fragment;
fn load_document(input: &'static [u8]) -> Document {
let bytes = glib::Bytes::from_static(input);
diff --git a/rsvg_internals/src/document.rs b/rsvg_internals/src/document.rs
index 1675f2ce..24a8d95d 100644
--- a/rsvg_internals/src/document.rs
+++ b/rsvg_internals/src/document.rs
@@ -9,7 +9,6 @@ use std::collections::HashMap;
use std::include_str;
use std::rc::Rc;
-use crate::allowed_url::{AllowedUrl, AllowedUrlError, Fragment};
use crate::attributes::Attributes;
use crate::css::{self, Origin, Stylesheet};
use crate::error::{AcquireError, LoadingError};
@@ -18,6 +17,7 @@ use crate::io::{self, BinaryData};
use crate::limits;
use crate::node::{Node, NodeBorrow, NodeData};
use crate::surface_utils::shared_surface::SharedImageSurface;
+use crate::url_resolver::{AllowedUrl, AllowedUrlError, Fragment};
use crate::xml::xml_load_from_possibly_compressed_stream;
static UA_STYLESHEETS: Lazy<Vec<Stylesheet>> = Lazy::new(|| {
diff --git a/rsvg_internals/src/drawing_ctx.rs b/rsvg_internals/src/drawing_ctx.rs
index 38b23299..13e631a3 100644
--- a/rsvg_internals/src/drawing_ctx.rs
+++ b/rsvg_internals/src/drawing_ctx.rs
@@ -9,7 +9,6 @@ use std::cell::RefCell;
use std::convert::TryFrom;
use std::rc::{Rc, Weak};
-use crate::allowed_url::Fragment;
use crate::aspect_ratio::AspectRatio;
use crate::bbox::BoundingBox;
use crate::coord_units::CoordUnits;
@@ -41,6 +40,7 @@ use crate::surface_utils::{
};
use crate::transform::Transform;
use crate::unit_interval::UnitInterval;
+use crate::url_resolver::Fragment;
use crate::viewbox::ViewBox;
/// Holds values that are required to normalize `Length` values to a current viewport.
diff --git a/rsvg_internals/src/error.rs b/rsvg_internals/src/error.rs
index cf05f35d..2a1345e1 100644
--- a/rsvg_internals/src/error.rs
+++ b/rsvg_internals/src/error.rs
@@ -6,8 +6,8 @@ use std::fmt;
use cssparser::{BasicParseError, BasicParseErrorKind, ParseErrorKind, ToCss};
use markup5ever::QualName;
-use crate::allowed_url::Fragment;
use crate::node::Node;
+use crate::url_resolver::Fragment;
/// A short-lived error.
///
diff --git a/rsvg_internals/src/filter.rs b/rsvg_internals/src/filter.rs
index 78026afa..20631938 100644
--- a/rsvg_internals/src/filter.rs
+++ b/rsvg_internals/src/filter.rs
@@ -4,7 +4,6 @@ use cssparser::Parser;
use markup5ever::{expanded_name, local_name, namespace_url, ns};
use std::slice::Iter;
-use crate::allowed_url::Fragment;
use crate::attributes::Attributes;
use crate::bbox::BoundingBox;
use crate::coord_units::CoordUnits;
@@ -19,6 +18,7 @@ use crate::parsers::{Parse, ParseValue};
use crate::properties::ComputedValues;
use crate::rect::Rect;
use crate::transform::Transform;
+use crate::url_resolver::Fragment;
/// The <filter> node.
pub struct Filter {
diff --git a/rsvg_internals/src/filters/image.rs b/rsvg_internals/src/filters/image.rs
index 1e881f28..eb9063e5 100644
--- a/rsvg_internals/src/filters/image.rs
+++ b/rsvg_internals/src/filters/image.rs
@@ -1,6 +1,5 @@
use markup5ever::{expanded_name, local_name, namespace_url, ns};
-use crate::allowed_url::{Fragment, Href};
use crate::aspect_ratio::AspectRatio;
use crate::attributes::Attributes;
use crate::document::AcquiredNodes;
@@ -11,6 +10,7 @@ use crate::href::{is_href, set_href};
use crate::node::{CascadedValues, Node};
use crate::parsers::ParseValue;
use crate::rect::Rect;
+use crate::url_resolver::{Fragment, Href};
use crate::viewbox::ViewBox;
use super::context::{FilterContext, FilterOutput, FilterResult};
diff --git a/rsvg_internals/src/gradient.rs b/rsvg_internals/src/gradient.rs
index 64bd5977..d4396981 100644
--- a/rsvg_internals/src/gradient.rs
+++ b/rsvg_internals/src/gradient.rs
@@ -7,7 +7,6 @@ use markup5ever::{
use matches::matches;
use std::cell::RefCell;
-use crate::allowed_url::Fragment;
use crate::attributes::Attributes;
use crate::coord_units::CoordUnits;
use crate::document::{AcquiredNodes, NodeStack};
@@ -20,6 +19,7 @@ use crate::parsers::{Parse, ParseValue};
use crate::property_defs::StopColor;
use crate::transform::Transform;
use crate::unit_interval::UnitInterval;
+use crate::url_resolver::Fragment;
/// Contents of a <stop> element for gradient color stops
#[derive(Copy, Clone)]
diff --git a/rsvg_internals/src/handle.rs b/rsvg_internals/src/handle.rs
index 9ec2b552..01e0c350 100644
--- a/rsvg_internals/src/handle.rs
+++ b/rsvg_internals/src/handle.rs
@@ -2,7 +2,6 @@
//!
//! This module provides the primitives on which the public APIs are implemented.
-use crate::allowed_url::{AllowedUrl, Href};
use crate::bbox::BoundingBox;
use crate::css::{Origin, Stylesheet};
use crate::document::{AcquiredNodes, Document};
@@ -14,6 +13,7 @@ use crate::node::{CascadedValues, Node, NodeBorrow};
use crate::parsers::Parse;
use crate::rect::Rect;
use crate::structure::IntrinsicDimensions;
+use crate::url_resolver::{AllowedUrl, Href};
use url::Url;
/// Loading options for SVG documents.
diff --git a/rsvg_internals/src/image.rs b/rsvg_internals/src/image.rs
index 4fc0f4d8..4eda0ecc 100644
--- a/rsvg_internals/src/image.rs
+++ b/rsvg_internals/src/image.rs
@@ -2,7 +2,6 @@
use markup5ever::{expanded_name, local_name, namespace_url, ns};
-use crate::allowed_url::Href;
use crate::aspect_ratio::AspectRatio;
use crate::attributes::Attributes;
use crate::bbox::BoundingBox;
@@ -15,6 +14,7 @@ use crate::length::*;
use crate::node::{CascadedValues, Node};
use crate::parsers::ParseValue;
use crate::rect::Rect;
+use crate::url_resolver::Href;
#[derive(Default)]
pub struct Image {
diff --git a/rsvg_internals/src/io.rs b/rsvg_internals/src/io.rs
index cb117b78..06d5b37b 100644
--- a/rsvg_internals/src/io.rs
+++ b/rsvg_internals/src/io.rs
@@ -6,8 +6,8 @@ use gio::{
};
use glib::{Bytes as GBytes, Cast};
-use crate::allowed_url::AllowedUrl;
use crate::error::LoadingError;
+use crate::url_resolver::AllowedUrl;
pub struct BinaryData {
pub data: Vec<u8>,
diff --git a/rsvg_internals/src/iri.rs b/rsvg_internals/src/iri.rs
index cb1cb76f..1ce0db80 100644
--- a/rsvg_internals/src/iri.rs
+++ b/rsvg_internals/src/iri.rs
@@ -2,9 +2,9 @@
use cssparser::Parser;
-use crate::allowed_url::{Fragment, Href};
use crate::error::*;
use crate::parsers::Parse;
+use crate::url_resolver::{Fragment, Href};
/// Used where style properties take a funciri or "none"
///
diff --git a/rsvg_internals/src/lib.rs b/rsvg_internals/src/lib.rs
index 49cdc197..dd3ebd94 100644
--- a/rsvg_internals/src/lib.rs
+++ b/rsvg_internals/src/lib.rs
@@ -100,7 +100,6 @@ mod node;
#[macro_use]
mod property_macros;
-mod allowed_url;
mod angle;
mod aspect_ratio;
mod attributes;
@@ -142,6 +141,7 @@ pub mod surface_utils;
mod text;
mod transform;
mod unit_interval;
+mod url_resolver;
mod util;
mod viewbox;
mod xml;
diff --git a/rsvg_internals/src/marker.rs b/rsvg_internals/src/marker.rs
index 116e4e02..ab224a66 100644
--- a/rsvg_internals/src/marker.rs
+++ b/rsvg_internals/src/marker.rs
@@ -6,7 +6,6 @@ use std::ops::Deref;
use cssparser::Parser;
use markup5ever::{expanded_name, local_name, namespace_url, ns};
-use crate::allowed_url::Fragment;
use crate::angle::Angle;
use crate::aspect_ratio::*;
use crate::attributes::Attributes;
@@ -24,6 +23,7 @@ use crate::path_builder::{arc_segment, ArcParameterization, CubicBezierCurve, Pa
use crate::properties::ComputedValues;
use crate::rect::Rect;
use crate::transform::Transform;
+use crate::url_resolver::Fragment;
use crate::viewbox::*;
// markerUnits attribute: https://www.w3.org/TR/SVG/painting.html#MarkerElement
diff --git a/rsvg_internals/src/paint_server.rs b/rsvg_internals/src/paint_server.rs
index fce883aa..e482e807 100644
--- a/rsvg_internals/src/paint_server.rs
+++ b/rsvg_internals/src/paint_server.rs
@@ -2,7 +2,6 @@
use cssparser::Parser;
-use crate::allowed_url::Fragment;
use crate::document::AcquiredNodes;
use crate::element::Element;
use crate::error::*;
@@ -10,6 +9,7 @@ use crate::gradient::Gradient;
use crate::node::NodeBorrow;
use crate::parsers::Parse;
use crate::pattern::ResolvedPattern;
+use crate::url_resolver::Fragment;
#[derive(Debug, Clone, PartialEq)]
pub enum PaintServer {
diff --git a/rsvg_internals/src/pattern.rs b/rsvg_internals/src/pattern.rs
index e6071e9a..d921688a 100644
--- a/rsvg_internals/src/pattern.rs
+++ b/rsvg_internals/src/pattern.rs
@@ -3,7 +3,6 @@
use markup5ever::{expanded_name, local_name, namespace_url, ns};
use std::cell::RefCell;
-use crate::allowed_url::Fragment;
use crate::aspect_ratio::*;
use crate::attributes::Attributes;
use crate::coord_units::CoordUnits;
@@ -18,6 +17,7 @@ use crate::parsers::ParseValue;
use crate::properties::ComputedValues;
use crate::rect::Rect;
use crate::transform::Transform;
+use crate::url_resolver::Fragment;
use crate::viewbox::*;
coord_units!(PatternUnits, CoordUnits::ObjectBoundingBox);
diff --git a/rsvg_internals/src/structure.rs b/rsvg_internals/src/structure.rs
index d22e7dab..23a9275b 100644
--- a/rsvg_internals/src/structure.rs
+++ b/rsvg_internals/src/structure.rs
@@ -2,7 +2,6 @@
use markup5ever::{expanded_name, local_name, namespace_url, ns};
-use crate::allowed_url::Fragment;
use crate::aspect_ratio::*;
use crate::attributes::Attributes;
use crate::bbox::BoundingBox;
@@ -17,6 +16,7 @@ use crate::node::{CascadedValues, Node, NodeBorrow, NodeDraw};
use crate::parsers::{Parse, ParseValue};
use crate::properties::ComputedValues;
use crate::rect::Rect;
+use crate::url_resolver::Fragment;
use crate::viewbox::*;
#[derive(Default)]
diff --git a/rsvg_internals/src/text.rs b/rsvg_internals/src/text.rs
index b4452e90..a33a4367 100644
--- a/rsvg_internals/src/text.rs
+++ b/rsvg_internals/src/text.rs
@@ -3,7 +3,6 @@
use markup5ever::{expanded_name, local_name, namespace_url, ns};
use std::cell::RefCell;
-use crate::allowed_url::Fragment;
use crate::attributes::Attributes;
use crate::bbox::BoundingBox;
use crate::document::AcquiredNodes;
@@ -20,6 +19,7 @@ use crate::property_defs::{
XmlSpace,
};
use crate::space::{xml_space_normalize, NormalizeDefault, XmlSpaceNormalize};
+use crate::url_resolver::Fragment;
/// An absolutely-positioned array of `Span`s
///
diff --git a/rsvg_internals/src/allowed_url.rs b/rsvg_internals/src/url_resolver.rs
similarity index 100%
rename from rsvg_internals/src/allowed_url.rs
rename to rsvg_internals/src/url_resolver.rs
diff --git a/rsvg_internals/src/xml.rs b/rsvg_internals/src/xml.rs
index a497481e..2721c7cb 100644
--- a/rsvg_internals/src/xml.rs
+++ b/rsvg_internals/src/xml.rs
@@ -14,7 +14,6 @@ use std::string::ToString;
use xml5ever::tendril::format_tendril;
use xml5ever::tokenizer::{TagKind, Token, TokenSink, XmlTokenizer, XmlTokenizerOpts};
-use crate::allowed_url::AllowedUrl;
use crate::attributes::Attributes;
use crate::document::{Document, DocumentBuilder};
use crate::error::LoadingError;
@@ -22,6 +21,7 @@ use crate::io::{self, get_input_stream_for_loading};
use crate::limits::MAX_LOADED_ELEMENTS;
use crate::node::{Node, NodeBorrow};
use crate::style::StyleType;
+use crate::url_resolver::AllowedUrl;
use crate::xml2_load::Xml2Parser;
#[derive(Clone)]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]