CSSStyleSheet.cssRules and rules should throw in case of opaque stylesheets Apparently, that is what Chrome and Firefox are doing.
Created attachment 414675 [details] Patch
Created attachment 414686 [details] Patch
Created attachment 414723 [details] Patch
Created attachment 414730 [details] Patch
<rdar://problem/71764897>
Ping review
Comment on attachment 414730 [details] Patch This removes the canAccessRules check from other callers of rules and cssRules. I think FromJS should be ForJS.
Created attachment 415029 [details] Patch
Comment on attachment 415029 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=415029&action=review > Source/WebCore/css/CSSStyleSheet.cpp:257 > +ExceptionOr<RefPtr<CSSRuleList>> CSSStyleSheet::rulesForJS() This could be ExceptionOr<Ref>
Comment on attachment 415029 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=415029&action=review > Source/WebCore/css/CSSStyleSheet.h:66 > + ExceptionOr<RefPtr<CSSRuleList>> cssRulesForJS(); > + ExceptionOr<RefPtr<CSSRuleList>> rulesForJS(); ForBindings is the canonical naming convention we use.
Created attachment 415108 [details] Patch for landing
Created attachment 415132 [details] Patch for landing
Committed r270296: <https://trac.webkit.org/changeset/270296> All reviewed patches have been landed. Closing bug and clearing flags on attachment 415132 [details].