layout_2013: Remove code preventing writing mode assertion failures (#32698)

It's actually kind of useful that this code crashes, as it points out a
problem. Additionally, we aren't going to be maintaining Layout 2013 any
longer so it is very unlikely that these bugs will ever be fixed. This
allows us to reduce our diff with upstream Stylo.

Closes #30577.
This commit is contained in:
Martin Robinson 2024-07-04 23:08:02 +02:00 committed by GitHub
parent 10326f7e0f
commit 0f2139be27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 19 additions and 26 deletions

View file

@ -163,9 +163,7 @@ impl Floats {
/// Adjusts the recorded offset of the flow relative to the first float.
pub fn translate(&mut self, delta: LogicalSize<Au>) {
// TODO(servo#30577) revert once underlying bug is fixed
// self.offset = self.offset + delta
self.offset = self.offset.add_or_warn(delta)
self.offset = self.offset + delta
}
/// Returns the position of the last float in flow coordinates.

View file

@ -1505,9 +1505,7 @@ impl Fragment {
if let Some(ref inline_fragment_context) = self.inline_context {
for node in &inline_fragment_context.nodes {
if node.style.get_box().position == Position::Relative {
// TODO(servo#30577) revert once underlying bug is fixed
// rel_pos = rel_pos + from_style(&*node.style, containing_block_size);
rel_pos = rel_pos.add_or_warn(from_style(&node.style, containing_block_size));
rel_pos = rel_pos + from_style(&*node.style, containing_block_size);
}
}
}

View file

@ -1771,10 +1771,7 @@ impl Flow for InlineFlow {
first_fragment.style.logical_border_width())
.start;
containing_block_positions.push(
// TODO(servo#30577) revert once underlying bug is fixed
// padding_box_origin.to_physical(self.base.writing_mode, container_size),
padding_box_origin
.to_physical_or_warn(self.base.writing_mode, container_size),
padding_box_origin.to_physical(self.base.writing_mode, container_size),
);
},
SpecificFragmentInfo::InlineBlock(_) if fragment.is_positioned() => {

View file

@ -1,2 +1,2 @@
[logical-values-float-clear-3.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[logical-values-float-clear-4.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[vlr-ltr-rtl-in-multicol.tentative.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[vlr-rtl-ltr-in-multicol.tentative.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[vrl-ltr-rtl-in-multicol.tentative.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[vrl-rtl-ltr-in-multicol.tentative.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[vlr-ltr-rtl-in-multicols.tentative.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[vlr-rtl-ltr-in-multicols.tentative.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[vrl-ltr-rtl-in-multicols.tentative.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[vrl-rtl-ltr-in-multicols.tentative.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[htb-ltr-rtl.tentative.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[htb-rtl-ltr.tentative.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[vlr-ltr-rtl.tentative.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[vlr-rtl-ltr.tentative.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[vrl-ltr-rtl.tentative.html]
expected: FAIL
expected: CRASH

View file

@ -1,2 +1,2 @@
[vrl-rtl-ltr.tentative.html]
expected: FAIL
expected: CRASH