I found a function that was broken and another missing that I wanted to use in some Safari work.
Created attachment 17898 [details] patch
Committed revision 28725.