Add full support for filesystem URLs.
authorericu@chromium.org <ericu@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 22:43:19 +0000 (22:43 +0000)
committerericu@chromium.org <ericu@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 22:43:19 +0000 (22:43 +0000)
commit551f57ffaceab97304cb8be4e42e8de426b6e6f6
tree1db7f375a07225de2e48a493f484f67eebd6909d
parent77ec1ec18d952e5e3efd601ee066d25299430654
Add full support for filesystem URLs.
https://bugs.webkit.org/show_bug.cgi?id=75049

Reviewed by Adam Barth.

No new tests; existing layout tests cover the basic functionality, and
the new functionality won't be there until Chromium adds it.  This patch
merely enables that, without changing behavior.

Source/WebCore:

* fileapi/EntryBase.cpp:
(WebCore::EntryBase::toURL): Add missing escaping of URL path.

* page/SecurityOrigin.cpp:
(WebCore::extractInnerURL): Use innerURL member, if it's populated.

* platform/KURL.h:
(WebCore::KURL::innerURL): Add innerURL member.

* platform/KURLGoogle.cpp:
(WebCore::KURLGooglePrivate::KURLGooglePrivate):
(WebCore::KURLGooglePrivate::operator=):
Add copy constructor and operator=, which are now needed since
m_innerURL needs special handling.
(WebCore::KURLGooglePrivate::setUtf8):
(WebCore::KURLGooglePrivate::setAscii):
Add calls to initInnerURL.
(WebCore::KURLGooglePrivate::initInnerURL):
Add method to init/copy m_innerURL.
(WebCore::KURLGooglePrivate::copyTo):
Handle m_innerURL during copies.
(WebCore::encodeWithURLEscapeSequences):
Unescape %2F ['/'] in paths; it's much more readable, and it's safe.

* platform/KURLGooglePrivate.h:
(WebCore::KURLGooglePrivate::innerURL): Add accessor for new m_innerURL.

Source/WebKit/chromium:

* tests/KURLTest.cpp:
TEST(KURLTest, Encode): Update expectation that '/' sails through unescaped.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/fileapi/EntryBase.cpp
Source/WebCore/page/SecurityOrigin.cpp
Source/WebCore/platform/KURL.h
Source/WebCore/platform/KURLGoogle.cpp
Source/WebCore/platform/KURLGooglePrivate.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/KURLTest.cpp