Add mobile yoga tree captures
Summary: Added two captures that were captured from a mobile device. **profile-ios**: A profile-like view with a central picture and some text information underneath. Captured on iOS device **feed-android** A feed-like view with a scrollable list of images and text. Captured on Android device. Fixed a bug that would not deserialize undefined values Differential Revision: D55712235
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6f10656868
commit
b1ce7e724f
@@ -21,6 +21,10 @@ static inline bool isAuto(json& j) {
|
|||||||
return j.is_string() && j == "auto";
|
return j.is_string() && j == "auto";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool isUndefined(json& j) {
|
||||||
|
return j.is_string() && j == "undefined";
|
||||||
|
}
|
||||||
|
|
||||||
static inline std::string invalidArgumentMessage(
|
static inline std::string invalidArgumentMessage(
|
||||||
const std::string& arg,
|
const std::string& arg,
|
||||||
const std::string& enumName) {
|
const std::string& enumName) {
|
||||||
@@ -142,6 +146,9 @@ YGUnit unitFromJson(json& j) {
|
|||||||
if (isAuto(j)) {
|
if (isAuto(j)) {
|
||||||
return YGUnitAuto;
|
return YGUnitAuto;
|
||||||
}
|
}
|
||||||
|
if (isUndefined(j)) {
|
||||||
|
return YGUnitUndefined;
|
||||||
|
}
|
||||||
|
|
||||||
std::string unit = j["unit"];
|
std::string unit = j["unit"];
|
||||||
if (unit == "px") {
|
if (unit == "px") {
|
||||||
|
10335
benchmark/captures/feed-android.json
Normal file
10335
benchmark/captures/feed-android.json
Normal file
File diff suppressed because it is too large
Load Diff
1955
benchmark/captures/profile-ios.json
Normal file
1955
benchmark/captures/profile-ios.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user