mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
255 -> 1.0 for color::rgba + remove dead code lint
In build_display_list_abs (block.rs) and handle_reflow (layout_task.rs) 255 is incorrectly used instead of 1.0 for color::rgba (255 is correct with color::rgb but *not* color::rgba). In cors.rs remove the dead code warning for fn clear. The function shouldn't be removed since it'll be used in the future (fn clear is an implementation of http://fetch.spec.whatwg.org/#concept-cache-clear).
This commit is contained in:
parent
c2a8baff46
commit
32545116a7
3 changed files with 3 additions and 2 deletions
|
@ -1291,7 +1291,7 @@ impl BlockFlow {
|
||||||
id: self.layer_id(0),
|
id: self.layer_id(0),
|
||||||
display_list: Arc::new(display_list.flatten(ContentStackingLevel)),
|
display_list: Arc::new(display_list.flatten(ContentStackingLevel)),
|
||||||
position: Rect(origin, size),
|
position: Rect(origin, size),
|
||||||
background_color: color::rgba(255.0, 255.0, 255.0, 0.0),
|
background_color: color::rgba(1.0, 1.0, 1.0, 0.0),
|
||||||
scroll_policy: scroll_policy,
|
scroll_policy: scroll_policy,
|
||||||
};
|
};
|
||||||
self.base.layers.push_back(new_layer)
|
self.base.layers.push_back(new_layer)
|
||||||
|
|
|
@ -689,7 +689,7 @@ impl LayoutTask {
|
||||||
|
|
||||||
// FIXME(pcwalton): This is really ugly and can't handle overflow: scroll. Refactor
|
// FIXME(pcwalton): This is really ugly and can't handle overflow: scroll. Refactor
|
||||||
// it with extreme prejudice.
|
// it with extreme prejudice.
|
||||||
let mut color = color::rgba(255.0, 255.0, 255.0, 255.0);
|
let mut color = color::rgba(1.0, 1.0, 1.0, 1.0);
|
||||||
for child in node.traverse_preorder() {
|
for child in node.traverse_preorder() {
|
||||||
if child.type_id() == Some(ElementNodeTypeId(HTMLHtmlElementTypeId)) ||
|
if child.type_id() == Some(ElementNodeTypeId(HTMLHtmlElementTypeId)) ||
|
||||||
child.type_id() == Some(ElementNodeTypeId(HTMLBodyElementTypeId)) {
|
child.type_id() == Some(ElementNodeTypeId(HTMLBodyElementTypeId)) {
|
||||||
|
|
|
@ -312,6 +312,7 @@ impl CORSCacheEntry {
|
||||||
|
|
||||||
impl CORSCache {
|
impl CORSCache {
|
||||||
/// http://fetch.spec.whatwg.org/#concept-cache-clear
|
/// http://fetch.spec.whatwg.org/#concept-cache-clear
|
||||||
|
#[allow(dead_code)]
|
||||||
fn clear (&mut self, request: &CORSRequest) {
|
fn clear (&mut self, request: &CORSRequest) {
|
||||||
let CORSCache(buf) = self.clone();
|
let CORSCache(buf) = self.clone();
|
||||||
let new_buf: Vec<CORSCacheEntry> = buf.move_iter().filter(|e| e.origin == request.origin && request.destination == e.url).collect();
|
let new_buf: Vec<CORSCacheEntry> = buf.move_iter().filter(|e| e.origin == request.origin && request.destination == e.url).collect();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue