Change View.show to call detach if the parentNode dosen't
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 22:29:08 +0000 (22:29 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 22:29:08 +0000 (22:29 +0000)
commitd567c5d0803255cdab2c4be0adf1e754ab502a68
tree682e7c18fad894e01370b395f19dfae537e9f5e5
parent9e79126bb47747b32d6ea29d5c79cbd233131082
Change View.show to call detach if the parentNode dosen't
match before appending to the passed in parent element.
This also prevents appending to the same parent element
multiple times.

Reviewed by John Sullivan.

* page/inspector/FontView.js:
(WebInspector.FontView.prototype.show): Pass the parent element to View.show.
* page/inspector/ResourceView.js: Optimize the attach method to no append if
there is a parentNode already.
* page/inspector/SourceView.js: Ditto.
* page/inspector/View.js: Call detach before appending if the parentNode
doesn't match the passed in element.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33403 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/page/inspector/FontView.js
WebCore/page/inspector/ResourceView.js
WebCore/page/inspector/SourceView.js
WebCore/page/inspector/View.js