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

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

Issue 2151083002: DevTools: explicitly differentiate ints vs doubles in the protocol bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean Created 4 years, 5 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/LayoutEditor.cpp
diff --git a/third_party/WebKit/Source/core/inspector/LayoutEditor.cpp b/third_party/WebKit/Source/core/inspector/LayoutEditor.cpp
index 470f7d73f949edc19f14b081fa4ae6abd82e961d..08466a67674a60227b33da923c6fb17497daa1b4 100644
--- a/third_party/WebKit/Source/core/inspector/LayoutEditor.cpp
+++ b/third_party/WebKit/Source/core/inspector/LayoutEditor.cpp
@@ -36,8 +36,8 @@ std::unique_ptr<protocol::DictionaryValue> createAnchor(const String& type, cons
std::unique_ptr<protocol::DictionaryValue> pointToJSON(FloatPoint point)
{
std::unique_ptr<protocol::DictionaryValue> object = protocol::DictionaryValue::create();
- object->setNumber("x", point.x());
- object->setNumber("y", point.y());
+ object->setDouble("x", point.x());
+ object->setDouble("y", point.y());
return object;
}
@@ -259,7 +259,7 @@ std::unique_ptr<protocol::DictionaryValue> LayoutEditor::createValueDescription(
return nullptr;
std::unique_ptr<protocol::DictionaryValue> object = protocol::DictionaryValue::create();
- object->setNumber("value", cssValue ? cssValue->getFloatValue() : 0);
+ object->setDouble("value", cssValue ? cssValue->getFloatValue() : 0);
CSSPrimitiveValue::UnitType unitType = cssValue ? cssValue->typeWithCalcResolved() : CSSPrimitiveValue::UnitType::Pixels;
object->setString("unit", CSSPrimitiveValue::unitTypeToString(unitType));
object->setBoolean("mutable", isMutableUnitType(unitType));

Powered by Google App Engine
This is Rietveld 408576698