Commit c73581d2 authored by abarth@webkit.org's avatar abarth@webkit.org

2010-12-31 Adam Barth <abarth@webkit.org>

        Reviewed by Darin Adler.

        fast/loader/about-blank-hash-change.html fails on Chromium
        https://bugs.webkit.org/show_bug.cgi?id=51788

        I'm unable to reproduce the failure locally, so this patch is slightly
        speculative.  We need to be slighly more careful how we compare the
        fragment identifiers for Chromium because Chromium uses a URL parser
        that is more agressive about canonicalization.

        * page/Location.cpp:
        (WebCore::Location::setHash):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fa5135b5
2010-12-31 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
fast/loader/about-blank-hash-change.html fails on Chromium
https://bugs.webkit.org/show_bug.cgi?id=51788
I'm unable to reproduce the failure locally, so this patch is slightly
speculative. We need to be slighly more careful how we compare the
fragment identifiers for Chromium because Chromium uses a URL parser
that is more agressive about canonicalization.
* page/Location.cpp:
(WebCore::Location::setHash):
2010-12-31 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
......
......@@ -233,9 +233,12 @@ void Location::setHash(const String& hash, DOMWindow* activeWindow, DOMWindow* f
String newFragmentIdentifier = hash;
if (hash[0] == '#')
newFragmentIdentifier = hash.substring(1);
if (equalIgnoringNullity(oldFragmentIdentifier, newFragmentIdentifier))
return;
url.setFragmentIdentifier(newFragmentIdentifier);
// Note that by parsing the URL and *then* comparing fragments, we are
// comparing fragments post-canonicalization, and so this handles the
// cases where fragment identifiers are ignored or invalid.
if (equalIgnoringNullity(oldFragmentIdentifier, url.fragmentIdentifier()))
return;
m_frame->domWindow()->setLocation(url.string(), activeWindow, firstWindow);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment