Closed
Bug 1332180
Opened 9 years ago
Closed 9 years ago
Assertion failure with shape-outside: url() with float
Categories
(Core :: Layout: Floats, defect)
Core
Layout: Floats
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: xidorn, Assigned: xidorn)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
The following code currently crashes when shape-outside is enabled:
<!DOCTYPE html>
<div style="float: left; shape-outside: url(#x)"></div>
The stack is:
Assertion failure: mType == StyleShapeSourceType::Box || mType == StyleShapeSourceType::Shape (Wrong shape source type!), at layout\style\nsStyleStruct.h:2752
#01: nsFloatManager::AddFloat (layout\generic\nsfloatmanager.cpp:277)
#02: mozilla::BlockReflowInput::FlowAndPlaceFloat (layout\generic\blockreflowinput.cpp:994)
#03: mozilla::BlockReflowInput::AddFloat (layout\generic\blockreflowinput.cpp:630)
#04: nsLineLayout::ReflowFrame (layout\generic\nslinelayout.cpp:981)
#05: nsBlockFrame::ReflowInlineFrame (layout\generic\nsblockframe.cpp:4159)
#06: nsBlockFrame::DoReflowInlineFrames (layout\generic\nsblockframe.cpp:3959)
#07: nsBlockFrame::ReflowInlineFrames (layout\generic\nsblockframe.cpp:3836)
#08: nsBlockFrame::ReflowLine (layout\generic\nsblockframe.cpp:2840)
#09: nsBlockFrame::ReflowDirtyLines (layout\generic\nsblockframe.cpp:2376)
#10: nsBlockFrame::Reflow (layout\generic\nsblockframe.cpp:1250)
#11: nsBlockReflowContext::ReflowBlock (layout\generic\nsblockreflowcontext.cpp:307)
#12: nsBlockFrame::ReflowBlockFrame (layout\generic\nsblockframe.cpp:3474)
#13: nsBlockFrame::ReflowLine (layout\generic\nsblockframe.cpp:2836)
#14: nsBlockFrame::ReflowDirtyLines (layout\generic\nsblockframe.cpp:2376)
#15: nsBlockFrame::Reflow (layout\generic\nsblockframe.cpp:1250)
#16: nsContainerFrame::ReflowChild (layout\generic\nscontainerframe.cpp:1033)
#17: nsCanvasFrame::Reflow (layout\generic\nscanvasframe.cpp:681)
#18: nsContainerFrame::ReflowChild (layout\generic\nscontainerframe.cpp:1033)
#19: nsHTMLScrollFrame::ReflowScrolledFrame (layout\generic\nsgfxscrollframe.cpp:557)
#20: nsHTMLScrollFrame::ReflowContents (layout\generic\nsgfxscrollframe.cpp:687)
#21: nsHTMLScrollFrame::Reflow (layout\generic\nsgfxscrollframe.cpp:1041)
#22: nsContainerFrame::ReflowChild (layout\generic\nscontainerframe.cpp:1076)
#23: mozilla::ViewportFrame::Reflow (layout\generic\viewportframe.cpp:318)
#24: mozilla::PresShell::DoReflow (layout\base\presshell.cpp:9142)
#25: mozilla::PresShell::ProcessReflowCommands (layout\base\presshell.cpp:9309)
#26: mozilla::PresShell::FlushPendingNotifications (layout\base\presshell.cpp:4134)
#27: nsRefreshDriver::Tick (layout\base\nsrefreshdriver.cpp:1872)
#28: mozilla::RefreshDriverTimer::TickDriver (layout\base\nsrefreshdriver.cpp:326)
#29: mozilla::RefreshDriverTimer::TickRefreshDrivers (layout\base\nsrefreshdriver.cpp:297)
#30: mozilla::RefreshDriverTimer::Tick (layout\base\nsrefreshdriver.cpp:317)
#31: mozilla::VsyncRefreshDriverTimer::RunRefreshDrivers (layout\base\nsrefreshdriver.cpp:669)
#32: mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::TickRefreshDriver (layout\base\nsrefreshdriver.cpp:590)
#33: mozilla::detail::RunnableMethodImpl<mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver * __ptr64 const,void (__cdecl mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::*)(mozilla::TimeStamp) __ptr64,1,0,mozilla::TimeStamp>::Run (obj-firefox-opt\dist\include\nsthreadutils.h:862)
#34: nsThread::ProcessNextEvent (xpcom\threads\nsthread.cpp:1240)
#35: NS_ProcessNextEvent (xpcom\glue\nsthreadutils.cpp:390)
#36: mozilla::ipc::MessagePump::Run (ipc\glue\messagepump.cpp:96)
#37: MessageLoop::RunHandler (ipc\chromium\src\base\message_loop.cc:232)
#38: MessageLoop::Run (ipc\chromium\src\base\message_loop.cc:212)
#39: nsBaseAppShell::Run (widget\nsbaseappshell.cpp:158)
#40: nsAppShell::Run (widget\windows\nsappshell.cpp:264)
#41: nsAppStartup::Run (toolkit\components\startup\nsappstartup.cpp:283)
#42: XREMain::XRE_mainRun (toolkit\xre\nsapprunner.cpp:4461)
#43: XREMain::XRE_main (toolkit\xre\nsapprunner.cpp:4638)
#44: XRE_main (toolkit\xre\nsapprunner.cpp:4729)
#45: do_main (browser\app\nsbrowserapp.cpp:242)
#46: NS_internal_main (browser\app\nsbrowserapp.cpp:349)
#47: wmain (toolkit\xre\nswindowswmain.cpp:118)
#48: __scrt_common_main_seh (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253)
#49: BaseThreadInitThunk[C:\WINDOWS\System32\KERNEL32.DLL +0x8364]
#50: RtlUserThreadStart[C:\WINDOWS\SYSTEM32\ntdll.dll +0x670d1]
Comment hidden (mozreview-request) |
Comment 2•9 years ago
|
||
mozreview-review |
Comment on attachment 8828220 [details]
Bug 1332180 - Early return from shape-outside:url() value in ctor of FloatInfo.
https://reviewboard.mozilla.org/r/105680/#review106564
You're right. The shape-outside with url() doesn't have a reference box!
::: layout/generic/nsFloatManager.cpp:691
(Diff revision 1)
> const StyleShapeOutside& shapeOutside = mFrame->StyleDisplay()->mShapeOutside;
>
> if (shapeOutside.GetType() == StyleShapeSourceType::None) {
> return;
> }
> + if (shapeOutside.GetType() == StyleShapeSourceType::URL) {
Nit: Add a blank line before the "if", please.
::: layout/generic/nsFloatManager.cpp:694
(Diff revision 1)
> return;
> }
> + if (shapeOutside.GetType() == StyleShapeSourceType::URL) {
> + // Bug 1265343: Implement 'shape-image-threshold'. Early return
> + // here because shape-outside with url() value doesn't have
> + // reference box, and GetReferenceBox() asserts that.
Nit: s/reference box/a reference box/
Attachment #8828220 -
Flags: review?(tlin) → review+
Comment hidden (mozreview-request) |
Comment 4•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in
before you can comment on or make changes to this bug.
Description
•