YouTubePluginReplacement.cpp: YouTube-specific code in WebKit
I believe this is about allowing this kind of markup (that exists on old web pages that haven’t been updated for a long time) to still work:<p><pre><code>  <embed src="http://www.youtube.com/v/dQw4w9WgXcQ"></embed>
</code></pre>
… by roughly translating it into<p><pre><code>  <iframe src="http://www.youtube.com/embed/dQw4w9WgXcQ"></iframe>
</code></pre>
Probably also the <object> equivalent, maybe only that and not <embed>, I’m not sure. I never had a great deal to do with those two tags.<p>I don’t know why it has to be done this way. I’d have thought that without this extra code it’d roughly fall back to being an iframe on the original URL, and then YouTube could just check if it’s in a frame and behave as an embed instead of the main UI. But there’s <i>probably</i> a reason why they’ve all done it this kind of way.