Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(499)

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorHistory.cpp

Issue 1694433003: DevTools: [CSS] Add CSS.setMultipleStyleTexts command to CSS domain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: %zu is not cross-platform - do not use. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/inspector/InspectorHistory.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorHistory.cpp b/third_party/WebKit/Source/core/inspector/InspectorHistory.cpp
index bf12383d1037973d1fef7659d5a98c48e477ddbf..3f672a5dc00b9b3ae0a53f6074a96bbfb34d831a 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorHistory.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorHistory.cpp
@@ -90,7 +90,12 @@ bool InspectorHistory::perform(PassRefPtrWillBeRawPtr<Action> action, ExceptionS
{
if (!action->perform(exceptionState))
return false;
+ appendPerformedAction(action);
+ return true;
+}
+void InspectorHistory::appendPerformedAction(PassRefPtrWillBeRawPtr<Action> action)
+{
if (!action->mergeId().isEmpty() && m_afterLastActionIndex > 0 && action->mergeId() == m_history[m_afterLastActionIndex - 1]->mergeId()) {
m_history[m_afterLastActionIndex - 1]->merge(action);
if (m_history[m_afterLastActionIndex - 1]->isNoop())
@@ -101,7 +106,6 @@ bool InspectorHistory::perform(PassRefPtrWillBeRawPtr<Action> action, ExceptionS
m_history.append(action);
++m_afterLastActionIndex;
}
- return true;
}
void InspectorHistory::markUndoableState()

Powered by Google App Engine
This is Rietveld 408576698