Bug 79697 - Move WebCore-internal DOM notification methods from Node to ContainerNode where appropriate
Summary: Move WebCore-internal DOM notification methods from Node to ContainerNode whe...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adam Klein
URL:
Keywords:
Depends on:
Blocks: 79316
  Show dependency treegraph
 
Reported: 2012-02-27 13:53 PST by Adam Klein
Modified: 2012-02-27 14:53 PST (History)
3 users (show)

See Also:


Attachments
Patch (9.00 KB, patch)
2012-02-27 14:01 PST, Adam Klein
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Klein 2012-02-27 13:53:36 PST
Move WebCore-internal DOM notification methods from Node to ContainerNode where appropriate
Comment 1 Adam Klein 2012-02-27 14:01:31 PST
Created attachment 129097 [details]
Patch
Comment 2 Ryosuke Niwa 2012-02-27 14:06:57 PST
Comment on attachment 129097 [details]
Patch

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

> Source/WebCore/dom/ContainerNode.cpp:817
>      for (Node* child = m_firstChild; child; child = child->nextSibling())
> -        child->insertedIntoTree(true);
> +        if (child->isContainerNode())
> +            toContainerNode(child)->insertedIntoTree(true);

Nit: this for loop needs curly brackets now.

> Source/WebCore/dom/ContainerNode.cpp:826
>      for (Node* child = m_firstChild; child; child = child->nextSibling())
> -        child->removedFromTree(true);
> +        if (child->isContainerNode())
> +            toContainerNode(child)->removedFromTree(true);

Ditto.

> Source/WebCore/dom/ContainerNode.h:91
> +    virtual void insertedIntoTree(bool deep);
> +    virtual void removedFromTree(bool deep);

We should change these to enums (of course in a separate patch) :(
Comment 3 Adam Klein 2012-02-27 14:53:35 PST
Committed r109026: <http://trac.webkit.org/changeset/109026>