mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
e08412d9a1
Summary: Special thanks for Joshua Gross for flagging this problem! This diff implements a custom evicting hash map designed specially to hold text measurement information. The key feature of this is custom equality checks and hashing functions. They are designed around the following principals: * Decorative text attributes (such as color, shadows, etc) has no effect on layout, therefore they should not be taking into account; * `minimum height`, `minimum width`, and `maximum height` don't affect the measurement; * the value of `layout metrics` are important only for `attachment` fragments. After I redo all tests, I will enable this for Android-specific TextLayoutManager in separate diff. Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D18848583 fbshipit-source-id: 46c2fc445fbd1823afc5e7498e37de75381258b1
13 lines
303 B
C++
13 lines
303 B
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 "TextMeasureCache.h"
|
|
|
|
namespace facebook {
|
|
namespace react {} // namespace react
|
|
} // namespace facebook
|