diff options
author | Brian Anderson <banderson@mozilla.com> | 2012-10-30 15:48:51 -0700 |
---|---|---|
committer | Brian Anderson <banderson@mozilla.com> | 2012-10-30 15:48:51 -0700 |
commit | fc3ca6738a21c55b477ed27dbc07c42b6f217c51 (patch) | |
tree | 7177164a773c5569870e7aa8c8a4be28566c9f42 | |
parent | bf197096459cee37cc1f160eb7fd3040f07b899c (diff) | |
download | servo-fc3ca6738a21c55b477ed27dbc07c42b6f217c51.tar.gz servo-fc3ca6738a21c55b477ed27dbc07c42b6f217c51.zip |
Remove dead CSS code
-rw-r--r-- | src/servo/css/resolve/apply.rs | 45 | ||||
-rwxr-xr-x | src/servo/servo.rc | 4 |
2 files changed, 2 insertions, 47 deletions
diff --git a/src/servo/css/resolve/apply.rs b/src/servo/css/resolve/apply.rs index 0e4d3641e78..aaa1a02f727 100644 --- a/src/servo/css/resolve/apply.rs +++ b/src/servo/css/resolve/apply.rs @@ -59,46 +59,6 @@ fn inheritance_wrapper(layout_ctx: &LayoutContext, node : Node) { applicator.resolve_style(layout_ctx); } -/* -fn resolve_fontsize(box : @RenderBox) { - // TODO: complete this - return -} - -fn resolve_height(box : @RenderBox) -> au { - let style = box.node.get_style(); - let inherit_val = match box.tree.parent { - None => au(0), - Some(parent) => parent.data.computed_size.height - }; - - box.appearance.height = match style.height { - Initial => style.height.initial(), - Inherit => inherit_val, - Specified(val) => match val { // BoxSizing - BoxPercent(*) | BoxAuto | BoxLength(Px(_)) => val, - BoxLength(Em(n)) => BoxLength(Px(n * box.appearance.font_size.abs())) - } - } -} - -fn resolve_width(box : @RenderBox) { - let style = box.node.get_specified_style(); - let inherit_val = match box.tree.parent { - None => style.height.initial(), - Some(node) => node.appearance.width - }; - - box.appearance.width = match style.width { - Initial => style.width.initial(), - Inherit => inherit_val, - Specified(val) => match val { // BoxSizing - BoxPercent(*) | BoxAuto | BoxLength(Px(_)) => val, - BoxLength(Em(n)) => BoxLength(Px(n * box.appearance.font_size.abs())) - } - } -}*/ - impl StyleApplicator { fn apply_css_style(layout_ctx: &LayoutContext) { @@ -117,8 +77,3 @@ impl StyleApplicator { // TODO: implement } } - -#[cfg(test)] -mod test { - /* TODO: rewrite once cascade and resolve written. */ -} diff --git a/src/servo/servo.rc b/src/servo/servo.rc index 453e3c9266c..93706d2f48b 100755 --- a/src/servo/servo.rc +++ b/src/servo/servo.rc @@ -45,10 +45,10 @@ pub mod content { } pub mod css { - pub mod styles; + mod styles; pub mod resolve { pub mod apply; - pub mod matching; + mod matching; } } |