Files
react-native/ReactCommon/fabric/components/view/accessibility/AccessibilityProps.cpp
Yedidya Feldblum fc91bccd53 Add assorted missing includes in xplat
Summary: Add assorted missing includes in `xplat` that would be exposed by future changes.

Reviewed By: ispeters, nlutsenko

Differential Revision: D14213660

fbshipit-source-id: 329f133784015fe20ee99feaec8ef05e117fe3a6
2019-02-28 00:52:48 -08:00

69 lines
2.3 KiB
C++

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "AccessibilityProps.h"
#include <glog/logging.h>
#include <react/components/view/accessibilityPropsConversions.h>
#include <react/components/view/propsConversions.h>
#include <react/core/propsConversions.h>
#include <react/debug/debugStringConvertibleUtils.h>
namespace facebook {
namespace react {
AccessibilityProps::AccessibilityProps(
const AccessibilityProps &sourceProps,
const RawProps &rawProps)
: accessible(
convertRawProp(rawProps, "accessible", sourceProps.accessible)),
accessibilityTraits(convertRawProp(
rawProps,
"accessibilityTraits",
sourceProps.accessibilityTraits)),
accessibilityLabel(convertRawProp(
rawProps,
"accessibilityLabel",
sourceProps.accessibilityLabel)),
accessibilityHint(convertRawProp(
rawProps,
"accessibilityHint",
sourceProps.accessibilityHint)),
accessibilityActions(convertRawProp(
rawProps,
"accessibilityActions",
sourceProps.accessibilityActions)),
accessibilityViewIsModal(convertRawProp(
rawProps,
"accessibilityViewIsModal",
sourceProps.accessibilityViewIsModal)),
accessibilityElementsHidden(convertRawProp(
rawProps,
"accessibilityElementsHidden",
sourceProps.accessibilityElementsHidden)),
accessibilityIgnoresInvertColors(convertRawProp(
rawProps,
"accessibilityIgnoresInvertColors",
sourceProps.accessibilityIgnoresInvertColors)),
testId(convertRawProp(rawProps, "testId", sourceProps.testId)) {}
#pragma mark - DebugStringConvertible
#if RN_DEBUG_STRING_CONVERTIBLE
SharedDebugStringConvertibleList AccessibilityProps::getDebugProps() const {
const auto &defaultProps = AccessibilityProps();
LOG(INFO) << "Call AccessibilityProps::getDebugProps with testId " << testId;
return SharedDebugStringConvertibleList{
debugStringConvertibleItem("testId", testId, defaultProps.testId),
};
}
#endif // RN_DEBUG_STRING_CONVERTIBLE
} // namespace react
} // namespace facebook