Cached style element sheets may not have an owner node.

The assert for cacheability of shared StyleSheetContents required the
ownerNode to be a non-null style element. Referring to and modify a
stylesheet is however possible after the style element has been removed
and the ownerNode set to null. Change the assert to just check for the
two types of cacheability.

This was not triggered by stylesheets not having @media rules since the
cacheability of linked resources would be true and made the assert
true.

Also, made the ASSERT a DCHECK along with the other ASSERTs in the
modified file.

R=meade@chromium.org
BUG=635022

Review-Url: https://codereview.chromium.org/2220863002
Cr-Commit-Position: refs/heads/master@{#410305}
2 files changed