Typos in comments and log messages
Summary: No code changes, no testing required. alligned -> aligned allignment -> alignment completly -> completely conseptually -> conceptually decendents -> descendants indefinetly -> indefinitely dimention -> dimension doesnt -> doesn't safegaurd -> safeguard intialization -> initialization hierachy -> hierarchy happend -> happened gaurd -> guard programatically -> programmatically initalized -> initialized immidiately -> immediately occured -> occurred unkown -> unknown neccessary -> necessary neccesarily -> necessarily occuring -> occurring comoponent -> component propogate -> propagate recieved -> received referece -> reference perfomance -> performance recieving -> receiving subsquently -> subsequently scoll -> scroll suprisingly -> surprisingly targetting -> targeting tranform -> transform symetrical -> symmetrical wtih -> with Closes https://github.com/facebook/react-native/pull/17578 Differential Revision: D6718791 Pulled By: shergin fbshipit-source-id: 4ab79c1131ec5971d35a0c7199eba7ec0a0918ad
This commit is contained in:
Родитель
cae7179c94
Коммит
d2c569795c
|
@ -121,7 +121,7 @@ describe('bezier', function() {
|
|||
assertClose(easing(0.5), 0.5, 2);
|
||||
});
|
||||
});
|
||||
it('should be symetrical', function() {
|
||||
it('should be symmetrical', function() {
|
||||
repeat(10)(function() {
|
||||
var a = Math.random(),
|
||||
b = 2 * Math.random() - 0.5,
|
||||
|
|
|
@ -149,7 +149,7 @@ function createAnimatedComponent(Component: any): any {
|
|||
ref={this._setComponentRef}
|
||||
// The native driver updates views directly through the UI thread so we
|
||||
// have to make sure the view doesn't get optimized away because it cannot
|
||||
// go through the NativeViewHierachyManager since it operates on the shadow
|
||||
// go through the NativeViewHierarchyManager since it operates on the shadow
|
||||
// thread.
|
||||
collapsable={
|
||||
this._propsAnimated.__isNative ? false : props.collapsable
|
||||
|
|
|
@ -374,7 +374,7 @@ class AnimatedInterpolation extends AnimatedWithChildren {
|
|||
|
||||
return {
|
||||
inputRange: this._config.inputRange,
|
||||
// Only the `outputRange` can contain strings so we don't need to tranform `inputRange` here
|
||||
// Only the `outputRange` can contain strings so we don't need to transform `inputRange` here
|
||||
outputRange: this.__transformDataType(this._config.outputRange),
|
||||
extrapolateLeft:
|
||||
this._config.extrapolateLeft || this._config.extrapolate || 'extend',
|
||||
|
|
|
@ -43,7 +43,7 @@ class AnimatedValueXY extends AnimatedWithChildren {
|
|||
} else {
|
||||
invariant(
|
||||
value.x instanceof AnimatedValue && value.y instanceof AnimatedValue,
|
||||
'AnimatedValueXY must be initalized with an object of numbers or ' +
|
||||
'AnimatedValueXY must be initialized with an object of numbers or ' +
|
||||
'AnimatedValues.',
|
||||
);
|
||||
this.x = value.x;
|
||||
|
|
|
@ -18,7 +18,7 @@ const MessageQueue = require('MessageQueue');
|
|||
// This makes stacktraces to be placed at MessageQueue rather than at where they were launched
|
||||
// The parameter __fbUninstallRNGlobalErrorHandler is passed to MessageQueue to prevent the handler from being installed
|
||||
//
|
||||
// __fbUninstallRNGlobalErrorHandler is conditionally set by the Inspector while the VM is paused for intialization
|
||||
// __fbUninstallRNGlobalErrorHandler is conditionally set by the Inspector while the VM is paused for initialization
|
||||
// If the Inspector isn't present it defaults to undefined and the global error handler is installed
|
||||
// The Inspector can still call MessageQueue#uninstallGlobalErrorHandler to uninstalled on attach
|
||||
|
||||
|
|
|
@ -337,7 +337,7 @@ var NavigatorIOS = createReactClass({
|
|||
/**
|
||||
* Use this to specify additional props to pass to the rendered
|
||||
* component. `NavigatorIOS` will automatically pass in `route` and
|
||||
* `navigator` props to the comoponent.
|
||||
* `navigator` props to the component.
|
||||
*/
|
||||
passProps: PropTypes.object,
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ class ScrollViewStickyHeader extends React.Component<Props, {
|
|||
// - Past the collision with the next header y: no more translation. This will cause the
|
||||
// header to continue scrolling up and make room for the next sticky header.
|
||||
// In the case that there is no next header just translate equally to
|
||||
// scroll indefinetly.
|
||||
// scroll indefinitely.
|
||||
inputRange.push(layoutY);
|
||||
outputRange.push(0);
|
||||
// Sometimes headers jump around so we make sure we don't violate the monotonic inputRange
|
||||
|
|
|
@ -315,7 +315,7 @@ class StatusBar extends React.Component<{
|
|||
// Every time a StatusBar component is mounted, we push it's prop to a stack
|
||||
// and always update the native status bar with the props from the top of then
|
||||
// stack. This allows having multiple StatusBar components and the one that is
|
||||
// added last or is deeper in the view hierachy will have priority.
|
||||
// added last or is deeper in the view hierarchy will have priority.
|
||||
this._stackEntry = createStackEntry(this.props);
|
||||
StatusBar._propsStack.push(this._stackEntry);
|
||||
this._updatePropsStack();
|
||||
|
|
|
@ -32,7 +32,7 @@ const DEBUG = false;
|
|||
*
|
||||
* `<Incremental>` solves this by slicing up rendering into chunks that are
|
||||
* spread across multiple event loops. Expensive components can be sliced up
|
||||
* recursively by wrapping pieces of them and their decendents in
|
||||
* recursively by wrapping pieces of them and their descendants in
|
||||
* `<Incremental>` components. `<IncrementalGroup>` can be used to make sure
|
||||
* everything in the group is rendered recursively before calling `onDone` and
|
||||
* moving on to another sibling group (e.g. render one row at a time, even if
|
||||
|
@ -83,7 +83,7 @@ const DEBUG = false;
|
|||
*/
|
||||
export type Props = {
|
||||
/**
|
||||
* Called when all the decendents have finished rendering and mounting
|
||||
* Called when all the descendants have finished rendering and mounting
|
||||
* recursively.
|
||||
*/
|
||||
onDone?: () => void,
|
||||
|
|
|
@ -27,7 +27,7 @@ import type {Context} from 'Incremental';
|
|||
*
|
||||
* `<IncrementalPresenter>` can be used to group sets of `<Incremental>` renders
|
||||
* such that they are initially invisible and removed from layout until all
|
||||
* decendents have finished rendering, at which point they are drawn all at once
|
||||
* descendants have finished rendering, at which point they are drawn all at once
|
||||
* so the UI doesn't jump around during the incremental rendering process.
|
||||
*
|
||||
* See Incremental.js for more info.
|
||||
|
|
|
@ -51,7 +51,7 @@ type State = {
|
|||
*
|
||||
* - It ensures that at most 1 row is swiped open (auto closes others)
|
||||
* - It can bounce the 1st row of the list so users know it's swipeable
|
||||
* - Increase performance on iOS by locking list swiping when row swiping is occuring
|
||||
* - Increase performance on iOS by locking list swiping when row swiping is occurring
|
||||
* - More to come
|
||||
*/
|
||||
|
||||
|
|
|
@ -392,7 +392,7 @@ class WindowedListView extends React.Component<Props, State> {
|
|||
}
|
||||
if (props.onEndReached) {
|
||||
// Make sure we call onEndReached exactly once every time we reach the
|
||||
// end. Resets if scoll back up and down again.
|
||||
// end. Resets if scroll back up and down again.
|
||||
const willBeAtTheEnd = lastRow === (totalRows - 1);
|
||||
if (willBeAtTheEnd && !this._hasCalledOnEndReached) {
|
||||
props.onEndReached();
|
||||
|
|
|
@ -281,7 +281,7 @@ class SectionList<SectionT: SectionBase<any>> extends React.PureComponent<
|
|||
}
|
||||
|
||||
/**
|
||||
* Tells the list an interaction has occured, which should trigger viewability calculations, e.g.
|
||||
* Tells the list an interaction has occurred, which should trigger viewability calculations, e.g.
|
||||
* if `waitForInteractions` is true and the user has not scrolled. This is typically called by
|
||||
* taps on items or by navigation actions.
|
||||
*/
|
||||
|
|
|
@ -125,7 +125,7 @@ function computeWindowedRenderLimits(
|
|||
};
|
||||
}
|
||||
|
||||
// Find the indices that correspond to the items at the render boundaries we're targetting.
|
||||
// Find the indices that correspond to the items at the render boundaries we're targeting.
|
||||
let [overscanFirst, first, last, overscanLast] = elementsThatOverlapOffsets(
|
||||
[overscanBegin, visibleBegin, visibleEnd, overscanEnd],
|
||||
props.getItemCount(props.data),
|
||||
|
|
|
@ -115,7 +115,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
|||
return;
|
||||
}
|
||||
|
||||
// Do a linear remap of the two frames to safegaurd against variable framerates
|
||||
// Do a linear remap of the two frames to safeguard against variable framerates
|
||||
NSNumber *fromFrameValue = _frames[startIndex];
|
||||
NSNumber *toFrameValue = _frames[nextIndex];
|
||||
NSTimeInterval fromInterval = startIndex * RCTSingleFrameInterval;
|
||||
|
|
|
@ -24,7 +24,7 @@ const SamplingProfiler = {
|
|||
}
|
||||
} catch (e) {
|
||||
console.log(
|
||||
'Error occured when restarting Sampling Profiler: ' + e.toString());
|
||||
'Error occurred when restarting Sampling Profiler: ' + e.toString());
|
||||
error = e.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ static BOOL findMismatch(NSString *first, NSString *second, NSRange *firstRange,
|
|||
{
|
||||
[self invalidateContentSize];
|
||||
|
||||
// Detect when _backedTextInput updates happend that didn't invoke `shouldChangeTextInRange`
|
||||
// Detect when _backedTextInput updates happened that didn't invoke `shouldChangeTextInRange`
|
||||
// (e.g. typing simplified chinese in pinyin will insert and remove spaces without
|
||||
// calling shouldChangeTextInRange). This will cause JS to get out of sync so we
|
||||
// update the mismatched range.
|
||||
|
|
|
@ -477,7 +477,7 @@ if (global.nativeLoggingHook) {
|
|||
});
|
||||
|
||||
// Join all elements in the row into a single string with | separators
|
||||
// (appends extra spaces to each cell to make separators | alligned)
|
||||
// (appends extra spaces to each cell to make separators | aligned)
|
||||
function joinRow(row, space) {
|
||||
var cells = row.map(function(cell, i) {
|
||||
var extraSpaces = repeat(' ', columnWidths[i] - cell.length).join('');
|
||||
|
|
|
@ -436,7 +436,7 @@ module.exports = (function(global, undefined) {
|
|||
// property of our choosing that we associate with the object. Association
|
||||
// is done by ways of keeping a non-enumerable property on the object.
|
||||
// Ideally these would be `Object.create(null)` objects but since we're
|
||||
// trying to support ES3 we'll have to gaurd against collisions using
|
||||
// trying to support ES3 we'll have to guard against collisions using
|
||||
// prefixes on the keys rather than rely on null prototype objects.
|
||||
map._objectIndex = {};
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ var mixInEventEmitter = require('mixInEventEmitter');
|
|||
*
|
||||
* It is intended for use by AbstractTextEditor-based components for
|
||||
* identifying the appropriate start/end positions to modify the
|
||||
* DocumentContent, and for programatically setting browser selection when
|
||||
* DocumentContent, and for programmatically setting browser selection when
|
||||
* components re-render.
|
||||
*/
|
||||
class DocumentSelectionState {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<meta name="viewport" content="width=320, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
<p>Messages recieved from React Native: 0</p>
|
||||
<p>Messages received from React Native: 0</p>
|
||||
<p>(No messages)</p>
|
||||
<button type="button">
|
||||
Send message to React Native
|
||||
|
@ -17,7 +17,7 @@
|
|||
document.addEventListener('message', function(e) {
|
||||
messagesReceivedFromReactNative += 1;
|
||||
document.getElementsByTagName('p')[0].innerHTML =
|
||||
'Messages recieved from React Native: ' + messagesReceivedFromReactNative;
|
||||
'Messages received from React Native: ' + messagesReceivedFromReactNative;
|
||||
document.getElementsByTagName('p')[1].innerHTML = e.data;
|
||||
});
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ RCT_EXTERN NSString *const RCTJavaScriptDidLoadNotification;
|
|||
|
||||
/**
|
||||
* This notification fires when the bridge failed to load the JS bundle. The
|
||||
* `error` key can be used to determine the error that occured.
|
||||
* `error` key can be used to determine the error that occurred.
|
||||
*/
|
||||
RCT_EXTERN NSString *const RCTJavaScriptDidFailToLoadNotification;
|
||||
|
||||
|
@ -220,7 +220,7 @@ RCT_EXTERN NSString *RCTBridgeModuleNameForClass(Class bridgeModuleClass);
|
|||
- (void)requestReload __deprecated_msg("Call reload instead");
|
||||
|
||||
/**
|
||||
* Says whether bridge has started recieving calls from javascript.
|
||||
* Says whether bridge has started receiving calls from javascript.
|
||||
*/
|
||||
- (BOOL)isBatchActive;
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ RCT_EXPORT_MODULE()
|
|||
return RCTJSThread;
|
||||
}
|
||||
|
||||
// js thread only (which suprisingly can be the main thread, depends on used JS executor)
|
||||
// js thread only (which surprisingly can be the main thread, depends on used JS executor)
|
||||
- (void)flushEventsQueue
|
||||
{
|
||||
[_eventQueueLock lock];
|
||||
|
|
|
@ -30,7 +30,7 @@ RCT_EXTERN id RCTJSONClean(id object);
|
|||
RCT_EXTERN NSString *RCTMD5Hash(NSString *string);
|
||||
|
||||
// Check if we are currently on the main queue (not to be confused with
|
||||
// the main thread, which is not neccesarily the same thing)
|
||||
// the main thread, which is not necessarily the same thing)
|
||||
// https://twitter.com/olebegemann/status/738656134731599872
|
||||
RCT_EXTERN BOOL RCTIsMainQueue(void);
|
||||
|
||||
|
|
|
@ -777,7 +777,7 @@ RCT_EXPORT_METHOD(removeSubviewsFromContainerWithID:(nonnull NSNumber *)containe
|
|||
NSUInteger originalIndex = [originalSuperview.subviews indexOfObjectIdenticalTo:removedChild];
|
||||
[container removeReactSubview:removedChild];
|
||||
// Disable user interaction while the view is animating
|
||||
// since the view is (conseptually) deleted and not supposed to be interactive.
|
||||
// since the view is (conceptually) deleted and not supposed to be interactive.
|
||||
removedChild.userInteractionEnabled = NO;
|
||||
[originalSuperview insertSubview:removedChild atIndex:originalIndex];
|
||||
|
||||
|
@ -1150,7 +1150,7 @@ RCT_EXPORT_METHOD(dispatchViewManagerCommand:(nonnull NSNumber *)reactTag
|
|||
- (void)setNeedsLayout
|
||||
{
|
||||
// If there is an active batch layout will happen when batch finished, so we will wait for that.
|
||||
// Otherwise we immidiately trigger layout.
|
||||
// Otherwise we immediately trigger layout.
|
||||
if (![_bridge isBatchActive] && ![_bridge isLoading]) {
|
||||
[self _layoutAndMount];
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ NSInteger kNeverProgressed = -10000;
|
|||
|
||||
@interface UINavigationController ()
|
||||
|
||||
// need to declare this since `UINavigationController` doesnt publicly declare the fact that it implements
|
||||
// need to declare this since `UINavigationController` doesn't publicly declare the fact that it implements
|
||||
// UINavigationBarDelegate :(
|
||||
- (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item;
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ typedef void (^RCTApplierBlock)(NSDictionary<NSNumber *, UIView *> *viewRegistry
|
|||
|
||||
/**
|
||||
* Convenient alias to `width` and `height` in pixels.
|
||||
* Defaults to NAN in case of non-pixel dimention.
|
||||
* Defaults to NAN in case of non-pixel dimension.
|
||||
*/
|
||||
@property (nonatomic, assign) CGSize size;
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
/**
|
||||
* Layout direction of the view.
|
||||
* This is inherited from UIView+React, but we override it here
|
||||
* to improve perfomance and make subclassing/overriding possible/easier.
|
||||
* to improve performance and make subclassing/overriding possible/easier.
|
||||
*/
|
||||
@property (nonatomic, assign) UIUserInterfaceLayoutDirection reactLayoutDirection;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
// Motivation:
|
||||
// Yoga place `contentView` on the right side of `scrollView` when RTL layout is enfoced.
|
||||
// That breaks everything; it is completly pointless to (re)position `contentView`
|
||||
// That breaks everything; it is completely pointless to (re)position `contentView`
|
||||
// because it is `contentView`'s job. So, we work around it here.
|
||||
|
||||
// Step 1. Compensate `absolutePosition` change.
|
||||
|
|
|
@ -90,7 +90,7 @@ import okhttp3.RequestBody;
|
|||
* when app is backgrounded.
|
||||
*
|
||||
* {@link com.facebook.react.ReactInstanceManager} implementation is responsible for instantiating
|
||||
* this class as well as for populating with a referece to {@link CatalystInstance} whenever
|
||||
* this class as well as for populating with a reference to {@link CatalystInstance} whenever
|
||||
* instance manager recreates it (through {@link #onNewReactContextCreated). Also, instance manager
|
||||
* is responsible for enabling/disabling dev support in case when app is backgrounded or when all
|
||||
* the views has been detached from the instance (through {@link #setDevSupportEnabled} method).
|
||||
|
|
|
@ -119,7 +119,7 @@ import com.facebook.react.uimanager.ReactClippingViewGroup;
|
|||
}
|
||||
|
||||
/**
|
||||
* Propogates image load events to javascript if the hosting view is still alive.
|
||||
* Propagates image load events to javascript if the hosting view is still alive.
|
||||
*
|
||||
* @param reactTag The view id.
|
||||
* @param imageLoadEvent The event type.
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.facebook.react.views.image.ImageResizeMode;
|
|||
|
||||
/**
|
||||
* RCTImageView is a top-level node for Image. It can display either a remote image
|
||||
* (source must start wtih http:// or https://) or a local resource (a BitmapDrawable).
|
||||
* (source must start with http:// or https://) or a local resource (a BitmapDrawable).
|
||||
*/
|
||||
/* package */ class RCTImageView<T extends AbstractDrawCommand & DrawImage> extends FlatShadowNode {
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace jni {
|
|||
namespace detail {
|
||||
|
||||
#ifdef __i386__
|
||||
// X86 ABI forces 16 byte stack allignment on calls. Unfortunately
|
||||
// X86 ABI forces 16 byte stack alignment on calls. Unfortunately
|
||||
// sometimes Dalvik chooses not to obey the ABI:
|
||||
// - https://code.google.com/p/android/issues/detail?id=61012
|
||||
// - https://android.googlesource.com/platform/ndk/+/81696d2%5E!/
|
||||
|
|
|
@ -110,7 +110,7 @@ void CxxNativeModule::invoke(unsigned int reactMethodId, folly::dynamic&& params
|
|||
params.resize(params.size() - method.callbacks);
|
||||
|
||||
// I've got a few flawed options here. I can let the C++ exception
|
||||
// propogate, and the registry will log/convert them to java exceptions.
|
||||
// propagate, and the registry will log/convert them to java exceptions.
|
||||
// This lets all the java and red box handling work ok, but the only info I
|
||||
// can capture about the C++ exception is the what() string, not the stack.
|
||||
// I can std::terminate() the app. This causes the full, accurate C++
|
||||
|
|
|
@ -56,7 +56,7 @@ class RN_EXPORT ModuleRegistry {
|
|||
std::unordered_map<std::string, size_t> modulesByName_;
|
||||
|
||||
// This is populated with modules that are requested via getConfig but are unknown.
|
||||
// An error will be thrown if they are subsquently added to the registry.
|
||||
// An error will be thrown if they are subsequently added to the registry.
|
||||
std::unordered_set<std::string> unknownModules_;
|
||||
|
||||
// Function will be called if a module was requested but was not found.
|
||||
|
|
|
@ -65,9 +65,9 @@ struct YGNode {
|
|||
YGMeasureFunc getMeasure() const;
|
||||
YGBaselineFunc getBaseline() const;
|
||||
YGDirtiedFunc getDirtied() const;
|
||||
// For Perfomance reasons passing as reference.
|
||||
// For Performance reasons passing as reference.
|
||||
YGStyle& getStyle();
|
||||
// For Perfomance reasons passing as reference.
|
||||
// For Performance reasons passing as reference.
|
||||
YGLayout& getLayout();
|
||||
uint32_t getLineIndex() const;
|
||||
YGNodeRef getParent() const;
|
||||
|
|
|
@ -26,7 +26,7 @@ module.exports = function makeCommand(command) {
|
|||
|
||||
commandProcess.on('close', function prelink(code) {
|
||||
if (code) {
|
||||
throw new Error(`Error occured during executing "${command}" command`);
|
||||
throw new Error(`Error occurred during executing "${command}" command`);
|
||||
}
|
||||
|
||||
cb();
|
||||
|
|
|
@ -137,7 +137,7 @@ function upgradeFileContentChangedCallback(
|
|||
} else if (contentChanged === 'identical') {
|
||||
return 'keep';
|
||||
} else {
|
||||
throw new Error(`Unkown file changed state: ${relativeDestPath}, ${contentChanged}`);
|
||||
throw new Error(`Unknown file changed state: ${relativeDestPath}, ${contentChanged}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ const hasGroup = (pbxGroup, name) => pbxGroup.children.find(group => group.comme
|
|||
|
||||
/**
|
||||
* Given project and path of the group, it deeply creates a given group
|
||||
* making all outer groups if neccessary
|
||||
* making all outer groups if necessary
|
||||
*
|
||||
* Returns newly created group
|
||||
*/
|
||||
|
|
|
@ -144,7 +144,7 @@ function attachToServer(server, path) {
|
|||
});
|
||||
break;
|
||||
default:
|
||||
throw `unkown method: ${message.method}`;
|
||||
throw `unknown method: ${message.method}`;
|
||||
}
|
||||
|
||||
clientWs.send(JSON.stringify({
|
||||
|
|
Загрузка…
Ссылка в новой задаче