"ABORT: negative lengths and percents should be rejected by parser" with huge font size

RESOLVED FIXED in mozilla6

Status

()

defect
--
critical
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: jruderman, Assigned: mats)

Tracking

(Blocks 1 bug, {assertion, testcase})

Trunk
mozilla6
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

Reporter

Description

8 years ago
###!!! ABORT: negative lengths and percents should be rejected by parser: 'sizeValue->IsCalcUnit()', file layout/style/nsRuleNode.cpp, line 2548
Reporter

Comment 1

8 years ago
Posted file stack trace
Assignee

Comment 2

8 years ago
Posted file fix (obsolete) —
Assignee: nobody → matspal
Attachment #522239 - Flags: review?(dbaron)
Assignee

Updated

8 years ago
OS: Mac OS X → All
Hardware: x86_64 → All
Assignee

Comment 3

8 years ago
Comment on attachment 522239 [details]
fix

Clearly wrong....
Attachment #522239 - Attachment is obsolete: true
Attachment #522239 - Attachment is patch: false
Attachment #522239 - Flags: review?(dbaron)
Assignee

Comment 4

8 years ago
Posted patch fix v2Splinter Review
The value is already in app units so we only need to clamp it.
Attachment #522240 - Flags: review?(dbaron)
Assignee

Updated

8 years ago
Whiteboard: [needs review]
Comment on attachment 522240 [details] [diff] [review]
fix v2

If you're going to cast anything to float(), you should cast the
result of aPresContext->DeviceContext()->AppUnitsPerPhysicalInch(),
that is, to make it:

+  return NSToCoordRoundWithClamp(inches *
+    float(aPresContext->DeviceContext()->AppUnitsPerPhysicalInch()));

I think you should also use NSToCoordFloorClamped instead of
NSToCoordRoundWithClamp

r=dbaron with that
Attachment #522240 - Flags: review?(dbaron) → review+
Assignee

Comment 6

8 years ago
http://hg.mozilla.org/mozilla-central/rev/abe7b2a19824
http://hg.mozilla.org/mozilla-central/rev/e64b8000eff8
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs review]
Target Milestone: --- → mozilla6

Comment 7

8 years ago
I see this in recent Aurora and Nightly on Linux, Windows, Mac at a NSFW url (next comment will be private).

###!!! ABORT: negative lengths and percents should be rejected by parser: 'sizeValue->IsCalcUnit()', file /work/mozilla/builds/nightly/mozilla/layout/style/nsRuleNode.cpp, line 2561

pseudo stack: mozalloc_abort | Abort | NS_DebugBreak_P | nsRuleNode::SetFontSize nsRuleNode::SetFont nsRuleNode::ComputeFontData nsRuleNode::WalkRuleTree nsRuleNode::GetStyleData

Should this be reopened or a new bug filed?
Reporter

Comment 9

8 years ago
New bug, please. And NSFW URLs don't automatically need to be security-sensitive :)
You need to log in before you can comment on or make changes to this bug.