Open Bug 1414941 Opened 2 years ago Updated 2 years ago

stylo: Assertion failure: mAllowZoom == aNewData.mAllowZoom (expected mAllowZoom to be the same on both nsStyleFonts) [@ nsStyleFont::CalcDifference]

Categories

(Core :: Layout, defect, P3)

58 Branch
defect

Tracking

()

Tracking Status
firefox-esr52 --- unaffected
firefox56 --- unaffected
firefox57 --- unaffected
firefox58 --- wontfix
firefox59 --- ?

People

(Reporter: tsmith, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file testcase.html
Assertion failure: mAllowZoom == aNewData.mAllowZoom (expected mAllowZoom to be the same on both nsStyleFonts), at /src/layout/style/nsStyleStruct.cpp:200

#0 nsStyleFont::CalcDifference(nsStyleFont const&) const /src/layout/style/nsStyleStruct.cpp:199:3
#1 nsStyleContext::CalcStyleDifference(nsStyleContext*, unsigned int*, unsigned int*, bool) /src/layout/style/nsStyleContext.cpp:234:3
#2 Gecko_CalcStyleDifference /src/layout/style/ServoBindings.cpp:400:5
#3 style::gecko::restyle_damage::GeckoRestyleDamage::compute_style_difference::h0aedbcf0a2f4a579 /src/servo/components/style/gecko/restyle_damage.rs:53
#4 style::matching::MatchMethods::compute_style_difference<style::gecko::wrapper::GeckoElement> /src/servo/components/style/matching.rs:830
#5 style::matching::PrivateMatchMethods::accumulate_damage_for::he15c2d5920bfacc3 /src/servo/components/style/matching.rs:351
#6 style::matching::MatchMethods::finish_restyle::ha0e061c32f1577cf /src/servo/components/style/matching.rs:596
#7 style::traversal::compute_style::hb1c18cb61e3b45ed /src/servo/components/style/traversal.rs:771
#8 style::traversal::recalc_style_at<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly,closure> /src/servo/components/style/traversal.rs:496
#9 _$LT$style..gecko..traversal..RecalcStyleOnly$LT$$u27$recalc$GT$$u20$as$u20$style..traversal..DomTraversal$LT$style..gecko..wrapper..GeckoElement$LT$$u27$le$GT$$GT$$GT$::process_preorder::h8e5b82ff2bd82f37 /src/servo/components/style/gecko/traversal.rs:37
#10 style::driver::traverse_dom::h25345f88fe7354a4 /src/servo/components/style/driver.rs:71
#11 geckoservo::glue::traverse_subtree::h185e3a4b911f53a6 /src/servo/ports/geckolib/glue.rs:271
#12 Servo_TraverseSubtree /src/servo/ports/geckolib/glue.rs:309
#13 mozilla::ServoStyleSet::StyleDocument(mozilla::ServoTraversalFlags) /src/layout/style/ServoStyleSet.cpp:998:7
#14 mozilla::ServoRestyleManager::DoProcessPendingRestyles(mozilla::ServoTraversalFlags) /src/layout/base/ServoRestyleManager.cpp:1127:20
#15 mozilla::PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush) /src/layout/base/PresShell.cpp:4186:41
#16 nsRefreshDriver::Tick(long, mozilla::TimeStamp) /src/layout/base/nsRefreshDriver.cpp:1882:18
#17 mozilla::RefreshDriverTimer::TickRefreshDrivers(long, mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver> >&) /src/layout/base/nsRefreshDriver.cpp:306:7
#18 mozilla::RefreshDriverTimer::Tick(long, mozilla::TimeStamp) /src/layout/base/nsRefreshDriver.cpp:328:5
#19 mozilla::VsyncRefreshDriverTimer::RunRefreshDrivers(mozilla::TimeStamp) /src/layout/base/nsRefreshDriver.cpp:769:5
#20 mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::TickRefreshDriver(mozilla::TimeStamp) /src/layout/base/nsRefreshDriver.cpp:682:35
#21 mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::TimeStamp) /src/layout/base/nsRefreshDriver.cpp:583:9
#22 mozilla::layout::VsyncChild::RecvNotify(mozilla::TimeStamp const&) /src/layout/ipc/VsyncChild.cpp:68:16
#23 mozilla::layout::PVsyncChild::OnMessageReceived(IPC::Message const&) /src/obj-firefox/ipc/ipdl/PVsyncChild.cpp:155:20
#24 mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) /src/obj-firefox/ipc/ipdl/PBackgroundChild.cpp:1815:28
#25 mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) /src/ipc/glue/MessageChannel.cpp:2119:25
#26 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /src/ipc/glue/MessageChannel.cpp:2049:17
#27 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /src/ipc/glue/MessageChannel.cpp:1895:5
#28 mozilla::ipc::MessageChannel::MessageTask::Run() /src/ipc/glue/MessageChannel.cpp:1928:15
#29 nsThread::ProcessNextEvent(bool, bool*) /src/xpcom/threads/nsThread.cpp:1037:14
#30 NS_ProcessNextEvent(nsIThread*, bool) /src/xpcom/threads/nsThreadUtils.cpp:513:10
#31 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /src/ipc/glue/MessagePump.cpp:97:21
#32 MessageLoop::RunInternal() /src/ipc/chromium/src/base/message_loop.cc:326:10
#33 MessageLoop::Run() /src/ipc/chromium/src/base/message_loop.cc:299:3
#34 nsBaseAppShell::Run() /src/widget/nsBaseAppShell.cpp:158:27
#35 XRE_RunAppShell() /src/toolkit/xre/nsEmbedFunctions.cpp:877:22
#36 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /src/ipc/glue/MessagePump.cpp:269:9
#37 MessageLoop::RunInternal() /src/ipc/chromium/src/base/message_loop.cc:326:10
#38 MessageLoop::Run() /src/ipc/chromium/src/base/message_loop.cc:299:3
#39 XRE_InitChildProcess(int, char**, XREChildData const*) /src/toolkit/xre/nsEmbedFunctions.cpp:703:34
#40 content_process_main(mozilla::Bootstrap*, int, char**) /src/browser/app/../../ipc/contentproc/plugin-container.cpp:63:30
#41 main /src/browser/app/nsBrowserApp.cpp:280:18
#42 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:291
#43 _start (firefox+0x41ebe4)
Flags: in-testsuite?
Attached file prefs.js
Depends on Stylo being enabled. Bisection just goes back to when bug 1409079 landed, though.
Has Regression Range: --- → yes
Priority: -- → P3
Summary: Assertion failure: mAllowZoom == aNewData.mAllowZoom (expected mAllowZoom to be the same on both nsStyleFonts) [@ nsStyleFont::CalcDifference] → stylo: Assertion failure: mAllowZoom == aNewData.mAllowZoom (expected mAllowZoom to be the same on both nsStyleFonts) [@ nsStyleFont::CalcDifference]
Flags: needinfo?(emilio)
I have no clue why this assertion would hold... I guess in the Gecko world where styles are tied to frames it makes sense (though I _think_ I could make it break), but in the servo world not that much.

Basically, this test-case is changing what the element inherits from, from some element that inherits mAllowZoom == false, to some other that inherits from mAllowZoom == true.

This flattened tree change is handled from PresShell::RemoveFramesAndRestyle. We could manually drop the servo data there so the elements get really new styles... Actually I suspect we're leaving stale data from nodes that are no longer in the flattened tree when doing that (though that's not problematic, since we post a reframe anyway).

I think Cam can sanity-check the above, so ni? for when he's back. If so, this is not an issue per se, but probably dropping the style data is sane there so the assertion holds.
Flags: needinfo?(emilio)
Err, read the above comment.
Flags: needinfo?(cam)
(In reply to Emilio Cobos Álvarez [:emilio] from comment #3)
> This flattened tree change is handled from
> PresShell::RemoveFramesAndRestyle. We could manually drop the servo data
> there so the elements get really new styles... Actually I suspect we're
> leaving stale data from nodes that are no longer in the flattened tree when
> doing that (though that's not problematic, since we post a reframe anyway).

FWIW we need to do this when the element goes away from the flat tree, so I'm fixing this in bug 1415013.
Flags: needinfo?(cam)
You need to log in before you can comment on or make changes to this bug.