Bug 106011

Summary: box-shadow for fixed positioned SVG does not draw
Product: WebKit Reporter: Stephen Chenney <schenney>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, fmalita, krit, pdr, sabouhallawa, thorton, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jsbin.com/ocizep/1
Attachments:
Description Flags
test case none

Description Stephen Chenney 2013-01-03 05:59:26 PST
See the example at the given URL. This is Chrome bug http://code.google.com/p/chromium/issues/detail?id=167584

When scrolling down the page, then back up, one can see that the box shadow is not cleared upon repaint. I assume this is because the repaint rect does not include the shadow. thorton, can you look at this? As I recall you were in this space very recently.

Here's the example:

<html>
<head>
</head>
<body>
<svg style='height:10px; position:fixed; top:0px; left:0px; width:100%; box-shadow:1px 1px 5px 3px #aaaaaa;'>
  <rect x="0" width="100%" height="100%" style="fill:rgb(102,86,134);"></rect>
</svg>

<div style='height:3000px;'></div>
</body>
</html>

Even better! This crashes on startup in ToT Debug chrome with an assertion:

ASSERTION FAILED: mode & UseTransforms
../../third_party/WebKit/Source/WebCore/rendering/svg/RenderSVGRoot.cpp(407) : virtual void WebCore::RenderSVGRoot::mapLocalToContainer(const WebCore::RenderLayerModelObject *, WebCore::TransformState &, MapCoordinatesFlags, bool *) const

Received signal 11
	base::debug::StackTrace::StackTrace() [0x7f330e0efdbe]
	base::debug::(anonymous namespace)::StackDumpSignalHandler() [0x7f330e0efd75]
	<unknown> [0x7f330427d4a0]
	WebCore::RenderSVGRoot::mapLocalToContainer() [0x7f330f987be3]
	WebCore::RenderObject::localToAbsolute() [0x7f3311ef879e]
	WebCore::accumulateOffsetTowardsAncestor() [0x7f3311e870dd]
	WebCore::RenderLayer::convertToLayerCoords() [0x7f3311e7fb65]
	WebCore::RenderLayer::paintLayerContents() [0x7f3311e9093d]
	WebCore::RenderLayer::paintLayerContentsAndReflection() [0x7f3311e907a4]
	WebCore::RenderLayer::paintLayer() [0x7f3311e8fdef]
	WebCore::RenderLayer::paintList() [0x7f3311e927f9]
	WebCore::RenderLayer::paintLayerContents() [0x7f3311e91a3b]
	WebCore::RenderLayer::paintLayerContentsAndReflection() [0x7f3311e907a4]
	WebCore::RenderLayer::paintLayer() [0x7f3311e8fdef]
	WebCore::RenderLayer::paintList() [0x7f3311e927f9]
	WebCore::RenderLayer::paintLayerContents() [0x7f3311e91a3b]
	WebCore::RenderLayer::paintLayerContentsAndReflection() [0x7f3311e907a4]
	WebCore::RenderLayer::paintLayer() [0x7f3311e8fdef]
	WebCore::RenderLayer::paint() [0x7f3311e8f63e]
	WebCore::FrameView::paintContents() [0x7f330f5f83e0]
	WebCore::ScrollView::paint() [0x7f33111d218e]
	WebKit::PageWidgetDelegate::paint() [0x7f330ddb854a]
	WebKit::WebViewImpl::paint() [0x7f330dd5cd19]
	content::RenderWidget::PaintRect() [0x7f33109a36af]
	content::RenderWidget::DoDeferredUpdate() [0x7f331099e7b8]
	content::RenderWidget::DoDeferredUpdateAndSendInputAck() [0x7f33109a2ae9]
	content::RenderWidget::InvalidationCallback() [0x7f33109a4467]
Comment 1 Tim Horton 2013-01-03 10:50:43 PST
(In reply to comment #0)
> thorton, can you look at this? As I recall you were in this space very recently.

That was -webkit-svg-shadow, not box-shadow. I've not recently touched the box-shadow code, and I don't think they're related.
Comment 2 Stephen Chenney 2013-01-03 11:13:14 PST
(In reply to comment #1)
> (In reply to comment #0)
> > thorton, can you look at this? As I recall you were in this space very recently.
> 
> That was -webkit-svg-shadow, not box-shadow. I've not recently touched the box-shadow code, and I don't think they're related.

OK. Anyone is free to grab this issue.
Comment 3 Said Abou-Hallawa 2017-02-08 10:49:43 PST
Created attachment 300924 [details]
test case
Comment 4 Said Abou-Hallawa 2017-02-08 10:50:52 PST
Currently the s
Comment 5 Said Abou-Hallawa 2017-02-08 10:52:50 PST
Currently the box-shadow does not draw anything for a fixed positioned SVG. There is no crash here but this is an assertion failure which is covered by https://bugs.webkit.org/show_bug.cgi?id=31278.
Comment 6 Radar WebKit Bug Importer 2022-07-15 15:58:22 PDT
<rdar://problem/97098951>