Bug 47181 - SVGFEMergeNodeElement doesn't support dynamic invalidation
Summary: SVGFEMergeNodeElement doesn't support dynamic invalidation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 45453
  Show dependency treegraph
 
Reported: 2010-10-05 08:34 PDT by Renata Hodovan
Modified: 2010-10-06 10:10 PDT (History)
3 users (show)

See Also:


Attachments
Patch for feMergeNode properties (135.60 KB, patch)
2010-10-05 08:46 PDT, Renata Hodovan
krit: review-
krit: commit-queue-
Details | Formatted Diff | Diff
Patch for feMergeNode properties (137.75 KB, patch)
2010-10-06 03:38 PDT, Renata Hodovan
zimmermann: review-
Details | Formatted Diff | Diff
Patch for feMergeNode properties (137.74 KB, patch)
2010-10-06 04:32 PDT, Renata Hodovan
zimmermann: review-
Details | Formatted Diff | Diff
Patch for feMergeNode properties (137.77 KB, patch)
2010-10-06 05:15 PDT, Renata Hodovan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Renata Hodovan 2010-10-05 08:34:36 PDT
SVGFEMergeNodeElement doesn't support dynamic invalidation
Comment 1 Renata Hodovan 2010-10-05 08:46:08 PDT
Created attachment 69792 [details]
Patch for feMergeNode properties
Comment 2 Dirk Schulze 2010-10-05 10:00:47 PDT
Comment on attachment 69792 [details]
Patch for feMergeNode properties

Not sure, why you need feComposite on the tests. A test like this should be as simple as possible :-) Nevertheless, the patch itself looks great, but you should describe in the ChangeLog what you did to fix this issue. For example why did you ask the parent? why doesn't feMergeNode have a renderer, so that you have to call invalidation via the parent? And so on. As long as you don't have commit privileges, you have to upload a second patch. :-( r- because of the ChangeLog.
Comment 3 Renata Hodovan 2010-10-06 03:38:09 PDT
Created attachment 69913 [details]
Patch for feMergeNode properties
Comment 4 Nikolas Zimmermann 2010-10-06 04:04:01 PDT
Comment on attachment 69913 [details]
Patch for feMergeNode properties

View in context: https://bugs.webkit.org/attachment.cgi?id=69913&action=review

Looks good other than that, though as you can't commit yet on your own, you probably need to upload a new patch, hence r-.

> WebCore/ChangeLog:8
> +        Since feMergeNode doesn't have own renderer, we have to call the invalidation via it's parent.

s/it's/its/

> WebCore/svg/SVGFEMergeNodeElement.cpp:55
> +    if (attrName == SVGNames::inAttr) {

If there's only one attribute to consider, you may want to use early exit style here.
if (attrName != SVGNames::inAttr)
    return;
Comment 5 Renata Hodovan 2010-10-06 04:32:35 PDT
Created attachment 69921 [details]
Patch for feMergeNode properties
Comment 6 Nikolas Zimmermann 2010-10-06 04:50:53 PDT
Comment on attachment 69921 [details]
Patch for feMergeNode properties

View in context: https://bugs.webkit.org/attachment.cgi?id=69921&action=review

Other than that it looks good...

> WebCore/svg/SVGFEMergeNodeElement.cpp:62
> +    if (attrName != SVGNames::inAttr)
> +        return;
> +    if (Node* parentNode = parent()) {
> +        RenderObject* renderer = parentNode->renderer();
> +        if (renderer && renderer->isSVGResourceFilterPrimitive())
> +            RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
> +    }
> +}

Sorry, for not being clear. I meant:

if (attrName != SVGNames::inAttr)
    return;

Node* parentNode = parent();
if (!parentNode)
    return;

RenderObject* renderer = parentNode->renderer();
if (!renderer || !renderer->isSVGResourceFilterPrimitive())
    return;

RenderSVGResource::mark...
Comment 7 Renata Hodovan 2010-10-06 05:15:27 PDT
Created attachment 69927 [details]
Patch for feMergeNode properties
Comment 8 Nikolas Zimmermann 2010-10-06 05:19:56 PDT
Comment on attachment 69927 [details]
Patch for feMergeNode properties

Looks good, r=me.
Comment 9 WebKit Commit Bot 2010-10-06 10:10:02 PDT
Comment on attachment 69927 [details]
Patch for feMergeNode properties

Clearing flags on attachment: 69927

Committed r69206: <http://trac.webkit.org/changeset/69206>
Comment 10 WebKit Commit Bot 2010-10-06 10:10:09 PDT
All reviewed patches have been landed.  Closing bug.