Closed Bug 866659 Opened 11 years ago Closed 10 years ago
"Assertion failure: range
Frame->Get Type() == ns Gk Atoms::range Frame" with <input type=range> root
Assertion failure: rangeFrame->GetType() == nsGkAtoms::rangeFrame, at /Users/jruderman/trees/mozilla-central/widget/xpwidgets/nsNativeTheme.cpp:676 This code was added in bug 846883 and bug 855301.
jwatt, could you have a look into this?
Assignee: nobody → jwatt
The reason that this happens is because for the root element we call nsCSSFrameConstructor::ConstructDocElementFrame. That method doesn't bother to look at the HTML element type; for non-table HTML frames it just creates the frame using NS_NewBlockFrame: http://mxr.mozilla.org/mozilla-central/source/layout/base/nsCSSFrameConstructor.cpp?rev=aad5b909924d#2451 That's how we unfortunately end up with a non-nsRangeFrame with |StyleDisplay()->mAppearance == NS_THEME_RANGE|, which is why we hit the assertion before the cast: https://mxr.mozilla.org/mozilla-central/source/widget/xpwidgets/nsNativeTheme.cpp?rev=aad5b909924d#669
Note that we'll also hit this assertion for any non-<input type=range> that has |-moz-appearance:range|.
Comment on attachment 826781 [details] [diff] [review] patch r=me
Attachment #826781 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Reproduced in 2013-06-19-mozilla-central-debug. Verified fixed 2013-11-27-mozilla-central-debug Win 7 x64.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.