summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/InspectorValues.cpp
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-09-08 12:18:00 +0100
committerKristian Monsen <kristianm@google.com>2010-09-11 12:08:58 +0100
commit5ddde30071f639962dd557c453f2ad01f8f0fd00 (patch)
tree775803c4ab35af50aa5f5472cd1fb95fe9d5152d /WebCore/inspector/InspectorValues.cpp
parent3e63d9b33b753ca86d0765d1b3d711114ba9e34f (diff)
downloadexternal_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.zip
external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.gz
external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.bz2
Merge WebKit at r66666 : Initial merge by git.
Change-Id: I57dedeb49859adc9c539e760f0e749768c66626f
Diffstat (limited to 'WebCore/inspector/InspectorValues.cpp')
-rw-r--r--WebCore/inspector/InspectorValues.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/WebCore/inspector/InspectorValues.cpp b/WebCore/inspector/InspectorValues.cpp
index a7c43a5..c96e953 100644
--- a/WebCore/inspector/InspectorValues.cpp
+++ b/WebCore/inspector/InspectorValues.cpp
@@ -474,7 +474,7 @@ inline void doubleQuoteString(const String& str, Vector<UChar>* dst)
} // anonymous namespace
-bool InspectorValue::asBool(bool*) const
+bool InspectorValue::asBoolean(bool*) const
{
return false;
}
@@ -555,7 +555,7 @@ void InspectorValue::writeJSON(Vector<UChar>* output) const
output->append(nullString, 4);
}
-bool InspectorBasicValue::asBool(bool* output) const
+bool InspectorBasicValue::asBoolean(bool* output) const
{
if (type() != TypeBoolean)
return false;
@@ -565,7 +565,7 @@ bool InspectorBasicValue::asBool(bool* output) const
bool InspectorBasicValue::asNumber(double* output) const
{
- if (type() != TypeDouble)
+ if (type() != TypeNumber)
return false;
*output = m_doubleValue;
return true;
@@ -573,7 +573,7 @@ bool InspectorBasicValue::asNumber(double* output) const
bool InspectorBasicValue::asNumber(long* output) const
{
- if (type() != TypeDouble)
+ if (type() != TypeNumber)
return false;
*output = static_cast<long>(m_doubleValue);
return true;
@@ -581,7 +581,7 @@ bool InspectorBasicValue::asNumber(long* output) const
bool InspectorBasicValue::asNumber(unsigned long* output) const
{
- if (type() != TypeDouble)
+ if (type() != TypeNumber)
return false;
*output = static_cast<unsigned long>(m_doubleValue);
return true;
@@ -589,7 +589,7 @@ bool InspectorBasicValue::asNumber(unsigned long* output) const
bool InspectorBasicValue::asNumber(unsigned int* output) const
{
- if (type() != TypeDouble)
+ if (type() != TypeNumber)
return false;
*output = static_cast<unsigned int>(m_doubleValue);
return true;
@@ -597,13 +597,13 @@ bool InspectorBasicValue::asNumber(unsigned int* output) const
void InspectorBasicValue::writeJSON(Vector<UChar>* output) const
{
- ASSERT(type() == TypeBoolean || type() == TypeDouble);
+ ASSERT(type() == TypeBoolean || type() == TypeNumber);
if (type() == TypeBoolean) {
if (m_boolValue)
output->append(trueString, 4);
else
output->append(falseString, 5);
- } else if (type() == TypeDouble) {
+ } else if (type() == TypeNumber) {
String value = String::format("%f", m_doubleValue);
value.replace(',', '.');
output->append(value.characters(), value.length());
@@ -633,12 +633,12 @@ PassRefPtr<InspectorObject> InspectorObject::asObject()
return this;
}
-bool InspectorObject::getBool(const String& name, bool* output) const
+bool InspectorObject::getBoolean(const String& name, bool* output) const
{
RefPtr<InspectorValue> value = get(name);
if (!value)
return false;
- return value->asBool(output);
+ return value->asBoolean(output);
}
bool InspectorObject::getNumber(const String& name, double* output) const