WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 101773
[WK2] fast/repaint/body-background-image.html is flaky because of caching issues
https://bugs.webkit.org/show_bug.cgi?id=101773
Summary
[WK2] fast/repaint/body-background-image.html is flaky because of caching issues
Raphael Kubo da Costa (:rakuco)
Reported
2012-11-09 09:24:01 PST
This reminds me of the discussion about clearing the cache between tests which we had in webkit-dev a few days ago. In WebKitTestRunner, we do not clear the memory cache between each test, and fast/repaint/body-background-image.html generates the wrong pixel results if a test that also loads fast/repaint/resources/apple.jpg is run first (eg. fast/repaint/block-layout-inline-children-replaced.html or fast/repaint/backgroundSizeRepaint.html). In this case, WTR::TestRunner::display() calls WKBundlePageForceRepaint() and the repaint rects we need end up being added too early and removed before the time we get to use them. This happens because the resource is already cached and WKBundlePageForceRepaint() does this: #0 WebCore::FrameView::repaintContentRectangle (this=0x7a5ce0, r=..., immediate=false) at /home/rakuco/dev/WebKit/Source/WebCore/page/FrameView.cpp:1899 #1 0x00007ffff2607fd6 in WebCore::RenderView::repaintViewRectangle (this=0x808be8, ur=..., immediate=false) at /home/rakuco/dev/WebKit/Source/WebCore/rendering/RenderView.cpp:415 #2 0x00007ffff2597554 in WebCore::RenderObject::repaintUsingContainer (this=0x6d2fd8, repaintContainer=0x808be8, r=..., immediate=false) at /home/rakuco/dev/WebKit/Source/WebCore/rendering/RenderObject.cpp:1339 #3 0x00007ffff2597742 in WebCore::RenderObject::repaintRectangle (this=0x6d2fd8, r=..., immediate=false) at /home/rakuco/dev/WebKit/Source/WebCore/rendering/RenderObject.cpp:1375 #4 0x00007ffff24d4578 in WebCore::RenderBox::repaintLayerRectsForImage (this=0x6d2fd8, image=0x878190, layers=0x875998, drawingBackground=true) at /home/rakuco/dev/WebKit/Source/WebCore/rendering/RenderBox.cpp:1056 #5 0x00007ffff24d3f71 in WebCore::RenderBox::imageChanged (this=0x6d2fd8, image=0x878190) at /home/rakuco/dev/WebKit/Source/WebCore/rendering/RenderBox.cpp:1009 #6 0x00007ffff259df2b in WebCore::RenderObject::imageChanged (this=0x6d2fd8, image=0x878190, rect=0x0) at /home/rakuco/dev/WebKit/Source/WebCore/rendering/RenderObject.cpp:2902 #7 0x00007ffff22037d2 in WebCore::CachedImage::didAddClient (this=0x878190, c=0x6d2fd8) at /home/rakuco/dev/WebKit/Source/WebCore/loader/cache/CachedImage.cpp:96 #8 0x00007ffff2209743 in WebCore::CachedResource::addClient (this=0x878190, client=0x6d2fd8) at /home/rakuco/dev/WebKit/Source/WebCore/loader/cache/CachedResource.cpp:451 #9 0x00007ffff26442ab in WebCore::StyleCachedImage::addClient (this=0x816790, renderer=0x6d2fd8) at /home/rakuco/dev/WebKit/Source/WebCore/rendering/style/StyleCachedImage.cpp:96 #10 0x00007ffff259afa1 in WebCore::RenderObject::updateFillImages (this=0x6d2fd8, oldLayers=0x864878, newLayers=0x875998) at /home/rakuco/dev/WebKit/Source/WebCore/rendering/RenderObject.cpp:2000 #11 0x00007ffff259a0a3 in WebCore::RenderObject::setStyle (this=0x6d2fd8, style=...) at /home/rakuco/dev/WebKit/Source/WebCore/rendering/RenderObject.cpp:1777 #12 0x00007ffff2599e57 in WebCore::RenderObject::setAnimatableStyle (this=0x6d2fd8, style=...) at /home/rakuco/dev/WebKit/Source/WebCore/rendering/RenderObject.cpp:1691 #13 0x00007ffff1d9a451 in WebCore::Element::recalcStyle (this=0x81b5b0, change=WebCore::Node::NoChange) at /home/rakuco/dev/WebKit/Source/WebCore/dom/Element.cpp:1261 #14 0x00007ffff1d9a7a0 in WebCore::Element::recalcStyle (this=0x737b40, change=WebCore::Node::NoChange) at /home/rakuco/dev/WebKit/Source/WebCore/dom/Element.cpp:1312 #15 0x00007ffff1d314e1 in WebCore::Document::recalcStyle (this=0x7d43b0, change=WebCore::Node::NoChange) at /home/rakuco/dev/WebKit/Source/WebCore/dom/Document.cpp:1862 #16 0x00007ffff1d3176a in WebCore::Document::updateStyleIfNeeded (this=0x7d43b0) at /home/rakuco/dev/WebKit/Source/WebCore/dom/Document.cpp:1906 #17 0x00007ffff22abbee in WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive (this=0x7a5ce0) at /home/rakuco/dev/WebKit/Source/WebCore/page/FrameView.cpp:3354 #18 0x00007fffeee74830 in WebKit::WebPage::layoutIfNeeded (this=0x6f5a20) at /home/rakuco/dev/WebKit/Source/WebKit2/WebProcess/WebPage/WebPage.cpp:951 #19 0x00007fffeee5997d in WebKit::DrawingAreaImpl::forceRepaint (this=0x6e0cd0) at /home/rakuco/dev/WebKit/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp:188 #20 0x00007fffeee78133 in WebKit::WebPage::forceRepaintWithoutCallback (this=0x6f5a20) at /home/rakuco/dev/WebKit/Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2107 #21 0x00007fffeeddeac7 in WKBundlePageForceRepaint (page=0x6f5a20) at /home/rakuco/dev/WebKit/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:345 #22 0x00007ffff7ed827f in WTR::TestRunner::display (this=0x8194d0) at /home/rakuco/dev/WebKit/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:116 Not sure how to proceed here, since clearing the cache between tests is not a consensus and this might be an actual bug somewhere else.
Attachments
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2012-11-23 11:55:32 PST
Can we fix the test to load the image in JS, and end when we know the image has loaded?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug