mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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:
commit
50a5008b85
3 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue