Merge pull request #2941 from bjwbell/change-255-to-1-for-rgba

255 -> 1.0 for color::rgba + remove dead code lint
This commit is contained in:
Patrick Walton 2014-07-28 13:19:40 -07:00
commit 50a5008b85
3 changed files with 3 additions and 2 deletions

View file

@ -1291,7 +1291,7 @@ impl BlockFlow {
id: self.layer_id(0),
display_list: Arc::new(display_list.flatten(ContentStackingLevel)),
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,
};
self.base.layers.push_back(new_layer)

View file

@ -689,7 +689,7 @@ impl LayoutTask {
// FIXME(pcwalton): This is really ugly and can't handle overflow: scroll. Refactor
// 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() {
if child.type_id() == Some(ElementNodeTypeId(HTMLHtmlElementTypeId)) ||
child.type_id() == Some(ElementNodeTypeId(HTMLBodyElementTypeId)) {

View file

@ -312,6 +312,7 @@ impl CORSCacheEntry {
impl CORSCache {
/// http://fetch.spec.whatwg.org/#concept-cache-clear
#[allow(dead_code)]
fn clear (&mut self, request: &CORSRequest) {
let CORSCache(buf) = self.clone();
let new_buf: Vec<CORSCacheEntry> = buf.move_iter().filter(|e| e.origin == request.origin && request.destination == e.url).collect();