2011-03-31 Andrey Kosyakov <caseq@chromium.org>
authorcaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Mar 2011 15:21:33 +0000 (15:21 +0000)
committercaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Mar 2011 15:21:33 +0000 (15:21 +0000)
        Reviewed by Yury Semikhatsky.

        Web Inspector: remove periods at the end of error messages
        https://bugs.webkit.org/show_bug.cgi?id=57544

        * inspector/InjectedScript.cpp:
        (WebCore::InjectedScript::getProperties):
        (WebCore::InjectedScript::makeObjectCall):
        * inspector/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::elementForId):
        (WebCore::InspectorCSSAgent::styleSheetForId):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::assertNode):
        (WebCore::InspectorDOMAgent::assertElement):
        (WebCore::InspectorDOMAgent::assertHTMLElement):
        (WebCore::InspectorDOMAgent::querySelector):
        (WebCore::InspectorDOMAgent::querySelectorAll):
        (WebCore::InspectorDOMAgent::setAttribute):
        (WebCore::InspectorDOMAgent::removeAttribute):
        (WebCore::InspectorDOMAgent::removeNode):
        (WebCore::InspectorDOMAgent::setNodeValue):
        * inspector/InspectorDebuggerAgent.cpp:
        (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
        * inspector/InspectorResourceAgent.cpp:
        (WebCore::InspectorResourceAgent::resourceContent):
        (WebCore::InspectorResourceAgent::resourceContentBase64):
        (WebCore::InspectorResourceAgent::getResourceContent):
        * inspector/InspectorRuntimeAgent.cpp:
        (WebCore::InspectorRuntimeAgent::setPropertyValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82581 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/InjectedScript.cpp
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/inspector/InspectorDebuggerAgent.cpp
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/inspector/InspectorRuntimeAgent.cpp

index 1d50ded..947362c 100644 (file)
@@ -1,3 +1,35 @@
+2011-03-31  Andrey Kosyakov  <caseq@chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: remove periods at the end of error messages
+        https://bugs.webkit.org/show_bug.cgi?id=57544
+
+        * inspector/InjectedScript.cpp:
+        (WebCore::InjectedScript::getProperties):
+        (WebCore::InjectedScript::makeObjectCall):
+        * inspector/InspectorCSSAgent.cpp:
+        (WebCore::InspectorCSSAgent::elementForId):
+        (WebCore::InspectorCSSAgent::styleSheetForId):
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::assertNode):
+        (WebCore::InspectorDOMAgent::assertElement):
+        (WebCore::InspectorDOMAgent::assertHTMLElement):
+        (WebCore::InspectorDOMAgent::querySelector):
+        (WebCore::InspectorDOMAgent::querySelectorAll):
+        (WebCore::InspectorDOMAgent::setAttribute):
+        (WebCore::InspectorDOMAgent::removeAttribute):
+        (WebCore::InspectorDOMAgent::removeNode):
+        (WebCore::InspectorDOMAgent::setNodeValue):
+        * inspector/InspectorDebuggerAgent.cpp:
+        (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
+        * inspector/InspectorResourceAgent.cpp:
+        (WebCore::InspectorResourceAgent::resourceContent):
+        (WebCore::InspectorResourceAgent::resourceContentBase64):
+        (WebCore::InspectorResourceAgent::getResourceContent):
+        * inspector/InspectorRuntimeAgent.cpp:
+        (WebCore::InspectorRuntimeAgent::setPropertyValue):
+
 2011-03-31  Evan Martin  <evan@chromium.org>
 
         Reviewed by Eric Seidel.
index ee2e35a..2f2a68f 100644 (file)
@@ -85,7 +85,7 @@ void InjectedScript::getProperties(ErrorString* errorString, const String& objec
     RefPtr<InspectorValue> result; 
     makeCall(function, &result);
     if (!result || result->type() != InspectorValue::TypeArray) {
-        *errorString = "Internal error.";
+        *errorString = "Internal error";
         return;
     }
     *properties = result->asArray();
@@ -209,7 +209,7 @@ void InjectedScript::makeObjectCall(ErrorString* errorString, ScriptFunctionCall
     }
 
     if (!result || result->type() != InspectorValue::TypeObject) {
-        *errorString = "Internal error.";
+        *errorString = "Internal error";
         return;
     }
     *objectResult = result->asObject();
index 9367869..80b2e20 100644 (file)
@@ -408,11 +408,11 @@ Element* InspectorCSSAgent::elementForId(ErrorString* errorString, int nodeId)
 {
     Node* node = m_domAgent->nodeForId(nodeId);
     if (!node) {
-        *errorString = "No node with given id found.";
+        *errorString = "No node with given id found";
         return 0;
     }
     if (node->nodeType() != Node::ELEMENT_NODE) {
-        *errorString = "Not an element node.";
+        *errorString = "Not an element node";
         return 0;
     }
     return static_cast<Element*>(node);
@@ -475,7 +475,7 @@ InspectorStyleSheet* InspectorCSSAgent::styleSheetForId(ErrorString* errorString
 {
     IdToInspectorStyleSheet::iterator it = m_idToInspectorStyleSheet.find(styleSheetId);
     if (it == m_idToInspectorStyleSheet.end()) {
-        *errorString = "No style sheet with given id found.";
+        *errorString = "No style sheet with given id found";
         return 0;
     }
     return it->second.get();
index 06c5977..933acb9 100644 (file)
@@ -397,7 +397,7 @@ Node* InspectorDOMAgent::assertNode(ErrorString* errorString, int nodeId)
 {
     Node* node = nodeForId(nodeId);
     if (!node) {
-        *errorString = "Could not find node with given id.";
+        *errorString = "Could not find node with given id";
         return 0;
     }
     return node;
@@ -410,7 +410,7 @@ Element* InspectorDOMAgent::assertElement(ErrorString* errorString, int nodeId)
         return 0;
 
     if (node->nodeType() != Node::ELEMENT_NODE) {
-        *errorString = "Node is not an Element.";
+        *errorString = "Node is not an Element";
         return 0;
     }
     return toElement(node);
@@ -424,7 +424,7 @@ HTMLElement* InspectorDOMAgent::assertHTMLElement(ErrorString* errorString, int
         return 0;
 
     if (!element->isHTMLElement()) {
-        *errorString = "Node is not an HTML Element.";
+        *errorString = "Node is not an HTML Element";
         return 0;
     }
     return toHTMLElement(element);
@@ -512,7 +512,7 @@ void InspectorDOMAgent::querySelector(ErrorString* errorString, int nodeId, cons
     ExceptionCode ec = 0;
     RefPtr<Element> element = node->querySelector(selectors, ec);
     if (ec) {
-        *errorString = "DOM Error while querying.";
+        *errorString = "DOM Error while querying";
         return;
     }
 
@@ -529,7 +529,7 @@ void InspectorDOMAgent::querySelectorAll(ErrorString* errorString, int nodeId, c
     ExceptionCode ec = 0;
     RefPtr<NodeList> nodes = node->querySelectorAll(selectors, ec);
     if (ec) {
-        *errorString = "DOM Error while querying.";
+        *errorString = "DOM Error while querying";
         return;
     }
 
@@ -595,7 +595,7 @@ void InspectorDOMAgent::setAttribute(ErrorString* errorString, int elementId, co
         ExceptionCode ec = 0;
         element->setAttribute(name, value, ec);
         if (ec)
-            *errorString = "Exception while setting attribute value.";
+            *errorString = "Exception while setting attribute value";
     }
 }
 
@@ -606,7 +606,7 @@ void InspectorDOMAgent::removeAttribute(ErrorString* errorString, int elementId,
         ExceptionCode ec = 0;
         element->removeAttribute(name, ec);
         if (ec)
-            *errorString = "Exception while removing attribute.";
+            *errorString = "Exception while removing attribute";
     }
 }
 
@@ -618,14 +618,14 @@ void InspectorDOMAgent::removeNode(ErrorString* errorString, int nodeId)
 
     ContainerNode* parentNode = node->parentNode();
     if (!parentNode) {
-        *errorString = "Can not remove detached node.";
+        *errorString = "Can not remove detached node";
         return;
     }
 
     ExceptionCode ec = 0;
     parentNode->removeChild(node, ec);
     if (ec)
-        *errorString = "Could not remove node due to DOM exception.";
+        *errorString = "Could not remove node due to DOM exception";
 }
 
 void InspectorDOMAgent::setNodeName(ErrorString*, int nodeId, const String& tagName, int* newId)
@@ -716,7 +716,7 @@ void InspectorDOMAgent::setNodeValue(ErrorString* errorString, int nodeId, const
         return;
 
     if (node->nodeType() != Node::TEXT_NODE) {
-        *errorString = "Can only set value of text nodes.";
+        *errorString = "Can only set value of text nodes";
         return;
     }
 
@@ -724,7 +724,7 @@ void InspectorDOMAgent::setNodeValue(ErrorString* errorString, int nodeId, const
     ExceptionCode ec = 0;
     textNode->replaceWholeText(value, ec);
     if (ec)
-        *errorString = "DOM Error while setting the node value.";
+        *errorString = "DOM Error while setting the node value";
 }
 
 void InspectorDOMAgent::getEventListenersForNode(ErrorString*, int nodeId, RefPtr<InspectorArray>* listenersArray)
index 56bc7b7..1417da3 100644 (file)
@@ -301,7 +301,7 @@ void InspectorDebuggerAgent::setPauseOnExceptionsState(ErrorString* errorString,
 {
     scriptDebugServer().setPauseOnExceptionsState(static_cast<ScriptDebugServer::PauseOnExceptionsState>(pauseState));
     if (scriptDebugServer().pauseOnExceptionsState() != pauseState)
-        *errorString = "Internal error. Could not change pause on exceptions state.";
+        *errorString = "Internal error. Could not change pause on exceptions state";
 }
 
 void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString* errorString, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, RefPtr<InspectorObject>* result)
index 1e2c16d..20838df 100644 (file)
@@ -94,7 +94,7 @@ void InspectorResourceAgent::restore()
 void InspectorResourceAgent::resourceContent(ErrorString* errorString, Frame* frame, const KURL& url, String* result)
 {
     if (!frame) {
-        *errorString = "No frame to get resource content for."; 
+        *errorString = "No frame to get resource content for"; 
         return;
     }
 
@@ -108,7 +108,7 @@ void InspectorResourceAgent::resourceContent(ErrorString* errorString, Frame* fr
         *result = encoding.decode(buffer->data(), buffer->size());
         return;
     }
-    *errorString = "No resource with given URL found."; 
+    *errorString = "No resource with given URL found"; 
 }
 
 void InspectorResourceAgent::resourceContentBase64(ErrorString* errorString, Frame* frame, const KURL& url, String* result)
@@ -117,7 +117,7 @@ void InspectorResourceAgent::resourceContentBase64(ErrorString* errorString, Fra
     RefPtr<SharedBuffer> data = InspectorResourceAgent::resourceData(frame, url, &textEncodingName);
     if (!data) {
         *result = String();
-        *errorString = "No resource with given URL found."; 
+        *errorString = "No resource with given URL found"; 
         return;
     }
 
@@ -493,7 +493,7 @@ void InspectorResourceAgent::getResourceContent(ErrorString* errorString, const
 {
     Frame* frame = frameForId(frameId);
     if (!frame) {
-        *errorString = "No frame for given id found.";
+        *errorString = "No frame for given id found";
         return;
     }
     if (base64Encode)
index 04fed9d..752e734 100644 (file)
@@ -85,7 +85,7 @@ void InspectorRuntimeAgent::setPropertyValue(ErrorString* errorString, const Str
     if (!injectedScript.hasNoValue())
         injectedScript.setPropertyValue(errorString, objectId, propertyName, expression);
     else
-        *errorString = "No injected script found.";
+        *errorString = "No injected script found";
 }
 
 void InspectorRuntimeAgent::releaseObject(ErrorString*, const String& objectId)