Bug 54646 - Assertion failure in FrameView::paintContents when calling WKPageForceRepaint on a page that uses accelerated compositing
Summary: Assertion failure in FrameView::paintContents when calling WKPageForceRepaint...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-02-17 06:19 PST by Adam Roben (:aroben)
Modified: 2011-02-17 08:21 PST (History)
2 users (show)

See Also:


Attachments
Make sure layout is up-to-date before rendering the layer tree in DrawingAreaImpl (1.46 KB, patch)
2011-02-17 08:16 PST, Adam Roben (:aroben)
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2011-02-17 06:19:46 PST
I called WKPageForceRepaint on a page that uses accelerated compositing, and hit an assertion in FrameView::paintContents:

    ASSERT(!needsLayout());

Here's the backtrace. I think we need to call layoutIfNeeded in DrawingAreaImpl::forceRepaint before calling through to the LayerTreeHost.

#0  0x00000001029df5e0 in WebCore::FrameView::paintContents (this=0x10d2b4140, p=0x7fff5fbfb718, rect=@0x7fff5fbfb3c8) at FrameView.cpp:2211
#1  0x000000010354c750 in WebCore::ScrollView::paint (this=0x10d2b4140, context=0x7fff5fbfb718, rect=@0x7fff5fbfb6e8) at ScrollView.cpp:938
#2  0x00000001010b198f in WebKit::WebPage::drawRect (this=0x1085cae00, graphicsContext=@0x7fff5fbfb718, rect=@0x7fff5fbfb6e8) at WebPage.cpp:604
#3  0x000000010128c93d in WebKit::LayerTreeHostMac::paintContents (this=0x11171f780, graphicsLayer=0x1117bef40, graphicsContext=@0x7fff5fbfb718, unnamed_arg=WebCore::GraphicsLayerPaintAll, clipRect=@0x7fff5fbfb6e8) at LayerTreeHostMac.mm:211
#4  0x000000010128c8d4 in non-virtual thunk to WebKit::LayerTreeHostMac::paintContents(WebCore::GraphicsLayer const*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, WebCore::IntRect const&) () at LayerTreeHostMac.mm:234
#5  0x0000000102a9cd14 in WebCore::GraphicsLayer::paintGraphicsLayerContents (this=0x1117bef40, context=@0x7fff5fbfb718, clip=@0x7fff5fbfb6e8) at GraphicsLayer.cpp:248
#6  0x0000000102ab2959 in WebCore::GraphicsLayerCA::platformCALayerPaintContents (this=0x1117bef40, context=@0x7fff5fbfb718, clip=@0x7fff5fbfb6e8) at GraphicsLayerCA.h:135
#7  0x0000000102ab2928 in non-virtual thunk to WebCore::GraphicsLayerCA::platformCALayerPaintContents(WebCore::GraphicsContext&, WebCore::IntRect const&) () at HashTable.h:274
#8  0x00000001037e5075 in drawLayerContents (context=0x1001bdab0, layer=0x11171afd0, layerContents=0x1117bf0f8) at WebLayer.mm:75
#9  0x00000001037e55d0 in -[WebLayer drawInContext:] (self=0x11171afd0, _cmd=0x7fff88637183, context=0x1001bdab0) at WebLayer.mm:170
#10 0x00007fff81e4986c in CABackingStoreUpdate_ ()
#11 0x00007fff81f18b43 in CA::Layer::display_ ()
#12 0x00000001037e5621 in -[WebLayer display] (self=0x11171afd0, _cmd=0x7fff885ee4ba) at WebLayer.mm:160
#13 0x00007fff81f115e6 in CA::Layer::display_if_needed ()
#14 0x00007fff81e244db in CA::Context::commit_transaction ()
#15 0x00007fff81e24170 in CA::Transaction::commit ()
#16 0x000000010128cbd3 in WebKit::LayerTreeHostMac::forceRepaint (this=0x11171f780) at LayerTreeHostMac.mm:177
#17 0x00000001012711bd in WebKit::DrawingAreaImpl::forceRepaint (this=0x10e61be80) at DrawingAreaImpl.cpp:146
#18 0x00000001010ab215 in WebKit::WebPage::forceRepaint (this=0x1085cae00, callbackID=1) at WebPage.cpp:1306
#19 0x0000000101198b2e in CoreIPC::callMemberFunction<WebKit::WebPage, void (WebKit::WebPage::*)(unsigned long long), unsigned long long> (args=@0x7fff5fbfce50, object=0x1085cae00, function={__pfn = 0x1010ab1d4 <WebKit::WebPage::forceRepaint(unsigned long long)>, __delta = 0}) at HandleMessage.h:19
#20 0x000000010119b817 in CoreIPC::handleMessage<Messages::WebPage::ForceRepaint, WebKit::WebPage, void (WebKit::WebPage::*)(unsigned long long)> (argumentDecoder=0x10eb86b10, object=0x1085cae00, function={__pfn = 0x1010ab1d4 <WebKit::WebPage::forceRepaint(unsigned long long)>, __delta = 0}) at HandleMessage.h:246
#21 0x0000000101196f74 in WebKit::WebPage::didReceiveWebPageMessage (this=0x1085cae00, unnamed_arg=0x10011eb30, messageID={m_messageID = 589858}, arguments=0x10eb86b10) at WebPageMessageReceiver.cpp:157
#22 0x00000001010add75 in WebKit::WebPage::didReceiveMessage (this=0x1085cae00, connection=0x10011eb30, messageID={m_messageID = 589858}, arguments=0x10eb86b10) at WebPage.cpp:1745
#23 0x0000000101119361 in WebKit::WebProcess::didReceiveMessage (this=0x10011e890, connection=0x10011eb30, messageID={m_messageID = 589858}, arguments=0x10eb86b10) at WebProcess.cpp:542
#24 0x000000010100b8d7 in CoreIPC::Connection::dispatchMessage (this=0x10011eb30, message=@0x10de40d50) at Connection.cpp:578
#25 0x000000010100a0ec in CoreIPC::Connection::dispatchMessages (this=0x10011eb30) at Connection.cpp:599
#26 0x000000010100f4da in MemberFunctionWorkItem0<CoreIPC::Connection>::execute (this=0x111648190) at WorkItem.h:76
#27 0x0000000101064a07 in RunLoop::performWork (this=0x10011e0b0) at RunLoop.cpp:63
#28 0x0000000101065896 in RunLoop::performWork (context=0x10011e0b0) at RunLoopMac.mm:33
#29 0x00007fff8240184c in __CFRunLoopDoSources0 ()
#30 0x00007fff82401159 in __CFRunLoopRun ()
#31 0x00007fff82400b96 in CFRunLoopRunSpecific ()
#32 0x00007fff89aaecef in RunCurrentEventLoopInMode ()
#33 0x00007fff89aaeae9 in ReceiveNextEventCommon ()
#34 0x00007fff89aae976 in BlockUntilNextEventMatchingListInMode ()
#35 0x00007fff87d2aa31 in _DPSNextEvent ()
#36 0x00007fff87d2a336 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#37 0x00007fff87cef1be in -[NSApplication run] ()
#38 0x0000000101065ed0 in RunLoop::run () at RunLoopMac.mm:56
#39 0x0000000101124807 in WebKit::WebProcessMain (commandLine=@0x7fff5fbfeff8) at WebProcessMainMac.mm:104
#40 0x00000001010a8f81 in WebKitMain (commandLine=@0x7fff5fbfeff8) at WebKitMain.cpp:48
#41 0x00000001010a8dff in WebKitMain (argc=6, argv=0x7fff5fbff0f8) at WebKitMain.cpp:72
#42 0x0000000100000d98 in ?? ()
#43 0x0000000100000c64 in ?? ()
Comment 1 Adam Roben (:aroben) 2011-02-17 06:20:31 PST
<rdar://problem/9016889>
Comment 2 Adam Roben (:aroben) 2011-02-17 08:16:27 PST
Created attachment 82812 [details]
Make sure layout is up-to-date before rendering the layer tree in DrawingAreaImpl
Comment 3 Adam Roben (:aroben) 2011-02-17 08:21:00 PST
Committed r78832: <http://trac.webkit.org/changeset/78832>