[Webkit-unassigned] [Bug 19524] Able to move nodes across documents

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 17 14:46:32 PDT 2008


------- Comment #3 from darin at apple.com  2008-09-17 14:46 PDT -------
(In reply to comment #2)
> I would argue that you shouldn't never be able to move nodes across documents,
> unless you adoptNode(). This is the point of adoptNode().

Yes, that's the point of adoptNode, but, adoptNode was designed by a DOM
working group that was not thinking much about the web.

It's a mistake to drive our design based on the existence of adoptNode. I think
that changing the code to not allow moving nodes between documents creates
unnecessary differences between WebKit and Gecko, so I'd only want to do it if
there was a real compelling reason other than the abstract argument.

> 1) The case of moving a connected node (which now exceptions) should be made to
> work, like it does in Mozilla and Opera.


> 2) We should not do the "adopting" in checkAddChild, this is clearly the wrong
> place to do it, and the adopting is clearly implemented incorrectly. These
> paths should share the same code paths as adoptChild().

Sounds good.

> Adopting needs to be handled carefully, 

"Carefully" doesn't really mean anything.

> it should only be done in one place so we can make sure
> the implementation handles this consistently.

What we need most are enough test cases to show whether we have this right.

How much the code is shared is driven by multiple factors; generally more
sharing is better, unless certain code paths are much hotter than others.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list