(config)
| 12219 | }; |
| 12220 | |
| 12221 | var ReactFiberHydrationContext = function (config) { |
| 12222 | var shouldSetTextContent = config.shouldSetTextContent, |
| 12223 | hydration = config.hydration; |
| 12224 | |
| 12225 | // If this doesn't have hydration mode. |
| 12226 | |
| 12227 | if (!hydration) { |
| 12228 | return { |
| 12229 | enterHydrationState: function () { |
| 12230 | return false; |
| 12231 | }, |
| 12232 | resetHydrationState: function () {}, |
| 12233 | tryToClaimNextHydratableInstance: function () {}, |
| 12234 | prepareToHydrateHostInstance: function () { |
| 12235 | invariant(false, 'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.'); |
| 12236 | }, |
| 12237 | prepareToHydrateHostTextInstance: function () { |
| 12238 | invariant(false, 'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.'); |
| 12239 | }, |
| 12240 | popHydrationState: function (fiber) { |
| 12241 | return false; |
| 12242 | } |
| 12243 | }; |
| 12244 | } |
| 12245 | |
| 12246 | var canHydrateInstance = hydration.canHydrateInstance, |
| 12247 | canHydrateTextInstance = hydration.canHydrateTextInstance, |
| 12248 | getNextHydratableSibling = hydration.getNextHydratableSibling, |
| 12249 | getFirstHydratableChild = hydration.getFirstHydratableChild, |
| 12250 | hydrateInstance = hydration.hydrateInstance, |
| 12251 | hydrateTextInstance = hydration.hydrateTextInstance, |
| 12252 | didNotMatchHydratedContainerTextInstance = hydration.didNotMatchHydratedContainerTextInstance, |
| 12253 | didNotMatchHydratedTextInstance = hydration.didNotMatchHydratedTextInstance, |
| 12254 | didNotHydrateContainerInstance = hydration.didNotHydrateContainerInstance, |
| 12255 | didNotHydrateInstance = hydration.didNotHydrateInstance, |
| 12256 | didNotFindHydratableContainerInstance = hydration.didNotFindHydratableContainerInstance, |
| 12257 | didNotFindHydratableContainerTextInstance = hydration.didNotFindHydratableContainerTextInstance, |
| 12258 | didNotFindHydratableInstance = hydration.didNotFindHydratableInstance, |
| 12259 | didNotFindHydratableTextInstance = hydration.didNotFindHydratableTextInstance; |
| 12260 | |
| 12261 | // The deepest Fiber on the stack involved in a hydration context. |
| 12262 | // This may have been an insertion or a hydration. |
| 12263 | |
| 12264 | var hydrationParentFiber = null; |
| 12265 | var nextHydratableInstance = null; |
| 12266 | var isHydrating = false; |
| 12267 | |
| 12268 | function enterHydrationState(fiber) { |
| 12269 | var parentInstance = fiber.stateNode.containerInfo; |
| 12270 | nextHydratableInstance = getFirstHydratableChild(parentInstance); |
| 12271 | hydrationParentFiber = fiber; |
| 12272 | isHydrating = true; |
| 12273 | return true; |
| 12274 | } |
| 12275 | |
| 12276 | function deleteHydratableInstance(returnFiber, instance) { |
| 12277 | { |
| 12278 | switch (returnFiber.tag) { |
no test coverage detected