Bug 1035170 - Rewrite SWF parsing to a scan-first, parse tags on demand approach

Is there a reason we shall know if we are in browser. Can we polyfill shell with all needed stuff?