aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2014-04-15 19:28:11 -0400
committerbors-servo <release+servo@mozilla.com>2014-04-15 19:28:11 -0400
commit896cadbf625bc6cfe6038645fd2672f7336d15fc (patch)
tree3aa94670d0dab596c8b005a03692cc6ab7c03ce5 /src
parent038730c4bbeba411ced4d88720f011df175ffe2b (diff)
parentb34b42c94ff7b8610f168fceaafb7e3883a4cc59 (diff)
downloadservo-896cadbf625bc6cfe6038645fd2672f7336d15fc.tar.gz
servo-896cadbf625bc6cfe6038645fd2672f7336d15fc.zip
auto merge of #2119 : pcwalton/servo/rm-unused-code, r=pcwalton
trivial
Diffstat (limited to 'src')
-rw-r--r--src/components/main/layout/box_.rs72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/components/main/layout/box_.rs b/src/components/main/layout/box_.rs
index ae9dc8ad381..9b57cc9795f 100644
--- a/src/components/main/layout/box_.rs
+++ b/src/components/main/layout/box_.rs
@@ -512,78 +512,6 @@ impl Box {
}
}
- // CSS Section 10.6.4
- // We have to solve the constraint equation:
- // top + bottom + height + (vertical border + padding) = height of
- // containing block (`screen_height`)
- //
- // `y`: static position of the element
- //TODO(ibnc) take into account padding.
- pub fn get_y_coord_and_new_height_if_fixed(&self,
- screen_height: Au,
- mut height: Au,
- mut y: Au,
- is_fixed: bool)
- -> (Au, Au) {
- if is_fixed {
- let position_offsets = self.position_offsets.get();
- match (position_offsets.top, position_offsets.bottom) {
- (Au(0), Au(0)) => {}
- (Au(0), _) => {
- y = screen_height - position_offsets.bottom - height;
- }
- (_, Au(0)) => {
- y = position_offsets.top;
- }
- (_, _) => {
- y = position_offsets.top;
- match MaybeAuto::from_style(self.style().Box.get().height, Au(0)) {
- Auto => {
- height = screen_height - position_offsets.top - position_offsets.bottom;
- }
- _ => {}
- }
- }
- }
- }
- return (y, height);
- }
-
- // CSS Section 10.3.7
- //TODO(ibnc) removing padding when width needs to be stretched.
- pub fn get_x_coord_and_new_width_if_fixed(&self,
- screen_width: Au,
- screen_height: Au,
- mut width: Au,
- mut x: Au,
- is_fixed: bool)
- -> (Au, Au) {
- if is_fixed {
- self.compute_positioned_offsets(self.style(), screen_width, screen_height);
- let position_offsets = self.position_offsets.get();
-
- match (position_offsets.left, position_offsets.right) {
- (Au(0), Au(0)) => {}
- (_, Au(0)) => {
- x = position_offsets.left;
- }
- (Au(0), _) => {
- x = screen_width - position_offsets.right - width;
- }
- (_, _) => {
- x = position_offsets.left;
- match MaybeAuto::from_style(self.style().Box.get().width, Au(0)) {
- Auto => {
- width = screen_width - position_offsets.left - position_offsets.right;
- }
- _ => {}
- }
- }
- }
- }
- return (x, width);
- }
-
/// Transforms this box into another box of the given type, with the given size, preserving all
/// the other data.
pub fn transform(&self, size: Size2D<Au>, specific: SpecificBoxInfo) -> Box {