Introduce CSSNodeCopyStyle

Summary:
- Add a convenience function to copy all style from one node to another.
- CSSNodeIsDirty will return true after this function if any style was changed in the destination node.

Reviewed By: emilsjolander

Differential Revision: D4188514

fbshipit-source-id: af8d7fb5e8688c64aea05ce7ad23fff9233fb441
This commit is contained in:
Kazuki Sakamoto
2016-11-17 09:10:45 -08:00
committed by Facebook Github Bot
parent 32c175ac55
commit 191ac98b89
3 changed files with 69 additions and 0 deletions

View File

@@ -98,6 +98,8 @@ WIN_EXPORT bool CSSNodeCanUseCachedMeasurement(const CSSMeasureMode widthMode,
const float marginRow,
const float marginColumn);
WIN_EXPORT void CSSNodeCopyStyle(const CSSNodeRef dstNode, const CSSNodeRef srcNode);
#define CSS_NODE_PROPERTY(type, name, paramName) \
WIN_EXPORT void CSSNodeSet##name(const CSSNodeRef node, type paramName); \
WIN_EXPORT type CSSNodeGet##name(const CSSNodeRef node);