diff options
author | Steve Block <steveblock@google.com> | 2010-05-26 10:11:43 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-05-27 11:14:42 +0100 |
commit | e78cbe89e6f337f2f1fe40315be88f742b547151 (patch) | |
tree | d778000b84a04f24bbad50c7fa66244365e960e9 /WebCore/css/CSSStyleSheet.cpp | |
parent | 7b582e96e4e909ed7dba1e07153d20fbddaec3f7 (diff) | |
download | external_webkit-e78cbe89e6f337f2f1fe40315be88f742b547151.zip external_webkit-e78cbe89e6f337f2f1fe40315be88f742b547151.tar.gz external_webkit-e78cbe89e6f337f2f1fe40315be88f742b547151.tar.bz2 |
Merge WebKit at r60074: Initial merge by git
Change-Id: I18a2dc5439e36c928351ea829d8fb4e39b062fc7
Diffstat (limited to 'WebCore/css/CSSStyleSheet.cpp')
-rw-r--r-- | WebCore/css/CSSStyleSheet.cpp | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/WebCore/css/CSSStyleSheet.cpp b/WebCore/css/CSSStyleSheet.cpp index 5949f96..fb25374 100644 --- a/WebCore/css/CSSStyleSheet.cpp +++ b/WebCore/css/CSSStyleSheet.cpp @@ -28,9 +28,7 @@ #include "Document.h" #include "ExceptionCode.h" #include "Node.h" -#include "Page.h" #include "SecurityOrigin.h" -#include "Settings.h" #include "TextEncoding.h" #include <wtf/Deque.h> @@ -139,23 +137,8 @@ int CSSStyleSheet::addRule(const String& selector, const String& style, Exceptio PassRefPtr<CSSRuleList> CSSStyleSheet::cssRules(bool omitCharsetRules) { - if (doc() && !doc()->securityOrigin()->canRequest(baseURL())) { - - // The Safari welcome page runs afoul of the same-origin restriction on access to stylesheet rules - // that was added to address <https://bugs.webkit.org/show_bug.cgi?id=20527>. The following site- - // specific quirk relaxes this restriction for the particular cross-origin access that occurs on - // the Safari welcome page (<rdar://problem/7847573>). - - Settings* settings = doc()->settings(); - if (!settings || !settings->needsSiteSpecificQuirks()) - return 0; - - if (!equalIgnoringCase(baseURL().string(), "http://images.apple.com/safari/welcome/styles/safari.css")) - return 0; - - if (!doc()->url().string().contains("apple.com/safari/welcome/", false)) - return 0; - } + if (doc() && !doc()->securityOrigin()->canRequest(baseURL())) + return 0; return CSSRuleList::create(this, omitCharsetRules); } |