Bug 75955 - Web Inspector: add "free flow DOM editing" experiment.
Summary: Web Inspector: add "free flow DOM editing" experiment.
Status: RESOLVED FIXED
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
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-10 05:36 PST by Pavel Feldman
Modified: 2012-01-10 09:39 PST (History)
13 users (show)

See Also:


Attachments
Patch (28.93 KB, patch)
2012-01-10 05:43 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-10 05:36:31 PST
This change enables HTML editing from Resources panel.
Comment 1 Pavel Feldman 2012-01-10 05:43:58 PST
Created attachment 121836 [details]
Patch
Comment 2 Alexander Pavlov (apavlov) 2012-01-10 06:42:34 PST
Comment on attachment 121836 [details]
Patch

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

> Source/WebCore/inspector/DOMEditor.cpp:75
> +            OwnPtr<NodeDigest> oInfo = createNodeDigest(oldElement);

We don't use abbreviations in WebKit

> Source/WebCore/inspector/DOMEditor.cpp:76
> +            OwnPtr<NodeDigest> nInfo = createNodeDigest(newElement);

ditto

> Source/WebCore/inspector/DOMEditor.cpp:127
> +    // Trim tail

Period at the end.

> Source/WebCore/inspector/DOMEditor.cpp:135
> +    // Trim head

Period at the end.

> Source/WebCore/inspector/DOMEditor.cpp:167
> +        if (nit->second.size() != 1)

newIt?

> Source/WebCore/inspector/DOMEditor.cpp:170
> +        DiffTable::iterator oit = oldTable.find(nit->first);

oldIt?

> Source/WebCore/inspector/DOMEditor.cpp:184
> +            newMap[i + 1] = std::make_pair(newList[i + 1].get(), j);

The standard way is
using namespace std;
at the beginning (I've been pointed at it a couple times - kling et al.)

> Source/WebCore/inspector/InspectorDOMAgent.cpp:649
> +        *errorString = "Editing detached nodes is not supported";

... of detached nodes...
Comment 3 Yury Semikhatsky 2012-01-10 08:48:33 PST
Comment on attachment 121836 [details]
Patch

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

> Source/WebCore/inspector/DOMEditor.cpp:228
> +        RefPtr<Node> adoptedNode = oldParent->ownerDocument()->adoptNode(node, ec);

doesn't insertBefore do adoptNode?

> Source/WebCore/inspector/DOMEditor.h:50
> +    DOMEditor(Document*);

explicit

> Source/WebCore/inspector/DOMEditor.h:56
> +    struct NodeDigest {

Forward declaration should be enough.

> Source/WebCore/inspector/DOMEditor.h:57
> +        NodeDigest(Node*);

explicit
Comment 4 Pavel Feldman 2012-01-10 09:01:22 PST
Committed r104586: <http://trac.webkit.org/changeset/104586>