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

Unified Diff: Source/core/inspector/InspectorCSSAgent.cpp

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 years, 1 month 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
« no previous file with comments | « Source/core/inspector/DOMPatchSupport.cpp ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorCSSAgent.cpp
diff --git a/Source/core/inspector/InspectorCSSAgent.cpp b/Source/core/inspector/InspectorCSSAgent.cpp
index ecd0faa6c6e14023ed3c080013825f837c4c00f9..a89841b7779696124be1c081a484d0fb62cdfbeb 100644
--- a/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/Source/core/inspector/InspectorCSSAgent.cpp
@@ -318,25 +318,25 @@ public:
{
}
- virtual bool perform(ExceptionState& es)
+ virtual bool perform(ExceptionState& exceptionState)
{
if (!m_styleSheet->getText(&m_oldText))
return false;
- return redo(es);
+ return redo(exceptionState);
}
- virtual bool undo(ExceptionState& es)
+ virtual bool undo(ExceptionState& exceptionState)
{
- if (m_styleSheet->setText(m_oldText, es)) {
+ if (m_styleSheet->setText(m_oldText, exceptionState)) {
m_styleSheet->reparseStyleSheet(m_oldText);
return true;
}
return false;
}
- virtual bool redo(ExceptionState& es)
+ virtual bool redo(ExceptionState& exceptionState)
{
- if (m_styleSheet->setText(m_text, es)) {
+ if (m_styleSheet->setText(m_text, exceptionState)) {
m_styleSheet->reparseStyleSheet(m_text);
return true;
}
@@ -376,20 +376,20 @@ public:
return mergeId() + ": " + m_oldText + " -> " + m_text;
}
- virtual bool perform(ExceptionState& es)
+ virtual bool perform(ExceptionState& exceptionState)
{
- return redo(es);
+ return redo(exceptionState);
}
- virtual bool undo(ExceptionState& es)
+ virtual bool undo(ExceptionState& exceptionState)
{
String placeholder;
- return m_styleSheet->setStyleText(m_cssId, m_oldText, &placeholder, es);
+ return m_styleSheet->setStyleText(m_cssId, m_oldText, &placeholder, exceptionState);
}
- virtual bool redo(ExceptionState& es)
+ virtual bool redo(ExceptionState& exceptionState)
{
- return m_styleSheet->setStyleText(m_cssId, m_text, &m_oldText, es);
+ return m_styleSheet->setStyleText(m_cssId, m_text, &m_oldText, exceptionState);
}
virtual String mergeId()
@@ -428,21 +428,21 @@ public:
return mergeId() + ": " + m_oldText + " -> " + m_text;
}
- virtual bool perform(ExceptionState& es)
+ virtual bool perform(ExceptionState& exceptionState)
{
- return redo(es);
+ return redo(exceptionState);
}
- virtual bool undo(ExceptionState& es)
+ virtual bool undo(ExceptionState& exceptionState)
{
String placeholder;
- return m_styleSheet->setPropertyText(m_cssId, m_propertyIndex, m_overwrite ? m_oldText : "", true, &placeholder, es);
+ return m_styleSheet->setPropertyText(m_cssId, m_propertyIndex, m_overwrite ? m_oldText : "", true, &placeholder, exceptionState);
}
- virtual bool redo(ExceptionState& es)
+ virtual bool redo(ExceptionState& exceptionState)
{
String oldText;
- bool result = m_styleSheet->setPropertyText(m_cssId, m_propertyIndex, m_text, m_overwrite, &oldText, es);
+ bool result = m_styleSheet->setPropertyText(m_cssId, m_propertyIndex, m_text, m_overwrite, &oldText, exceptionState);
m_oldText = oldText.stripWhiteSpace();
// FIXME: remove this once the model handles this case.
if (!m_oldText.endsWith(';'))
@@ -482,19 +482,19 @@ public:
{
}
- virtual bool perform(ExceptionState& es)
+ virtual bool perform(ExceptionState& exceptionState)
{
- return redo(es);
+ return redo(exceptionState);
}
- virtual bool undo(ExceptionState& es)
+ virtual bool undo(ExceptionState& exceptionState)
{
- return m_styleSheet->toggleProperty(m_cssId, m_propertyIndex, !m_disable, es);
+ return m_styleSheet->toggleProperty(m_cssId, m_propertyIndex, !m_disable, exceptionState);
}
- virtual bool redo(ExceptionState& es)
+ virtual bool redo(ExceptionState& exceptionState)
{
- return m_styleSheet->toggleProperty(m_cssId, m_propertyIndex, m_disable, es);
+ return m_styleSheet->toggleProperty(m_cssId, m_propertyIndex, m_disable, exceptionState);
}
private:
@@ -513,22 +513,22 @@ public:
{
}
- virtual bool perform(ExceptionState& es)
+ virtual bool perform(ExceptionState& exceptionState)
{
- m_oldSelector = m_styleSheet->ruleSelector(m_cssId, es);
- if (es.hadException())
+ m_oldSelector = m_styleSheet->ruleSelector(m_cssId, exceptionState);
+ if (exceptionState.hadException())
return false;
- return redo(es);
+ return redo(exceptionState);
}
- virtual bool undo(ExceptionState& es)
+ virtual bool undo(ExceptionState& exceptionState)
{
- return m_styleSheet->setRuleSelector(m_cssId, m_oldSelector, es);
+ return m_styleSheet->setRuleSelector(m_cssId, m_oldSelector, exceptionState);
}
- virtual bool redo(ExceptionState& es)
+ virtual bool redo(ExceptionState& exceptionState)
{
- return m_styleSheet->setRuleSelector(m_cssId, m_selector, es);
+ return m_styleSheet->setRuleSelector(m_cssId, m_selector, exceptionState);
}
private:
@@ -546,20 +546,20 @@ public:
{
}
- virtual bool perform(ExceptionState& es)
+ virtual bool perform(ExceptionState& exceptionState)
{
- return redo(es);
+ return redo(exceptionState);
}
- virtual bool undo(ExceptionState& es)
+ virtual bool undo(ExceptionState& exceptionState)
{
- return m_styleSheet->deleteRule(m_newId, es);
+ return m_styleSheet->deleteRule(m_newId, exceptionState);
}
- virtual bool redo(ExceptionState& es)
+ virtual bool redo(ExceptionState& exceptionState)
{
- CSSStyleRule* cssStyleRule = m_styleSheet->addRule(m_selector, es);
- if (es.hadException())
+ CSSStyleRule* cssStyleRule = m_styleSheet->addRule(m_selector, exceptionState);
+ if (exceptionState.hadException())
return false;
m_newId = m_styleSheet->ruleId(cssStyleRule);
return true;
@@ -1132,9 +1132,9 @@ void InspectorCSSAgent::setStyleSheetText(ErrorString* errorString, const String
if (!inspectorStyleSheet)
return;
- TrackExceptionState es;
- m_domAgent->history()->perform(adoptPtr(new SetStyleSheetTextAction(inspectorStyleSheet, text)), es);
- *errorString = InspectorDOMAgent::toErrorString(es);
+ TrackExceptionState exceptionState;
+ m_domAgent->history()->perform(adoptPtr(new SetStyleSheetTextAction(inspectorStyleSheet, text)), exceptionState);
+ *errorString = InspectorDOMAgent::toErrorString(exceptionState);
}
void InspectorCSSAgent::setStyleText(ErrorString* errorString, const RefPtr<JSONObject>& fullStyleId, const String& text, RefPtr<TypeBuilder::CSS::CSSStyle>& result)
@@ -1146,11 +1146,11 @@ void InspectorCSSAgent::setStyleText(ErrorString* errorString, const RefPtr<JSON
if (!inspectorStyleSheet)
return;
- TrackExceptionState es;
- m_domAgent->history()->perform(adoptPtr(new SetStyleTextAction(inspectorStyleSheet, compoundId, text)), es);
- if (!es.hadException())
+ TrackExceptionState exceptionState;
+ m_domAgent->history()->perform(adoptPtr(new SetStyleTextAction(inspectorStyleSheet, compoundId, text)), exceptionState);
+ if (!exceptionState.hadException())
result = inspectorStyleSheet->buildObjectForStyle(inspectorStyleSheet->styleForId(compoundId));
- *errorString = InspectorDOMAgent::toErrorString(es);
+ *errorString = InspectorDOMAgent::toErrorString(exceptionState);
}
void InspectorCSSAgent::setPropertyText(ErrorString* errorString, const RefPtr<JSONObject>& fullStyleId, int propertyIndex, const String& text, bool overwrite, RefPtr<TypeBuilder::CSS::CSSStyle>& result)
@@ -1162,11 +1162,11 @@ void InspectorCSSAgent::setPropertyText(ErrorString* errorString, const RefPtr<J
if (!inspectorStyleSheet)
return;
- TrackExceptionState es;
- bool success = m_domAgent->history()->perform(adoptPtr(new SetPropertyTextAction(inspectorStyleSheet, compoundId, propertyIndex, text, overwrite)), es);
+ TrackExceptionState exceptionState;
+ bool success = m_domAgent->history()->perform(adoptPtr(new SetPropertyTextAction(inspectorStyleSheet, compoundId, propertyIndex, text, overwrite)), exceptionState);
if (success)
result = inspectorStyleSheet->buildObjectForStyle(inspectorStyleSheet->styleForId(compoundId));
- *errorString = InspectorDOMAgent::toErrorString(es);
+ *errorString = InspectorDOMAgent::toErrorString(exceptionState);
}
void InspectorCSSAgent::toggleProperty(ErrorString* errorString, const RefPtr<JSONObject>& fullStyleId, int propertyIndex, bool disable, RefPtr<TypeBuilder::CSS::CSSStyle>& result)
@@ -1178,11 +1178,11 @@ void InspectorCSSAgent::toggleProperty(ErrorString* errorString, const RefPtr<JS
if (!inspectorStyleSheet)
return;
- TrackExceptionState es;
- bool success = m_domAgent->history()->perform(adoptPtr(new TogglePropertyAction(inspectorStyleSheet, compoundId, propertyIndex, disable)), es);
+ TrackExceptionState exceptionState;
+ bool success = m_domAgent->history()->perform(adoptPtr(new TogglePropertyAction(inspectorStyleSheet, compoundId, propertyIndex, disable)), exceptionState);
if (success)
result = inspectorStyleSheet->buildObjectForStyle(inspectorStyleSheet->styleForId(compoundId));
- *errorString = InspectorDOMAgent::toErrorString(es);
+ *errorString = InspectorDOMAgent::toErrorString(exceptionState);
}
void InspectorCSSAgent::setRuleSelector(ErrorString* errorString, const RefPtr<JSONObject>& fullRuleId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result)
@@ -1194,14 +1194,14 @@ void InspectorCSSAgent::setRuleSelector(ErrorString* errorString, const RefPtr<J
if (!inspectorStyleSheet)
return;
- TrackExceptionState es;
- bool success = m_domAgent->history()->perform(adoptPtr(new SetRuleSelectorAction(inspectorStyleSheet, compoundId, selector)), es);
+ TrackExceptionState exceptionState;
+ bool success = m_domAgent->history()->perform(adoptPtr(new SetRuleSelectorAction(inspectorStyleSheet, compoundId, selector)), exceptionState);
if (success) {
CSSStyleRule* rule = inspectorStyleSheet->ruleForId(compoundId);
result = inspectorStyleSheet->buildObjectForRule(rule, buildMediaListChain(rule));
}
- *errorString = InspectorDOMAgent::toErrorString(es);
+ *errorString = InspectorDOMAgent::toErrorString(exceptionState);
}
void InspectorCSSAgent::addRule(ErrorString* errorString, const int contextNodeId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result)
@@ -1216,12 +1216,12 @@ void InspectorCSSAgent::addRule(ErrorString* errorString, const int contextNodeI
return;
}
- TrackExceptionState es;
+ TrackExceptionState exceptionState;
OwnPtr<AddRuleAction> action = adoptPtr(new AddRuleAction(inspectorStyleSheet, selector));
AddRuleAction* rawAction = action.get();
- bool success = m_domAgent->history()->perform(action.release(), es);
+ bool success = m_domAgent->history()->perform(action.release(), exceptionState);
if (!success) {
- *errorString = InspectorDOMAgent::toErrorString(es);
+ *errorString = InspectorDOMAgent::toErrorString(exceptionState);
return;
}
@@ -1502,11 +1502,11 @@ InspectorStyleSheet* InspectorCSSAgent::viaInspectorStyleSheet(Document* documen
if (inspectorStyleSheet || !createIfAbsent)
return inspectorStyleSheet.get();
- TrackExceptionState es;
- RefPtr<Element> styleElement = document->createElement("style", es);
- if (!es.hadException())
- styleElement->setAttribute("type", "text/css", es);
- if (!es.hadException()) {
+ TrackExceptionState exceptionState;
+ RefPtr<Element> styleElement = document->createElement("style", exceptionState);
+ if (!exceptionState.hadException())
+ styleElement->setAttribute("type", "text/css", exceptionState);
+ if (!exceptionState.hadException()) {
ContainerNode* targetNode;
// HEAD is absent in ImageDocuments, for example.
if (document->head())
@@ -1518,12 +1518,12 @@ InspectorStyleSheet* InspectorCSSAgent::viaInspectorStyleSheet(Document* documen
InlineStyleOverrideScope overrideScope(document);
m_creatingViaInspectorStyleSheet = true;
- targetNode->appendChild(styleElement, es);
+ targetNode->appendChild(styleElement, exceptionState);
// At this point the added stylesheet will get bound through the updateActiveStyleSheets() invocation.
// We just need to pick the respective InspectorStyleSheet from m_documentToInspectorStyleSheet.
m_creatingViaInspectorStyleSheet = false;
}
- if (es.hadException())
+ if (exceptionState.hadException())
return 0;
return m_documentToInspectorStyleSheet.get(document);
« no previous file with comments | « Source/core/inspector/DOMPatchSupport.cpp ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698