()
| 12847 | } |
| 12848 | |
| 12849 | function commitAllHostEffects() { |
| 12850 | while (nextEffect !== null) { |
| 12851 | { |
| 12852 | ReactDebugCurrentFiber.setCurrentFiber(nextEffect); |
| 12853 | } |
| 12854 | recordEffect(); |
| 12855 | |
| 12856 | var effectTag = nextEffect.effectTag; |
| 12857 | if (effectTag & ContentReset) { |
| 12858 | commitResetTextContent(nextEffect); |
| 12859 | } |
| 12860 | |
| 12861 | if (effectTag & Ref) { |
| 12862 | var current = nextEffect.alternate; |
| 12863 | if (current !== null) { |
| 12864 | commitDetachRef(current); |
| 12865 | } |
| 12866 | } |
| 12867 | |
| 12868 | // The following switch statement is only concerned about placement, |
| 12869 | // updates, and deletions. To avoid needing to add a case for every |
| 12870 | // possible bitmap value, we remove the secondary effects from the |
| 12871 | // effect tag and switch on that value. |
| 12872 | var primaryEffectTag = effectTag & (Placement | Update | Deletion); |
| 12873 | switch (primaryEffectTag) { |
| 12874 | case Placement: |
| 12875 | { |
| 12876 | commitPlacement(nextEffect); |
| 12877 | // Clear the "placement" from effect tag so that we know that this is inserted, before |
| 12878 | // any life-cycles like componentDidMount gets called. |
| 12879 | // TODO: findDOMNode doesn't rely on this any more but isMounted |
| 12880 | // does and isMounted is deprecated anyway so we should be able |
| 12881 | // to kill this. |
| 12882 | nextEffect.effectTag &= ~Placement; |
| 12883 | break; |
| 12884 | } |
| 12885 | case PlacementAndUpdate: |
| 12886 | { |
| 12887 | // Placement |
| 12888 | commitPlacement(nextEffect); |
| 12889 | // Clear the "placement" from effect tag so that we know that this is inserted, before |
| 12890 | // any life-cycles like componentDidMount gets called. |
| 12891 | nextEffect.effectTag &= ~Placement; |
| 12892 | |
| 12893 | // Update |
| 12894 | var _current = nextEffect.alternate; |
| 12895 | commitWork(_current, nextEffect); |
| 12896 | break; |
| 12897 | } |
| 12898 | case Update: |
| 12899 | { |
| 12900 | var _current2 = nextEffect.alternate; |
| 12901 | commitWork(_current2, nextEffect); |
| 12902 | break; |
| 12903 | } |
| 12904 | case Deletion: |
| 12905 | { |
| 12906 | commitDeletion(nextEffect); |
nothing calls this directly
no test coverage detected