Fix matching of "file:///*" patterns by not trying to compare the host. The host is
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Apr 2010 21:50:32 +0000 (21:50 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Apr 2010 21:50:32 +0000 (21:50 +0000)
commit258c2e09520c060d87755d711363086c9251f102
tree162488c2dc885caa78c3557dfc3b7f9dc6f655d6
parentd8bbe4942f097dc6dbe8c35d71ad784d5ed23985
Fix matching of "file:///*" patterns by not trying to compare the host. The host is
irrelevant for file URLs.

Also fix comparisons to be case insensitive.

https://bugs.webkit.org/show_bug.cgi?id=37889

Reviewed by Dave Hyatt.

* page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::parse): Use equalIgnoringCase when comparing for "file" schemes.
(WebCore::UserContentURLPattern::matches): Use equalIgnoringCase when comparing schemes. Only call
matchesHost if the scheme isn't "file".
(WebCore::UserContentURLPattern::matchesHost): Call equalIgnoringCase when comparing hosts. The endsWith
was already doing a case-insensitive compare, so existing tests worked though this path.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@57923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/page/UserContentURLPattern.cpp