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

layout: Defend the block formatting context speculation against going wrong in the presence of blocks that overflow in the inline direction. #7550

Merged
merged 1 commit into from Sep 11, 2015
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

layout: Defend the block formatting context speculation against going…

… wrong in

the presence of blocks that overflow in the inline direction.

Makes the Google search result links appear.

Closes #7298.
  • Loading branch information
pcwalton committed Sep 5, 2015
commit ded4a5793ea621391af560652e66de8a8933b176
@@ -1327,10 +1327,16 @@ impl BlockFlow {
let mut inline_size_of_preceding_left_floats = Au(0);
let mut inline_size_of_preceding_right_floats = Au(0);
if self.formatting_context_type() == FormattingContextType::None {
inline_size_of_preceding_left_floats =
max(self.inline_size_of_preceding_left_floats - inline_start_content_edge, Au(0));
inline_size_of_preceding_right_floats =
max(self.inline_size_of_preceding_right_floats - inline_end_content_edge, Au(0));
if inline_start_content_edge > Au(0) {
inline_size_of_preceding_left_floats =
max(self.inline_size_of_preceding_left_floats - inline_start_content_edge,
Au(0));
}
if inline_end_content_edge > Au(0) {
inline_size_of_preceding_right_floats =
max(self.inline_size_of_preceding_right_floats - inline_end_content_edge,
Au(0));
}
}

let opaque_self = OpaqueFlow::from_flow(self);
@@ -48,6 +48,7 @@ flaky_cpu == append_style_a.html append_style_b.html
== block_formatting_context_containing_floats_a.html block_formatting_context_containing_floats_ref.html
== block_formatting_context_float_placement_a.html block_formatting_context_float_placement_ref.html
== block_formatting_context_max_width_a.html block_formatting_context_max_width_ref.html
== block_formatting_context_overflow_a.html block_formatting_context_overflow_ref.html
== block_formatting_context_relative_a.html block_formatting_context_ref.html
== block_formatting_context_translation_a.html block_formatting_context_translation_ref.html
== block_formatting_context_with_margin_a.html block_formatting_context_with_margin_ref.html
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<style>
section {
display: block;
width: 0;
}
nav {
display: block;
}
aside {
display: block;
overflow: hidden;
}
main {
width: 500px;
}
</style>
<section><main><nav><aside>Hello</aside>world!</nav></main></section>

@@ -0,0 +1,3 @@
<!DOCTYPE html>
<div>Hello</div><div>world!</div>

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.