-
mitz@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=48436 Reviewed by Darin Adler. WebCore: * page/DOMWindow.cpp: (WebCore::DOMWindow::getMatchedCSSRules): Return rules from all origins if the cross-origin check is disabled. * page/Settings.cpp: (WebCore::Settings::Settings): Initialize m_crossOriginCheckInGetMatchedCSSRulesDisabled. * page/Settings.h: (WebCore::Settings::setCrossOriginCheckInGetMatchedCSSRulesDisabled): Added this accessor. (WebCore::Settings::crossOriginCheckInGetMatchedCSSRulesDisabled): Ditto. WebKit/mac: * Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITH_GET_MATCHED_CSS_RULES_RESTRICTIONS. * WebView/WebView.mm: (-[WebView _needsUnrestrictedGetMatchedCSSRules]): Added. Returns YES for Safari linked against versions of WebKit that did not have the cross-origin restrictions in getMatchedCSSRules(). (-[WebView _preferencesChangedNotification:]): Call Settings::setCrossOriginCheckInGetMatchedCSSRulesDisabled() based on the above. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
cde61c19