The default bug view has changed. See this FAQ.

debug assert abort in nsLayoutUtils::InflationMinFontSizeFor() when playing fullscreen video test

RESOLVED FIXED in mozilla12

Status

()

Core
Layout
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: cpeterson, Assigned: dbaron)

Tracking

unspecified
mozilla12
ARM
Android
Points:
---

Firefox Tracking Flags

(fennec12+)

Details

(Whiteboard: [font-inflation: abort][readability])

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
Created attachment 579397 [details]
stack trace

1. Load http://people.mozilla.com/~nhirata/html_tp/elephants-dream.webm
2. Long press the video and choose "Full Screen" from the context menu.

EXPECTED RESULT: The video should play fullscreen.

ACTUAL RESULT: In a release build, the page will go gray. In a debug build, Fennec dies from fatal assert in nsLayoutUtils::InflationMinFontSizeFor():

   // Check that neither this frame nor any of its ancestors are
   // currently being reflowed.
   // It's ok for box frames (but not arbitrary ancestors of box frames)
   // since they set their size before reflow.
###!!! ABORT: must call nsHTMLReflowState& version during reflow: '!(f->GetStateBits() & NS_FRAME_IN_REFLOW)', file /Users/cpeterson/Code/mozilla/birch/layout/base/nsLayoutUtils.cpp, line 4692

* dbaron says:
I presume that the problem is that the nearest XUL frame is in a native anonymous subtree and therefore IsContainerForFontSizeInflation is returning false.
Probably I should:
(1) just change IsContainerForFontSizeInflation for that case
(2) change nsLayoutUtils::InflationMinFontSizeFor(const nsHTMLReflowState&) so that it asserts for this case even when inflation is turned off
(Assignee)

Updated

5 years ago
Assignee: nobody → dbaron
Blocks: 627842
Component: General → Layout
Product: Fennec Native → Core
QA Contact: general → layout

Updated

5 years ago
Whiteboard: [font-inflation: abort]
(Assignee)

Comment 1

5 years ago
Created attachment 581086 [details] [diff] [review]
patch
Attachment #581086 - Flags: review?(bzbarsky)
Comment on attachment 581086 [details] [diff] [review]
patch

>+                        // ugly exception, but ok because the child should be

Could we actually assert that?  So

  (f->GetType() == nsGkAtoms::scrollFrame &&
   IsContainerForFontSizeInflation(f->GetScrollFrame())

(probably with a relevant do_QueryFrame on f or something).

r=me.
Attachment #581086 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 3

5 years ago
It turns out it's actually not true, because the whole thing could be inside native-anonymous content, e.g., inside of an input.  And we really need nothing to be a container in that case -- but it's also safe in the is-a-reflow-root case.

I bet I can revise the assertion to incorporate an NS_FRAME_IN_REFLOW check on the parent of the top of the reflow state chain.
Whiteboard: [font-inflation: abort] → [font-inflation: abort][readability]
(Reporter)

Updated

5 years ago
Duplicate of this bug: 713009
(Assignee)

Comment 5

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/c248c37f9cf7
https://hg.mozilla.org/mozilla-central/rev/c248c37f9cf7
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
tracking-fennec: --- → 12+
You need to log in before you can comment on or make changes to this bug.