()
| 12812 | } |
| 12813 | |
| 12814 | function commitAllHostEffects() { |
| 12815 | while (nextEffect !== null) { |
| 12816 | { |
| 12817 | ReactDebugCurrentFiber.setCurrentFiber(nextEffect); |
| 12818 | } |
| 12819 | recordEffect(); |
| 12820 | |
| 12821 | var effectTag = nextEffect.effectTag; |
| 12822 | if (effectTag & ContentReset) { |
| 12823 | commitResetTextContent(nextEffect); |
| 12824 | } |
| 12825 | |
| 12826 | if (effectTag & Ref) { |
| 12827 | var current = nextEffect.alternate; |
| 12828 | if (current !== null) { |
| 12829 | commitDetachRef(current); |
| 12830 | } |
| 12831 | } |
| 12832 | |
| 12833 | // The following switch statement is only concerned about placement, |
| 12834 | // updates, and deletions. To avoid needing to add a case for every |
| 12835 | // possible bitmap value, we remove the secondary effects from the |
| 12836 | // effect tag and switch on that value. |
| 12837 | var primaryEffectTag = effectTag & (Placement | Update | Deletion); |
| 12838 | switch (primaryEffectTag) { |
| 12839 | case Placement: |
| 12840 | { |
| 12841 | commitPlacement(nextEffect); |
| 12842 | // Clear the "placement" from effect tag so that we know that this is inserted, before |
| 12843 | // any life-cycles like componentDidMount gets called. |
| 12844 | // TODO: findDOMNode doesn't rely on this any more but isMounted |
| 12845 | // does and isMounted is deprecated anyway so we should be able |
| 12846 | // to kill this. |
| 12847 | nextEffect.effectTag &= ~Placement; |
| 12848 | break; |
| 12849 | } |
| 12850 | case PlacementAndUpdate: |
| 12851 | { |
| 12852 | // Placement |
| 12853 | commitPlacement(nextEffect); |
| 12854 | // Clear the "placement" from effect tag so that we know that this is inserted, before |
| 12855 | // any life-cycles like componentDidMount gets called. |
| 12856 | nextEffect.effectTag &= ~Placement; |
| 12857 | |
| 12858 | // Update |
| 12859 | var _current = nextEffect.alternate; |
| 12860 | commitWork(_current, nextEffect); |
| 12861 | break; |
| 12862 | } |
| 12863 | case Update: |
| 12864 | { |
| 12865 | var _current2 = nextEffect.alternate; |
| 12866 | commitWork(_current2, nextEffect); |
| 12867 | break; |
| 12868 | } |
| 12869 | case Deletion: |
| 12870 | { |
| 12871 | commitDeletion(nextEffect); |
nothing calls this directly
no test coverage detected