mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Implement generated_containing_block_rect for TableFlow. Fixes #3337.
This commit is contained in:
parent
2f12d5628f
commit
cab15531b5
4 changed files with 42 additions and 0 deletions
|
@ -18,6 +18,7 @@ use wrapper::ThreadSafeLayoutNode;
|
|||
|
||||
use servo_util::geometry::Au;
|
||||
use servo_util::geometry;
|
||||
use servo_util::logical_geometry::LogicalRect;
|
||||
use std::fmt;
|
||||
use style::computed_values::table_layout;
|
||||
|
||||
|
@ -290,6 +291,10 @@ impl Flow for TableFlow {
|
|||
fn compute_absolute_position(&mut self) {
|
||||
self.block_flow.compute_absolute_position()
|
||||
}
|
||||
|
||||
fn generated_containing_block_rect(&self) -> LogicalRect<Au> {
|
||||
self.block_flow.generated_containing_block_rect()
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for TableFlow {
|
||||
|
|
|
@ -123,3 +123,4 @@ flaky_gpu,flaky_linux == acid2_noscroll.html acid2_ref_broken.html
|
|||
== inline_block_img_a.html inline_block_img_ref.html
|
||||
== inline_block_baseline_a.html inline_block_baseline_ref.html
|
||||
== float_table_a.html float_table_ref.html
|
||||
== table_containing_block_a.html table_containing_block_ref.html
|
||||
|
|
22
tests/ref/table_containing_block_a.html
Normal file
22
tests/ref/table_containing_block_a.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
.rel {
|
||||
position: relative;
|
||||
}
|
||||
.abs {
|
||||
position:absolute;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table class="rel">
|
||||
<tbody>
|
||||
<tr class="abs">
|
||||
<td>Don't crash!</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
14
tests/ref/table_containing_block_ref.html
Normal file
14
tests/ref/table_containing_block_ref.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Don't crash!</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue