document->documentElement can always be null
Created attachment 63824 [details] Patch
Comment on attachment 63824 [details] Patch Looks good. Is there a test we can add?
Probably. You just need to grab an object that has this method and then remove the <html> element from the document, and then call the method.
Here's the repro: <body onload="document.open();window.styleMedia.matchMedium();">
*** Bug 43139 has been marked as a duplicate of this bug. ***
Committed r64925: <http://trac.webkit.org/changeset/64925>