mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #7550 - pcwalton:block-formatting-context-overflow, r=mbrubeck
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. r? @mbrubeck <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7550) <!-- Reviewable:end -->
This commit is contained in:
commit
c3f9e1813a
4 changed files with 33 additions and 4 deletions
|
@ -1347,10 +1347,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue