Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSS/NSPR, scroll fixes, texture upload fixes, and hit testing #495

Closed
wants to merge 16 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Fix method names and dynamic borrow check failures

  • Loading branch information
pcwalton authored and Tim Kuehn committed May 31, 2013
commit 5068422835fcbbb4e45238b955a0b7daf9b001fa
@@ -449,14 +449,14 @@ pub impl RenderBox {
}

fn compute_padding(&self, cb_width: Au) {
do self.with_imm_base |base| {
base.model.compute_padding(self.style(), cb_width);
do self.with_mut_base |base| {
base.model.compute_padding(base.node.style(), cb_width);
}
}

fn compute_borders(&self){
do self.with_imm_base |base| {
base.model.compute_borders(self.style());
do self.with_mut_base |base| {
base.model.compute_borders(base.node.style());
}
}

@@ -467,7 +467,8 @@ pub impl RenderBox {
}
}

fn compute_width (&self, cb_width: Au,
fn compute_width(&self,
cb_width: Au,
callback: &fn(MaybeAuto, MaybeAuto, MaybeAuto) -> (Au, Au, Au)) {
let computed_width = MaybeAuto::from_width(self.style().width());
let computed_margin_left = MaybeAuto::from_margin(self.style().margin_left());
@@ -476,10 +477,12 @@ pub impl RenderBox {
let (used_width, used_margin_left, used_margin_right) =
callback(computed_width, computed_margin_left, computed_margin_right);

let noncontent_width = self.get_noncontent_width();

do self.with_mut_base |base| {
base.model.margin.left = used_margin_left;
base.model.margin.right = used_margin_right;
base.position.size.width = used_width + self.get_noncontent_width();
base.position.size.width = used_width + noncontent_width;
base.position.origin.x = used_margin_left;
}
}
@@ -96,10 +96,10 @@ impl BoxModel {
}

pub fn compute_padding(&mut self, style: CompleteStyle, cb_width: Au){
self.padding.top = self.compute_padding(style.padding_top(), cb_width);
self.padding.right = self.compute_padding(style.padding_right(), cb_width);
self.padding.bottom = self.compute_padding(style.padding_bottom(), cb_width);
self.padding.left = self.compute_padding(style.padding_left(), cb_width);
self.padding.top = self.compute_padding_length(style.padding_top(), cb_width);
self.padding.right = self.compute_padding_length(style.padding_right(), cb_width);
self.padding.bottom = self.compute_padding_length(style.padding_bottom(), cb_width);
self.padding.left = self.compute_padding_length(style.padding_left(), cb_width);
}

/// Helper function to compute the border width in app units from the CSS border width.
@@ -117,7 +117,7 @@ impl BoxModel {
}
}

fn compute_padding(&self, padding: CSSPadding, cb_width: Au) -> Au{
fn compute_padding_length(&self, padding: CSSPadding, cb_width: Au) -> Au{
match padding {
CSSPaddingLength(Px(v)) |
CSSPaddingLength(Pt(v)) |
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.