Relevant bugs: Bug 726904, Bug 517363
This, the last post I'll be making for my OSD700 class is going to discuss the work I've been doing on the above mentioned bugs.
I've been working on these two for a while, and as of today I'm very, very close to getting them land. 726904 is R+ and is waiting on 517363 ( more on that later )
I've written several times about 726904 ( here, here, here ) but I will summarize it for you once more. It's titled "nsVideoFrame::GetVideoIntrinsicSize setting wrong size" and I filed it in mid February while working on 517363. I noticed that the initial size of a video element wasn't behaving how I expected it to if there were no explicit sizes defined for it ( Either through height/width attributes or CSS ). I mentioned this is 517363 and Robert O'Callahan pointed me to the specification, and upon investigating, I found that Firefox was setting the video size incorrectly.
I've iterated on this bug so many times I've lost count ( I lied, I have all 14 versions of my patch ). Fixing up the GetVideoIntrinsicSize method as probably only 15% of the work I did. The rest was all put into updating the reftests that my patch broke. I'd say the most challenging part of updating the reftests was to make sure that they were still testing what they set out to. As a bit of extra work, I also modified a getVideoSize method to work better for our purposes in this bug.
Now that 726904 is ready, I've focused my efforts back on 517363, and I'm making great progress. This bug wanted to add poster frame scaling to the video element. In Firefox 11, the stable version as of the writing of this post, when you add a poster frame to a video, Firefox will stretch/shrink it with no regard for it's intrinsic ratio, making it fit in the video frame. With this fix in place, the poster image will always have it's aspect ratio preserved if it needs to be resized.
This patch has been a fun one to produce, because I had to learn how to scale the image properly, and efficiently. Taking from areas in the same file that scale the video frames, I was able to construct a process for the poster frame that would do exactly what we needed. There were several issues I had to deal with, such as centring the image, and making sure I took into account borders. I now have a (hopefully) solid patch that works, and I based it off of my patch for 726904. About 45 minutes prior to writing this I pushed both patches together to try ( https://tbpl.mozilla.org/?tree=Try&rev=2fde97b75aa7 (This link will expire)) so we're going to know soon whether these patches bring Firefox's Video element up to par with the spec.
These two patches may not have landed, but they will be landing very, very soon. When they do land, I'll be proud to know that My hard work brought Firefox Video up to standard when determining it's Intrinsic size, and that I enhanced poster frame behaviour for all Firefox users worldwide. I'm looking forward to taking on another challenge sometime soon!