EU governments agreed Friday to tax the windfall profits of oil and gas companies and to cap the revenues of some electr