Need to re-land the parts of r182516 that were reverted.
Created attachment 250754 [details] Patch
https://trac.webkit.org/r182824