[BlackBerry]Cookies shouldn't be set into each of webcore's request and platform's request. And this makes a regression.
https://bugs.webkit.org/show_bug.cgi?id=80800
Source/WebCore:
FrameLoaderClientBlackBerry::dispatchWillSendRequest sets cookies to resourceRequest's header
list to show cookies in inspector. And NetworkManager::startJob will set cookies to platformRequest's
m_cookieData again. So cookies are set two times. This causes performance issue.
Moreover, platformRequest will copy cookies from the resourceRequest. And then platformRequest has
the same cookies in its header list and m_cookieData. Network will use header list's cookies which
are output as latin1 only. This causes the regression of https://bugs.webkit.org/show_bug.cgi?id=80307.
Now, set cookies in initializePlatformRequest to ensure setting cookies only once.
Patch by Jason Liu <jason.liu@torchmobile.com.cn> on 2012-03-20
Reviewed by George Staikos.
Test: http/tests/cookies/resources/setUtf8Cookies.php
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob):
* platform/network/blackberry/ResourceRequest.h:
(ResourceRequest):
* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore::ResourceRequest::initializePlatformRequest):
Source/WebKit/blackberry:
Patch by Jason Liu <jason.liu@torchmobile.com.cn> on 2012-03-20
Reviewed by George Staikos.
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
(WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
(WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
LayoutTests:
Patch by Jason Liu <jason.liu@torchmobile.com.cn> on 2012-03-20
Reviewed by George Staikos.
* http/tests/cookies/resources/setUtf8Cookies-expected.txt: Added.
* http/tests/cookies/resources/setUtf8Cookies-result.php: Added.
* http/tests/cookies/resources/setUtf8Cookies.php: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111370
268f45cc-cd09-0410-ab3c-
d52691b4dbfc