mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08:00
Move dirty layout into css-layout
Reviewed By: majak Differential Revision: D3610634 fbshipit-source-id: 1dc9017c0a34ced231b5bebe334591f3d0b89bf3
This commit is contained in:
committed by
Facebook Github Bot 7
parent
3b35732800
commit
471eefcb74
@@ -31,7 +31,6 @@
|
||||
|
||||
- (void)contentSizeMultiplierDidChange:(NSNotification *)note
|
||||
{
|
||||
[self dirtyLayout];
|
||||
[self dirtyText];
|
||||
}
|
||||
|
||||
@@ -39,7 +38,6 @@
|
||||
{
|
||||
if (_text != text && ![_text isEqualToString:text]) {
|
||||
_text = [text copy];
|
||||
[self dirtyLayout];
|
||||
[self dirtyText];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ static CSSSize RCTMeasure(void *context, float width, CSSMeasureMode widthMode,
|
||||
|
||||
- (void)contentSizeMultiplierDidChange:(NSNotification *)note
|
||||
{
|
||||
[self dirtyLayout];
|
||||
CSSNodeMarkDirty(self.cssNode);
|
||||
[self dirtyText];
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ static CSSSize RCTMeasure(void *context, float width, CSSMeasureMode widthMode,
|
||||
|
||||
// create a non-mutable attributedString for use by the Text system which avoids copies down the line
|
||||
_cachedAttributedString = [[NSAttributedString alloc] initWithAttributedString:attributedString];
|
||||
[self dirtyLayout];
|
||||
CSSNodeMarkDirty(self.cssNode);
|
||||
|
||||
return _cachedAttributedString;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user