(config)
| 11329 | }; |
| 11330 | |
| 11331 | var ReactFiberHydrationContext = function (config) { |
| 11332 | var shouldSetTextContent = config.shouldSetTextContent, |
| 11333 | hydration = config.hydration; |
| 11334 | |
| 11335 | // If this doesn't have hydration mode. |
| 11336 | |
| 11337 | if (!hydration) { |
| 11338 | return { |
| 11339 | enterHydrationState: function () { |
| 11340 | return false; |
| 11341 | }, |
| 11342 | resetHydrationState: function () {}, |
| 11343 | tryToClaimNextHydratableInstance: function () {}, |
| 11344 | prepareToHydrateHostInstance: function () { |
| 11345 | invariant(false, 'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.'); |
| 11346 | }, |
| 11347 | prepareToHydrateHostTextInstance: function () { |
| 11348 | invariant(false, 'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.'); |
| 11349 | }, |
| 11350 | popHydrationState: function (fiber) { |
| 11351 | return false; |
| 11352 | } |
| 11353 | }; |
| 11354 | } |
| 11355 | |
| 11356 | var canHydrateInstance = hydration.canHydrateInstance, |
| 11357 | canHydrateTextInstance = hydration.canHydrateTextInstance, |
| 11358 | getNextHydratableSibling = hydration.getNextHydratableSibling, |
| 11359 | getFirstHydratableChild = hydration.getFirstHydratableChild, |
| 11360 | hydrateInstance = hydration.hydrateInstance, |
| 11361 | hydrateTextInstance = hydration.hydrateTextInstance, |
| 11362 | didNotMatchHydratedContainerTextInstance = hydration.didNotMatchHydratedContainerTextInstance, |
| 11363 | didNotMatchHydratedTextInstance = hydration.didNotMatchHydratedTextInstance, |
| 11364 | didNotHydrateContainerInstance = hydration.didNotHydrateContainerInstance, |
| 11365 | didNotHydrateInstance = hydration.didNotHydrateInstance, |
| 11366 | didNotFindHydratableContainerInstance = hydration.didNotFindHydratableContainerInstance, |
| 11367 | didNotFindHydratableContainerTextInstance = hydration.didNotFindHydratableContainerTextInstance, |
| 11368 | didNotFindHydratableInstance = hydration.didNotFindHydratableInstance, |
| 11369 | didNotFindHydratableTextInstance = hydration.didNotFindHydratableTextInstance; |
| 11370 | |
| 11371 | // The deepest Fiber on the stack involved in a hydration context. |
| 11372 | // This may have been an insertion or a hydration. |
| 11373 | |
| 11374 | var hydrationParentFiber = null; |
| 11375 | var nextHydratableInstance = null; |
| 11376 | var isHydrating = false; |
| 11377 | |
| 11378 | function enterHydrationState(fiber) { |
| 11379 | var parentInstance = fiber.stateNode.containerInfo; |
| 11380 | nextHydratableInstance = getFirstHydratableChild(parentInstance); |
| 11381 | hydrationParentFiber = fiber; |
| 11382 | isHydrating = true; |
| 11383 | return true; |
| 11384 | } |
| 11385 | |
| 11386 | function deleteHydratableInstance(returnFiber, instance) { |
| 11387 | { |
| 11388 | switch (returnFiber.tag) { |
no test coverage detected