mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Acid1 fix (fixed FloatFlow refactory)
While doing the FloatFlow refactory, I forgot to transpose a variable assignment in assign_widths(). Also did a minor change in bubble_widths() to avoid creating temporary variables in an iteration loop. This patch is for: https://github.com/mozilla/servo/issues/1335
This commit is contained in:
parent
b26fe9a430
commit
10db916137
1 changed files with 3 additions and 4 deletions
|
@ -558,7 +558,6 @@ impl Flow for BlockFlow {
|
||||||
min/pref widths based on child context widths and dimensions of
|
min/pref widths based on child context widths and dimensions of
|
||||||
any boxes it is responsible for flowing. */
|
any boxes it is responsible for flowing. */
|
||||||
|
|
||||||
/* TODO: floats */
|
|
||||||
/* TODO: absolute contexts */
|
/* TODO: absolute contexts */
|
||||||
/* TODO: inline-blocks */
|
/* TODO: inline-blocks */
|
||||||
fn bubble_widths(&mut self, _: &mut LayoutContext) {
|
fn bubble_widths(&mut self, _: &mut LayoutContext) {
|
||||||
|
@ -587,10 +586,8 @@ impl Flow for BlockFlow {
|
||||||
these widths will not include child elements, just padding etc. */
|
these widths will not include child elements, just padding etc. */
|
||||||
for box in self.box.iter() {
|
for box in self.box.iter() {
|
||||||
{
|
{
|
||||||
let mut_base = box.mut_base();
|
|
||||||
let base = box.base();
|
|
||||||
// Can compute border width here since it doesn't depend on anything.
|
// Can compute border width here since it doesn't depend on anything.
|
||||||
mut_base.compute_borders(base.style())
|
box.mut_base().compute_borders(box.base().style());
|
||||||
}
|
}
|
||||||
|
|
||||||
let (this_minimum_width, this_preferred_width) = box.minimum_and_preferred_widths();
|
let (this_minimum_width, this_preferred_width) = box.minimum_and_preferred_widths();
|
||||||
|
@ -627,6 +624,8 @@ impl Flow for BlockFlow {
|
||||||
let mut x_offset = Au::new(0);
|
let mut x_offset = Au::new(0);
|
||||||
|
|
||||||
if self.is_float() {
|
if self.is_float() {
|
||||||
|
self.float.get_mut_ref().containing_width = remaining_width;
|
||||||
|
|
||||||
// Parent usually sets this, but floats are never inorder
|
// Parent usually sets this, but floats are never inorder
|
||||||
self.base.is_inorder = false;
|
self.base.is_inorder = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue