The First World War in the West was for 4 years restricted to trench warfare. Gaining enemy territory cost many human lives for both sides. The main (or maybe most spectacular) battles were Verdun and Somme (both 1916) which led (sources vary) to a combined loss of 2 million men.
The war was won by the Entente because of many factors, but the most important seem to be the USA joining on her side and the bad economic conditions of Central Powers. New weapons should also not be forgotten: planes and tanks.
The national catastrophe made France to adopt a defensive strategy (Maginot Line, "phoney war"). Although tanks had been first used in a battle in 1917, they did not play the main role in Entente's victory; they however did in 1940 during the German conquest of France, and later they became the main land force on flat terrain.
World War 2 battles lacked trench warfare (some exceptions are given on Wikipedia page). It was present in fortified islands on the Pacific (where terrain prevented mass use of tanks). In later conflicts it was also infrequent.
I think that the development of air forces is another form of artillery, the only reason I can think of are the tanks. A tank is a major step in a firepower-armour race, and also provides mobility to attacking forces (Blitzkrieg as the top example).
Were tanks the only reason for the ending of trench warfare or are there any other factors?