Bug 78346 - Web Inspector: implement undo for setOuterHTML via undo-ing nested primitive commands.
Summary: Web Inspector: implement undo for setOuterHTML via undo-ing nested primitive ...
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-02-10 03:32 PST by Pavel Feldman
Modified: 2012-02-10 05:15 PST (History)
10 users (show)

See Also:


Attachments
Patch (72.86 KB, patch)
2012-02-10 03:46 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-02-10 03:32:27 PST
Patch to follow.
Comment 1 Pavel Feldman 2012-02-10 03:46:44 PST
Created attachment 126494 [details]
Patch
Comment 2 Yury Semikhatsky 2012-02-10 05:06:06 PST
Comment on attachment 126494 [details]
Patch

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

> Source/WebCore/inspector/DOMEditor.h:35
> +

Forward declaration should be enough

> Source/WebCore/inspector/InspectorCSSAgent.cpp:233
> +        InspectorStyleSheet* styleSheet = m_cssAgent->assertStyleSheetForId(0, m_styleSheetId);

It is unsafe to pass 0 here as the method might eventually start writing some error string there

> Source/WebCore/inspector/InspectorCSSAgent.cpp:619
> +    *errorString = InspectorDOMAgent::toErrorString(ec);

Don't do this on success

> Source/WebCore/inspector/InspectorCSSAgent.cpp:635
> +    *errorString = InspectorDOMAgent::toErrorString(ec);

Ditto

> Source/WebCore/inspector/InspectorHistory.h:62
> +        virtual bool perform(ExceptionCode&) = 0;

ExceptionCode should be forward declared
Comment 3 Pavel Feldman 2012-02-10 05:15:33 PST
Committed r107399: <http://trac.webkit.org/changeset/107399>