diff --git a/Libraries/Text/RCTShadowTextField.h b/Libraries/Text/RCTShadowTextField.h new file mode 100644 index 000000000..543f7fb34 --- /dev/null +++ b/Libraries/Text/RCTShadowTextField.h @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +@interface RCTShadowTextField : RCTShadowView + +@end diff --git a/Libraries/Text/RCTShadowTextField.m b/Libraries/Text/RCTShadowTextField.m new file mode 100644 index 000000000..3bc5929dc --- /dev/null +++ b/Libraries/Text/RCTShadowTextField.m @@ -0,0 +1,19 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "RCTShadowTextField.h" + +@implementation RCTShadowTextField + +- (BOOL)isYogaLeafNode +{ + return YES; +} + +@end diff --git a/Libraries/Text/RCTShadowTextView.h b/Libraries/Text/RCTShadowTextView.h new file mode 100644 index 000000000..e2c6f1e7e --- /dev/null +++ b/Libraries/Text/RCTShadowTextView.h @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +@interface RCTShadowTextView : RCTShadowView + +@end diff --git a/Libraries/Text/RCTShadowTextView.m b/Libraries/Text/RCTShadowTextView.m new file mode 100644 index 000000000..d3e3602ed --- /dev/null +++ b/Libraries/Text/RCTShadowTextView.m @@ -0,0 +1,19 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "RCTShadowTextView.h" + +@implementation RCTShadowTextView + +- (BOOL)isYogaLeafNode +{ + return YES; +} + +@end diff --git a/Libraries/Text/RCTText.xcodeproj/project.pbxproj b/Libraries/Text/RCTText.xcodeproj/project.pbxproj index 8e7ee1f1a..e2cfafd68 100644 --- a/Libraries/Text/RCTText.xcodeproj/project.pbxproj +++ b/Libraries/Text/RCTText.xcodeproj/project.pbxproj @@ -27,6 +27,10 @@ 58B511D01A9E6C5C00147676 /* RCTShadowText.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511CB1A9E6C5C00147676 /* RCTShadowText.m */; }; 58B511D11A9E6C5C00147676 /* RCTTextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B511CD1A9E6C5C00147676 /* RCTTextManager.m */; }; 58B512161A9E6EFF00147676 /* RCTText.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B512141A9E6EFF00147676 /* RCTText.m */; }; + 59F60E911E661BDD0081153B /* RCTShadowTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 59F60E8E1E661BDD0081153B /* RCTShadowTextField.m */; }; + 59F60E921E661BDD0081153B /* RCTShadowTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 59F60E8E1E661BDD0081153B /* RCTShadowTextField.m */; }; + 59F60E931E661BDD0081153B /* RCTShadowTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59F60E901E661BDD0081153B /* RCTShadowTextView.m */; }; + 59F60E941E661BDD0081153B /* RCTShadowTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59F60E901E661BDD0081153B /* RCTShadowTextView.m */; }; AF3225F91DE5574F00D3E7E7 /* RCTConvert+Text.m in Sources */ = {isa = PBXBuildFile; fileRef = AF3225F81DE5574F00D3E7E7 /* RCTConvert+Text.m */; }; AF3225FA1DE5574F00D3E7E7 /* RCTConvert+Text.m in Sources */ = {isa = PBXBuildFile; fileRef = AF3225F81DE5574F00D3E7E7 /* RCTConvert+Text.m */; }; /* End PBXBuildFile section */ @@ -54,6 +58,10 @@ 58B511CD1A9E6C5C00147676 /* RCTTextManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTextManager.m; sourceTree = ""; }; 58B512141A9E6EFF00147676 /* RCTText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTText.m; sourceTree = ""; }; 58B512151A9E6EFF00147676 /* RCTText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTText.h; sourceTree = ""; }; + 59F60E8D1E661BDD0081153B /* RCTShadowTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTShadowTextField.h; sourceTree = ""; }; + 59F60E8E1E661BDD0081153B /* RCTShadowTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTShadowTextField.m; sourceTree = ""; }; + 59F60E8F1E661BDD0081153B /* RCTShadowTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTShadowTextView.h; sourceTree = ""; }; + 59F60E901E661BDD0081153B /* RCTShadowTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTShadowTextView.m; sourceTree = ""; }; AF3225F71DE5574F00D3E7E7 /* RCTConvert+Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RCTConvert+Text.h"; sourceTree = ""; }; AF3225F81DE5574F00D3E7E7 /* RCTConvert+Text.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RCTConvert+Text.m"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -62,29 +70,33 @@ 58B511921A9E6C1200147676 = { isa = PBXGroup; children = ( + 58B5119C1A9E6C1200147676 /* Products */, AF3225F71DE5574F00D3E7E7 /* RCTConvert+Text.h */, AF3225F81DE5574F00D3E7E7 /* RCTConvert+Text.m */, - 19FC5C861D41A4220090108F /* RCTTextSelection.h */, - 19FC5C841D41A4120090108F /* RCTTextSelection.m */, 58B511C61A9E6C5C00147676 /* RCTRawTextManager.h */, 58B511C71A9E6C5C00147676 /* RCTRawTextManager.m */, 58B511C81A9E6C5C00147676 /* RCTShadowRawText.h */, 58B511C91A9E6C5C00147676 /* RCTShadowRawText.m */, 58B511CA1A9E6C5C00147676 /* RCTShadowText.h */, 58B511CB1A9E6C5C00147676 /* RCTShadowText.m */, + 59F60E8D1E661BDD0081153B /* RCTShadowTextField.h */, + 59F60E8E1E661BDD0081153B /* RCTShadowTextField.m */, + 59F60E8F1E661BDD0081153B /* RCTShadowTextView.h */, + 59F60E901E661BDD0081153B /* RCTShadowTextView.m */, 58B512151A9E6EFF00147676 /* RCTText.h */, 58B512141A9E6EFF00147676 /* RCTText.m */, - 58B511CC1A9E6C5C00147676 /* RCTTextManager.h */, - 58B511CD1A9E6C5C00147676 /* RCTTextManager.m */, 1362F0FC1B4D51F400E06D8C /* RCTTextField.h */, 1362F0FD1B4D51F400E06D8C /* RCTTextField.m */, 1362F0FE1B4D51F400E06D8C /* RCTTextFieldManager.h */, 1362F0FF1B4D51F400E06D8C /* RCTTextFieldManager.m */, + 58B511CC1A9E6C5C00147676 /* RCTTextManager.h */, + 58B511CD1A9E6C5C00147676 /* RCTTextManager.m */, + 19FC5C861D41A4220090108F /* RCTTextSelection.h */, + 19FC5C841D41A4120090108F /* RCTTextSelection.m */, 131B6ABC1AF0CD0600FFC3E0 /* RCTTextView.h */, 131B6ABD1AF0CD0600FFC3E0 /* RCTTextView.m */, 131B6ABE1AF0CD0600FFC3E0 /* RCTTextViewManager.h */, 131B6ABF1AF0CD0600FFC3E0 /* RCTTextViewManager.m */, - 58B5119C1A9E6C1200147676 /* Products */, ); indentWidth = 2; sourceTree = ""; @@ -180,8 +192,10 @@ 2D3B5F3B1D9B106F00451313 /* RCTTextView.m in Sources */, 2D3B5F3A1D9B106F00451313 /* RCTTextFieldManager.m in Sources */, 2D3B5F341D9B103100451313 /* RCTRawTextManager.m in Sources */, + 59F60E921E661BDD0081153B /* RCTShadowTextField.m in Sources */, AF3225FA1DE5574F00D3E7E7 /* RCTConvert+Text.m in Sources */, 2D3B5F3C1D9B106F00451313 /* RCTTextViewManager.m in Sources */, + 59F60E941E661BDD0081153B /* RCTShadowTextView.m in Sources */, 2D3B5F331D9B102D00451313 /* RCTTextSelection.m in Sources */, 2D3B5F351D9B103300451313 /* RCTShadowRawText.m in Sources */, ); @@ -198,8 +212,10 @@ 1362F1001B4D51F400E06D8C /* RCTTextField.m in Sources */, 58B512161A9E6EFF00147676 /* RCTText.m in Sources */, 1362F1011B4D51F400E06D8C /* RCTTextFieldManager.m in Sources */, + 59F60E911E661BDD0081153B /* RCTShadowTextField.m in Sources */, AF3225F91DE5574F00D3E7E7 /* RCTConvert+Text.m in Sources */, 131B6AC11AF0CD0600FFC3E0 /* RCTTextViewManager.m in Sources */, + 59F60E931E661BDD0081153B /* RCTShadowTextView.m in Sources */, 58B511CF1A9E6C5C00147676 /* RCTShadowRawText.m in Sources */, 58B511D01A9E6C5C00147676 /* RCTShadowText.m in Sources */, ); diff --git a/Libraries/Text/RCTTextFieldManager.m b/Libraries/Text/RCTTextFieldManager.m index 72e205ae4..27287c32a 100644 --- a/Libraries/Text/RCTTextFieldManager.m +++ b/Libraries/Text/RCTTextFieldManager.m @@ -14,6 +14,7 @@ #import #import "RCTConvert+Text.h" +#import "RCTShadowTextField.h" #import "RCTTextField.h" @@ -21,6 +22,11 @@ RCT_EXPORT_MODULE() +- (RCTShadowView *)shadowView +{ + return [RCTShadowTextField new]; +} + - (UIView *)view { return [[RCTTextField alloc] initWithEventDispatcher:self.bridge.eventDispatcher]; diff --git a/Libraries/Text/RCTTextViewManager.m b/Libraries/Text/RCTTextViewManager.m index c599526b9..7b7f5d047 100644 --- a/Libraries/Text/RCTTextViewManager.m +++ b/Libraries/Text/RCTTextViewManager.m @@ -15,12 +15,18 @@ #import #import "RCTConvert+Text.h" +#import "RCTShadowTextView.h" #import "RCTTextView.h" @implementation RCTTextViewManager RCT_EXPORT_MODULE() +- (RCTShadowView *)shadowView +{ + return [RCTShadowTextView new]; +} + - (UIView *)view { return [[RCTTextView alloc] initWithEventDispatcher:self.bridge.eventDispatcher];