Bug 76183 - Web Inspector: make HTML editing preserve node identity when node nesting level changes.
Summary: Web Inspector: make HTML editing preserve node identity when node nesting lev...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
Depends on:
Reported: 2012-01-12 08:51 PST by Pavel Feldman
Modified: 2012-02-26 06:14 PST (History)
11 users (show)

See Also:

Patch (34.56 KB, patch)
2012-01-12 08:54 PST, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2012-01-12 08:51:28 PST
As of today, editing


to become


re-creates <p>Foo</p>, hence all JavaScript wrappers pointing to <p> become invalid.

It should move it into the new <div> instead, while preserving the node identity and wrapper references.
Comment 1 Pavel Feldman 2012-01-12 08:54:41 PST
Created attachment 122253 [details]
Comment 2 Yury Semikhatsky 2012-01-12 09:42:14 PST
Comment on attachment 122253 [details]

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

> Source/WebCore/inspector/DOMEditor.cpp:402
> +    Deque<Digest*> queue;

Why do you prefer BFS over DFS here?
Comment 3 Pavel Feldman 2012-01-13 05:25:11 PST
Committed r104920: <http://trac.webkit.org/changeset/104920>
Comment 4 Csaba Osztrogonác 2012-01-13 05:39:31 PST
(In reply to comment #3)
> Committed r104920: <http://trac.webkit.org/changeset/104920>

Reopen, because it broke the 32 bit builds:
cc1plus: warnings being treated as errors
/ramdisk/qt-linux-32-release-webkit2/build/Source/WebCore/inspector/DOMEditor.cpp: In member function ‘void WebCore::DOMEditor::dumpMap(const WTF::String&, const WTF::Vector<std::pair<WebCore::DOMEditor::Digest*, unsigned int>, 0u>&, const WTF::Vector<WTF::OwnPtr<WebCore::DOMEditor::Digest>, 0u>&)’:
/ramdisk/qt-linux-32-release-webkit2/build/Source/WebCore/inspector/DOMEditor.cpp:430: error: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘size_t’
/ramdisk/qt-linux-32-release-webkit2/build/Source/WebCore/inspector/DOMEditor.cpp:430: error: format ‘%ld’ expects type ‘long int’, but argument 6 has type ‘unsigned int’

Could you fix it?
Comment 5 Csaba Osztrogonác 2012-01-13 06:02:58 PST
Buildfix landed in http://trac.webkit.org/changeset/104923
Comment 6 Antonio Gomes 2012-02-25 13:07:18 PST
(In reply to comment #5)
> Buildfix landed in http://trac.webkit.org/changeset/104923

can be re-closed?