mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
change changes effecting verbosity
This commit is contained in:
parent
418842faf9
commit
7c45a4fea0
9 changed files with 17 additions and 31 deletions
|
@ -124,16 +124,14 @@ impl BasicCORSCache {
|
||||||
fn find_entry_by_header<'a>(&'a mut self, request: &CacheRequestDetails,
|
fn find_entry_by_header<'a>(&'a mut self, request: &CacheRequestDetails,
|
||||||
header_name: &str) -> Option<&'a mut CORSCacheEntry> {
|
header_name: &str) -> Option<&'a mut CORSCacheEntry> {
|
||||||
self.cleanup();
|
self.cleanup();
|
||||||
let ref mut buf = self.0;
|
self.0.iter_mut().find(|e| match_headers(e, request) && e.header_or_method.match_header(header_name))
|
||||||
buf.iter_mut().find(|e| match_headers(e, request) && e.header_or_method.match_header(header_name))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn find_entry_by_method<'a>(&'a mut self, request: &CacheRequestDetails,
|
fn find_entry_by_method<'a>(&'a mut self, request: &CacheRequestDetails,
|
||||||
method: Method) -> Option<&'a mut CORSCacheEntry> {
|
method: Method) -> Option<&'a mut CORSCacheEntry> {
|
||||||
// we can take the method from CORSRequest itself
|
// we can take the method from CORSRequest itself
|
||||||
self.cleanup();
|
self.cleanup();
|
||||||
let ref mut buf = self.0;
|
self.0.iter_mut().find(|e| match_headers(e, request) && e.header_or_method.match_method(&method))
|
||||||
buf.iter_mut().find(|e| match_headers(e, request) && e.header_or_method.match_method(&method))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -394,9 +394,8 @@ impl CORSCache {
|
||||||
header_name: &str)
|
header_name: &str)
|
||||||
-> Option<&'a mut CORSCacheEntry> {
|
-> Option<&'a mut CORSCacheEntry> {
|
||||||
self.cleanup();
|
self.cleanup();
|
||||||
let ref mut buf = self.0;
|
|
||||||
// Credentials are not yet implemented here
|
// Credentials are not yet implemented here
|
||||||
buf.iter_mut().find(|e| {
|
self.0.iter_mut().find(|e| {
|
||||||
e.origin.scheme == request.origin.scheme && e.origin.host() == request.origin.host() &&
|
e.origin.scheme == request.origin.scheme && e.origin.host() == request.origin.host() &&
|
||||||
e.origin.port() == request.origin.port() && e.url == request.destination &&
|
e.origin.port() == request.origin.port() && e.url == request.destination &&
|
||||||
e.header_or_method.match_header(header_name)
|
e.header_or_method.match_header(header_name)
|
||||||
|
@ -421,9 +420,8 @@ impl CORSCache {
|
||||||
-> Option<&'a mut CORSCacheEntry> {
|
-> Option<&'a mut CORSCacheEntry> {
|
||||||
// we can take the method from CORSRequest itself
|
// we can take the method from CORSRequest itself
|
||||||
self.cleanup();
|
self.cleanup();
|
||||||
let ref mut buf = self.0;
|
|
||||||
// Credentials are not yet implemented here
|
// Credentials are not yet implemented here
|
||||||
buf.iter_mut().find(|e| {
|
self.0.iter_mut().find(|e| {
|
||||||
e.origin.scheme == request.origin.scheme && e.origin.host() == request.origin.host() &&
|
e.origin.scheme == request.origin.scheme && e.origin.host() == request.origin.host() &&
|
||||||
e.origin.port() == request.origin.port() && e.url == request.destination &&
|
e.origin.port() == request.origin.port() && e.url == request.destination &&
|
||||||
e.header_or_method.match_method(method)
|
e.header_or_method.match_method(method)
|
||||||
|
|
|
@ -325,8 +325,7 @@ impl ScriptChan for SendableMainThreadScriptChan {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clone(&self) -> Box<ScriptChan + Send> {
|
fn clone(&self) -> Box<ScriptChan + Send> {
|
||||||
let ref chan = self.0;
|
box SendableMainThreadScriptChan((&self.0).clone())
|
||||||
box SendableMainThreadScriptChan((*chan).clone())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -348,8 +347,7 @@ impl ScriptChan for MainThreadScriptChan {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clone(&self) -> Box<ScriptChan + Send> {
|
fn clone(&self) -> Box<ScriptChan + Send> {
|
||||||
let ref chan = self.0;
|
box MainThreadScriptChan((&self.0).clone())
|
||||||
box MainThreadScriptChan((*chan).clone())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,7 @@ impl TaskSource<DOMManipulationTask> for DOMManipulationTaskSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clone(&self) -> Box<TaskSource<DOMManipulationTask> + Send> {
|
fn clone(&self) -> Box<TaskSource<DOMManipulationTask> + Send> {
|
||||||
let ref chan = self.0;
|
box DOMManipulationTaskSource((&self.0).clone())
|
||||||
box DOMManipulationTaskSource((*chan).clone())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@ impl ScriptChan for FileReadingTaskSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clone(&self) -> Box<ScriptChan + Send> {
|
fn clone(&self) -> Box<ScriptChan + Send> {
|
||||||
let ref chan = self.0;
|
box FileReadingTaskSource((&self.0).clone())
|
||||||
box FileReadingTaskSource((*chan).clone())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ impl ScriptChan for HistoryTraversalTaskSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clone(&self) -> Box<ScriptChan + Send> {
|
fn clone(&self) -> Box<ScriptChan + Send> {
|
||||||
let ref chan = self.0;
|
box HistoryTraversalTaskSource((&self.0).clone())
|
||||||
box HistoryTraversalTaskSource((*chan).clone())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ impl ScriptChan for NetworkingTaskSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clone(&self) -> Box<ScriptChan + Send> {
|
fn clone(&self) -> Box<ScriptChan + Send> {
|
||||||
let ref chan = self.0;
|
box NetworkingTaskSource((&self.0).clone())
|
||||||
box NetworkingTaskSource((*chan).clone())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ impl ScriptChan for UserInteractionTaskSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clone(&self) -> Box<ScriptChan + Send> {
|
fn clone(&self) -> Box<ScriptChan + Send> {
|
||||||
let ref chan = self.0;
|
box UserInteractionTaskSource((&self.0).clone())
|
||||||
box UserInteractionTaskSource((*chan).clone())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1077,10 +1077,9 @@ pub mod specified {
|
||||||
|
|
||||||
impl ToCss for BorderRadiusSize {
|
impl ToCss for BorderRadiusSize {
|
||||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||||
let size = self.0;
|
try!(self.0.width.to_css(dest));
|
||||||
try!(size.width.to_css(dest));
|
|
||||||
try!(dest.write_str(" "));
|
try!(dest.write_str(" "));
|
||||||
size.height.to_css(dest)
|
self.0.height.to_css(dest)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1641,19 +1640,17 @@ pub mod computed {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn to_computed_value<Cx: TContext>(&self, context: &Cx) -> BorderRadiusSize {
|
fn to_computed_value<Cx: TContext>(&self, context: &Cx) -> BorderRadiusSize {
|
||||||
let size = self.0;
|
let w = self.0.width.to_computed_value(context);
|
||||||
let w = size.width.to_computed_value(context);
|
let h = self.0.height.to_computed_value(context);
|
||||||
let h = size.height.to_computed_value(context);
|
|
||||||
BorderRadiusSize(Size2D::new(w, h))
|
BorderRadiusSize(Size2D::new(w, h))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ::cssparser::ToCss for BorderRadiusSize {
|
impl ::cssparser::ToCss for BorderRadiusSize {
|
||||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||||
let size = self.0;
|
try!(self.0.width.to_css(dest));
|
||||||
try!(size.width.to_css(dest));
|
|
||||||
try!(dest.write_str("/"));
|
try!(dest.write_str("/"));
|
||||||
size.height.to_css(dest)
|
self.0.height.to_css(dest)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue