Web Inspector: implement redo for DOM actions.
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Feb 2012 09:12:15 +0000 (09:12 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Feb 2012 09:12:15 +0000 (09:12 +0000)
commit834d976e2a57ba84a2c992cc75ffcdeac30b51bc
tree0ecfab5f5ec825adec3fe700c698da0a1554808d
parent2fcc12c7a099186e8c3c0a9a8ef10ac23e9a085f
Web Inspector: implement redo for DOM actions.
https://bugs.webkit.org/show_bug.cgi?id=78601

Patch by Pavel Feldman <pfeldman@chromium.org> on 2012-02-14
Reviewed by Yury Semikhatsky.

Source/WebCore:

* inspector/DOMEditor.cpp:
(WebCore::DOMEditor::RemoveChildAction::perform):
(WebCore::DOMEditor::RemoveChildAction::redo):
(DOMEditor::RemoveChildAction):
(WebCore::DOMEditor::InsertBeforeAction::redo):
(DOMEditor::InsertBeforeAction):
(WebCore::DOMEditor::RemoveAttributeAction::perform):
(WebCore::DOMEditor::RemoveAttributeAction::redo):
(DOMEditor::RemoveAttributeAction):
(WebCore::DOMEditor::SetAttributeAction::perform):
(WebCore::DOMEditor::SetAttributeAction::redo):
(DOMEditor::SetAttributeAction):
(WebCore::DOMEditor::SetOuterHTMLAction::redo):
(DOMEditor::SetOuterHTMLAction):
(WebCore::DOMEditor::ReplaceWholeTextAction::perform):
(WebCore::DOMEditor::ReplaceWholeTextAction::redo):
(DOMEditor::ReplaceWholeTextAction):
(WebCore::DOMEditor::ReplaceChildNodeAction::perform):
(WebCore::DOMEditor::ReplaceChildNodeAction::redo):
(DOMEditor::ReplaceChildNodeAction):
(WebCore::DOMEditor::SetNodeValueAction::perform):
(WebCore::DOMEditor::SetNodeValueAction::redo):
(DOMEditor::SetNodeValueAction):
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::SetStyleSheetTextAction::perform):
(WebCore::InspectorCSSAgent::SetStyleSheetTextAction::undo):
(WebCore::InspectorCSSAgent::SetStyleSheetTextAction::redo):
(WebCore::InspectorCSSAgent::SetPropertyTextAction::perform):
(InspectorCSSAgent::SetPropertyTextAction):
(WebCore::InspectorCSSAgent::SetPropertyTextAction::undo):
(WebCore::InspectorCSSAgent::SetPropertyTextAction::redo):
(WebCore::InspectorCSSAgent::TogglePropertyAction::perform):
(WebCore::InspectorCSSAgent::TogglePropertyAction::redo):
(InspectorCSSAgent::TogglePropertyAction):
(WebCore::InspectorCSSAgent::SetRuleSelectorAction::perform):
(WebCore::InspectorCSSAgent::SetRuleSelectorAction::redo):
(InspectorCSSAgent::SetRuleSelectorAction):
(WebCore::InspectorCSSAgent::AddRuleAction::perform):
(WebCore::InspectorCSSAgent::AddRuleAction::redo):
(InspectorCSSAgent::AddRuleAction):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setNodeValue):
(WebCore::InspectorDOMAgent::redo):
(WebCore):
* inspector/InspectorDOMAgent.h:
(InspectorDOMAgent):
* inspector/InspectorHistory.cpp:
(WebCore::InspectorHistory::InspectorHistory):
(WebCore::InspectorHistory::perform):
(WebCore::InspectorHistory::markUndoableState):
(WebCore::InspectorHistory::undo):
(WebCore::InspectorHistory::redo):
(WebCore):
* inspector/InspectorHistory.h:
(Action):
(InspectorHistory):
* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModel):
(WebInspector.CSSStyleModel.prototype._undoRedoRequested):
(WebInspector.CSSStyleModel.prototype._undoRedoCompleted):
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMAgent.prototype.get undo):
(WebInspector.DOMAgent.prototype.redo):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype.handleShortcut):

LayoutTests:

* http/tests/inspector/elements-test.js:
(initialize_ElementTest.InspectorTest.generateUndoTest):
* inspector/elements/undo-dom-edits-2-expected.txt:
* inspector/elements/undo-dom-edits-expected.txt:
* inspector/styles/undo-add-new-rule-expected.txt:
* inspector/styles/undo-add-new-rule.html:
* inspector/styles/undo-add-property-expected.txt:
* inspector/styles/undo-add-property.html:
* inspector/styles/undo-change-property-expected.txt:
* inspector/styles/undo-change-property.html:
* inspector/styles/undo-property-toggle-expected.txt:
* inspector/styles/undo-property-toggle.html:
* inspector/styles/undo-set-selector-text-expected.txt:
* inspector/styles/undo-set-selector-text.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
25 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/elements-test.js
LayoutTests/inspector/elements/undo-dom-edits-2-expected.txt
LayoutTests/inspector/elements/undo-dom-edits-expected.txt
LayoutTests/inspector/styles/undo-add-new-rule-expected.txt
LayoutTests/inspector/styles/undo-add-new-rule.html
LayoutTests/inspector/styles/undo-add-property-expected.txt
LayoutTests/inspector/styles/undo-add-property.html
LayoutTests/inspector/styles/undo-change-property-expected.txt
LayoutTests/inspector/styles/undo-change-property.html
LayoutTests/inspector/styles/undo-property-toggle-expected.txt
LayoutTests/inspector/styles/undo-property-toggle.html
LayoutTests/inspector/styles/undo-set-selector-text-expected.txt
LayoutTests/inspector/styles/undo-set-selector-text.html
Source/WebCore/ChangeLog
Source/WebCore/inspector/DOMEditor.cpp
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/inspector/InspectorDOMAgent.h
Source/WebCore/inspector/InspectorHistory.cpp
Source/WebCore/inspector/InspectorHistory.h
Source/WebCore/inspector/front-end/CSSStyleModel.js
Source/WebCore/inspector/front-end/DOMAgent.js
Source/WebCore/inspector/front-end/ElementsPanel.js