[librsvg: 1/7] Remove DocumentBuilder::resolve_href()
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/7] Remove DocumentBuilder::resolve_href()
- Date: Fri, 23 Sep 2022 18:19:26 +0000 (UTC)
commit a4d2dfe96e42210cd526cdd479558cf2b7c9a980
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Sep 23 11:13:56 2022 -0500
Remove DocumentBuilder::resolve_href()
This was just used by the XML code, but it already has access to the
url_resolver, which is what it really wants.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/752>
src/document.rs | 6 +-----
src/xml/mod.rs | 7 ++-----
2 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/document.rs b/src/document.rs
index d02701479..1a4f8f61a 100644
--- a/src/document.rs
+++ b/src/document.rs
@@ -14,7 +14,7 @@ use std::str::FromStr;
use std::sync::Arc;
use crate::css::{self, Origin, Stylesheet};
-use crate::error::{AcquireError, AllowedUrlError, LoadingError, NodeIdError};
+use crate::error::{AcquireError, LoadingError, NodeIdError};
use crate::handle::LoadOptions;
use crate::io::{self, BinaryData};
use crate::limits;
@@ -593,10 +593,6 @@ impl DocumentBuilder {
}
}
- pub fn resolve_href(&self, href: &str) -> Result<AllowedUrl, AllowedUrlError> {
- self.load_options.url_resolver.resolve_href(href)
- }
-
/// Does the final validation on the `Document` being read, and returns it.
pub fn build(self) -> Result<Document, LoadingError> {
let DocumentBuilder {
diff --git a/src/xml/mod.rs b/src/xml/mod.rs
index a9ccffac2..930a964d3 100644
--- a/src/xml/mod.rs
+++ b/src/xml/mod.rs
@@ -527,11 +527,8 @@ impl XmlState {
.clone();
let aurl = self
- .inner
- .borrow()
- .document_builder
- .as_ref()
- .unwrap()
+ .load_options
+ .url_resolver
.resolve_href(href)
.map_err(|e| {
// FIXME: should AlloweUrlError::UrlParseError be a fatal error,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]