mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
layout: Don't crash on floated generated content.
It doesn't construct the float correctly, but at least it doesn't crash anymore. Fixes Reddit. Closes #3287.
This commit is contained in:
parent
883fc2e404
commit
41ffec0378
4 changed files with 28 additions and 1 deletions
|
@ -833,7 +833,9 @@ impl<'a, 'b> PostorderNodeMutTraversal for FlowConstructor<'a, 'b> {
|
|||
}
|
||||
|
||||
// Inline items contribute inline fragment construction results.
|
||||
(display::inline, float::none, _) => {
|
||||
//
|
||||
// FIXME(pcwalton, #3307): This is not sufficient to handle floated generated content.
|
||||
(display::inline, _, _) => {
|
||||
let construction_result = self.build_fragments_for_inline(node);
|
||||
node.set_flow_construction_result(construction_result)
|
||||
}
|
||||
|
|
|
@ -118,3 +118,4 @@ flaky_gpu,flaky_linux == acid2_noscroll.html acid2_ref_broken.html
|
|||
|
||||
== iframe/simple.html iframe/simple_ref.html
|
||||
== iframe/multiple_external.html iframe/multiple_external_ref.html
|
||||
== floated_generated_content_a.html floated_generated_content_b.html
|
||||
|
|
15
tests/ref/floated_generated_content_a.html
Normal file
15
tests/ref/floated_generated_content_a.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
.stand:before {
|
||||
content: "";
|
||||
float: left;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="stand">Toast! Toast! Toast!</div>
|
||||
</body>
|
||||
</html>
|
||||
|
9
tests/ref/floated_generated_content_b.html
Normal file
9
tests/ref/floated_generated_content_b.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div class="stand">Toast! Toast! Toast!</div>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue