WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
70044
SVG Filter on a group doesn't invalidate when children are moved
https://bugs.webkit.org/show_bug.cgi?id=70044
Summary
SVG Filter on a group doesn't invalidate when children are moved
Tim Horton
Reported
2011-10-13 12:19:49 PDT
Repro attached; the filter is attached to a <g>, we're moving children of the <g> (a <circle>) from within JS. When the filter is applied, the filter never invalidates.
Attachments
repro
(490 bytes, image/svg+xml)
2011-10-13 12:20 PDT
,
Tim Horton
no flags
Details
preliminary (no changelog/test) patch
(2.59 KB, patch)
2011-10-21 16:36 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
patch
(18.09 KB, patch)
2011-10-26 13:17 PDT
,
Tim Horton
zimmermann
: review+
zimmermann
: commit-queue-
Details
Formatted Diff
Diff
fix the test
(1.16 KB, patch)
2011-11-01 14:07 PDT
,
Tim Horton
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2011-10-13 12:20:05 PDT
Created
attachment 110886
[details]
repro
Radar WebKit Bug Importer
Comment 2
2011-10-13 12:20:28 PDT
<
rdar://problem/10281529
>
Radar WebKit Bug Importer
Comment 3
2011-10-13 12:20:32 PDT
<
rdar://problem/10281530
>
Dirk Schulze
Comment 4
2011-10-13 12:41:35 PDT
Adding Reni to this bug.
Tim Horton
Comment 5
2011-10-21 16:36:57 PDT
Created
attachment 112042
[details]
preliminary (no changelog/test) patch I don't like the "only call clientChildLayoutChanged if we didn't clientLayoutChanged" semantic.
Nikolas Zimmermann
Comment 6
2011-10-22 00:12:43 PDT
Comment on
attachment 112042
[details]
preliminary (no changelog/test) patch View in context:
https://bugs.webkit.org/attachment.cgi?id=112042&action=review
> Source/WebCore/rendering/svg/RenderSVGContainer.cpp:73 > + if (m_everHadLayout) { > + if (selfNeedsLayout()) > + SVGResourcesCache::clientLayoutChanged(this); > + else if(needsLayout()) > + SVGResourcesCache::clientChildLayoutChanged(this); > + }
In general the idea looks sane to me. I'd propose to not do any selfNeedsLayout/needsLayout checks on the call site at all but leave that to clientLayoutChanged().
Tim Horton
Comment 7
2011-10-26 13:17:46 PDT
Created
attachment 112583
[details]
patch
Nikolas Zimmermann
Comment 8
2011-10-27 00:29:37 PDT
Comment on
attachment 112583
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=112583&action=review
r=me, assuming no pixel regressions. Some comments on the test:
> LayoutTests/svg/filters/invalidate-on-child-layout.svg:1 > +<svg xmlns="
http://www.w3.org/2000/svg
" onload="setup()">
The onload="setup()" is not really needed. You can just use setTimeout(jump, 0) in the <script> directly. Also I'd rename jump to executeTest.
> LayoutTests/svg/filters/invalidate-on-child-layout.svg:6 > + layoutTestController.display();
Why is display() needed? I guess you want to test repainting, but in the expected.png I can not see any gray overlay, which should be produced by display(). Can it be removed?
> LayoutTests/svg/filters/invalidate-on-child-layout.svg:16 > + a.setAttributeNS(null,"cx",100); > + a.setAttributeNS(null,"cy",100);
setAttribute("cx", "100") ...
> LayoutTests/svg/filters/invalidate-on-child-layout.svg:29 > +<g filter="url(#filt)"> > + <circle id="c" r="50" cx="50" cy="50" />
Nitpick, I'd name the resources "filter" and "circle", to avoid confusion.
WebKit Review Bot
Comment 9
2011-10-27 07:01:48 PDT
Comment on
attachment 112583
[details]
patch
Attachment 112583
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/10226697
New failing tests: svg/filters/invalidate-on-child-layout.svg
Tim Horton
Comment 10
2011-10-27 11:05:41 PDT
(In reply to
comment #8
)
> (From update of
attachment 112583
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=112583&action=review
> > Why is display() needed? I guess you want to test repainting, but in the expected.png I can not see any gray overlay, which should be produced by display(). Can it be removed?
Is there a way to force a repaint without doing the grey wash thing? Without the display(), I was seeing (before the fix) the test *pass* sometimes because the animation would happen before the first paint. (i.e. without the display(), before this fix, the test is a flaky fail).
Nikolas Zimmermann
Comment 11
2011-10-27 23:55:21 PDT
(In reply to
comment #10
)
> Is there a way to force a repaint without doing the grey wash thing? Without the display(), I was seeing (before the fix) the test *pass* sometimes because the animation would happen before the first paint. (i.e. without the display(), before this fix, the test is a flaky fail).
Hm, good question. Without knowing exactly what's causing the pass theres probably no other way. Anyhow, it's fine with me, this shouldn't block your patch. Let's live with it :-)
Tim Horton
Comment 12
2011-11-01 12:14:09 PDT
Landed in
r98989
.
John Gregg
Comment 13
2011-11-01 13:25:52 PDT
In your test, you removed the setup() method but left the call to it in onload. This causes chromium to fail your layout test because it throws a ReferenceError in the output.
Tim Horton
Comment 14
2011-11-01 13:29:44 PDT
(In reply to
comment #13
)
> In your test, you removed the setup() method but left the call to it in onload. This causes chromium to fail your layout test because it throws a ReferenceError in the output.
Whoops! I'll fix that right away.
Tim Horton
Comment 15
2011-11-01 14:07:14 PDT
Created
attachment 113212
[details]
fix the test
Tim Horton
Comment 16
2011-11-01 17:34:33 PDT
For whatever reason (because this was marked RESOLVED?) commit-queue never took the patch. Landed manually as
r99017
.
Patrick R. Gansterer
Comment 17
2011-11-02 07:19:23 PDT
Landed build fix for !ENABLE(FILTERS) in
http://trac.webkit.org/changeset/99056
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