Closed Bug 1321206 Opened 8 years ago Closed 8 years ago

stylo: Assertion failure for serializing calc value of line-height

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
firefox53 --- affected

People

(Reporter: xidorn, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached file testcase (obsolete) —
This is found when running test_value_computation.html. The test case has been attached. It seems to be a Servo issue. Stack backtrace: 0: 0x7ff9a27b3e64 - <usize as std::sys::IsZero>::is_zero::h387aecc62cc0d6fc 1: 0x7ff9a27af303 - std::panicking::Location::line::h9c748f2b719dd34c 2: 0x7ff9a27afffd - std::panicking::rust_panic_with_hook::hc303199e04562edf 3: 0x7ff9a26d701d - std::panicking::begin_panic<&str> at C:\bot\slave\stable-dist-rustc-win-msvc-64\build\src\libstd\panicking.rs:413 4: 0x7ff9a2321954 - style::values::specified::length::{{impl}}::to_css<nsstring_vendor::nsAString> at c:\mozilla-source\stylo\obj-firefox-stylo\toolkit\library\rust\<std macros>:3 5: 0x7ff9a231aa1a - style::values::specified::length::{{impl}}::to_css<nsstring_vendor::nsAString> at C:\mozilla-source\stylo\servo\components\style\values\specified\length.rs:789 6: 0x7ff9a2322b75 - style::properties::longhands::line_height::{{impl}}::to_css<nsstring_vendor::nsAString> at c:\mozilla-source\stylo\obj-firefox-stylo\toolkit\library\rust\x86_64-pc-windows-msvc\debug\build\style-3719a002503bc45f\out\properties.rs:21268 7: 0x7ff9a24dcde3 - style::properties::declaration_block::PropertyDeclarationBlock::property_value_to_css<nsstring_vendor::nsAString> at C:\mozilla-source\stylo\servo\components\style\properties\declaration_block.rs:106
Attached file testcase
Actually it is even simplier. If the calc only has numbers, this crash would happen. It is because CalcLengthOrPercentage::parse can recognize numbers, but the struct itself doesn't have field for numbers, so calc only contains numbers can be parsed successfully, but the result would be empty.
Attachment #8815615 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: