Address review comments

This commit is contained in:
Till Schneidereit 2015-07-21 22:56:26 +02:00
parent 317d2ac547
commit 126938a963
3 changed files with 20 additions and 25 deletions

View file

@ -70,6 +70,7 @@ use std::sync::{Arc, Mutex, MutexGuard};
use std::thread;
use style::computed_values::{filter, mix_blend_mode};
use style::media_queries::{MediaType, MediaQueryList, Device};
use style::properties::style_structs;
use style::selector_matching::Stylist;
use style::stylesheets::{Origin, Stylesheet, CSSRuleIteratorExt};
use url::Url;
@ -126,7 +127,7 @@ pub struct LayoutTaskData {
/// A queued response for the content boxes of a node.
pub content_boxes_response: Vec<Rect<Au>>,
/// A queued response for the client {top, left, width, height} of a node.
/// A queued response for the client {top, left, width, height} of a node in pixels.
pub client_rect_response: Rect<i32>,
/// The list of currently-running animations.
@ -1436,11 +1437,13 @@ impl FragmentLocatingFragmentIterator {
impl FragmentBorderBoxIterator for FragmentLocatingFragmentIterator {
fn process(&mut self, fragment: &Fragment, border_box: &Rect<Au>) {
let border_style_struct = fragment.style.get_border();
let top_width = border_style_struct.border_top_width;
let right_width = border_style_struct.border_right_width;
let bottom_width = border_style_struct.border_bottom_width;
let left_width = border_style_struct.border_left_width;
let style_structs::Border {
border_top_width: top_width,
border_right_width: right_width,
border_bottom_width: bottom_width,
border_left_width: left_width,
..
} = *fragment.style.get_border();
self.client_rect.origin.y = top_width.to_px();
self.client_rect.origin.x = left_width.to_px();
self.client_rect.size.width = (border_box.size.width - left_width - right_width).to_px();