Unreviewed, rolling out r128562.
http://trac.webkit.org/changeset/128562
https://bugs.webkit.org/show_bug.cgi?id=96747

It broke perf tests on Qt and Chromium (Requested by Ossy on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-09-14

* resources/runner.js:
(PerfTestRunner._runner):
(PerfTestRunner._perSecondRunnerIterator):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Add ability to replay XHR in network panel.
https://bugs.webkit.org/show_bug.cgi?id=95187

Reviewed by Yury Semikhatsky.

Source/WebCore:

Patch based on Pavel Chadnov's patch.
This patch implements Replay XHR feature in web inspector.
XMLHttpRequest's ThreadableLoaderClient is now used to map XMLHttpRequest object to ResourceLoader request identifiers.
Before initiating load all XHR parameters are now sent to inspector.
XMLHttpRequest parameters are stored in inspector's network request cache in XHRReplayData class.
When XHR replay is requested, a new XMLHttpRequest is created based on stored data.

Test: http/tests/inspector/network/network-xhr-replay.html

* inspector/Inspector.json:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::didFinishXHRLoading):
* inspector/InspectorConsoleAgent.h:
(InspectorConsoleAgent):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl):
(WebCore::InspectorInstrumentation::willLoadXHRImpl):
(WebCore::InspectorInstrumentation::didFailXHRLoadingImpl):
(WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
* inspector/InspectorInstrumentation.h:
(WebCore):
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient):
(WebCore::InspectorInstrumentation::willLoadXHR):
(WebCore::InspectorInstrumentation::didFailXHRLoading):
(WebCore::InspectorInstrumentation::didFinishXHRLoading):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient):
(WebCore):
(WebCore::InspectorResourceAgent::willLoadXHR):
(WebCore::InspectorResourceAgent::didFailXHRLoading):
(WebCore::InspectorResourceAgent::didFinishXHRLoading):
(WebCore::InspectorResourceAgent::replayXHR):
* inspector/InspectorResourceAgent.h:
(WebCore):
(InspectorResourceAgent):
* inspector/NetworkResourcesData.cpp:
(WebCore::XHRReplayData::create):
(WebCore):
(WebCore::XHRReplayData::addHeader):
(WebCore::XHRReplayData::XHRReplayData):
(WebCore::NetworkResourcesData::xhrReplayData):
(WebCore::NetworkResourcesData::setXHRReplayData):
(WebCore::NetworkResourcesData::reuseXHRReplayData):
(WebCore::NetworkResourcesData::clear):
* inspector/NetworkResourcesData.h:
(XHRReplayData):
(WebCore::XHRReplayData::method):
(WebCore::XHRReplayData::url):
(WebCore::XHRReplayData::async):
(WebCore::XHRReplayData::formData):
(WebCore::XHRReplayData::headers):
(WebCore::XHRReplayData::includeCredentials):
(WebCore):
(WebCore::NetworkResourcesData::ResourceData::xhrReplayData):
(WebCore::NetworkResourcesData::ResourceData::setXHRReplayData):
(ResourceData):
(NetworkResourcesData):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._contextMenu):
(WebInspector.NetworkLogView.prototype._replayXHR):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest): added documentThreadableLoaderStartedLoadingForClient instrumentation
so that inspector could map XMLHttpRequest to ResourceLoader's identifiers.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::loader): DocumentThreadableLoader uses CachedResource::loader() to get ResourceLoader identifier.
(CachedResource):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::sendFromInspector): Added a method for sending XMLHttpRequests based on request body stored in inspector.
(WebCore):
(WebCore::XMLHttpRequest::createRequest): Replaced will/didLoadXHRSynchonously instrumentations with willLoadXHR instrumentation.
(WebCore::XMLHttpRequest::internalAbort): Added didFailXHRLoadingInstrumentation
(WebCore::XMLHttpRequest::didFinishLoading): Added didFinishXHRLoading instrumentation
* xml/XMLHttpRequest.h:
(XMLHttpRequest):

LayoutTests:

Added XHR replay test.

* http/tests/inspector/network/network-xhr-replay-expected.txt: Added.
* http/tests/inspector/network/network-xhr-replay.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The runtime/unsigned category should be valid in the cpp style-checker.
https://bugs.webkit.org/show_bug.cgi?id=96748

Reviewed by Csaba Osztrogonác.

This is causing the webkitpy tests to fail because it's not listed in the
category array. Furthermore, change an "int" to "long" because it's
throwing a double error in one of the earlier asserts.

* Scripts/webkitpy/style/checkers/cpp.py:
(CppChecker):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_names):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LocaleMac should fallback to defaultLanguage for an invalid locale
https://bugs.webkit.org/show_bug.cgi?id=96744

Reviewed by Kent Tamura.

Source/WebCore:

There is no way to tell if a locale identifier is valid or not in Cocoa
so we look if we have a matching language in the list of
ISOLanguageCodes given by NSLocale.

Covered in LocaleMacTest.invalidLocale.

* platform/text/mac/LocaleMac.mm:
(WebCore):
(WebCore::LocaleMac::LocaleMac):
(WebCore::LocaleMac::create):

Source/WebKit/chromium:

* tests/LocaleMacTest.cpp:
(TEST_F):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add runtime flag that enables lang attribute for form controls in LayoutTests
https://bugs.webkit.org/show_bug.cgi?id=96636

Reviewed by Kent Tamura.

.:

* Source/autotools/symbols.filter:

Source/WebCore:

Lang attribute support for form controls will be incomplete and just for LayoutTests.

No new tests. No behavior change.

* WebCore.exp.in:
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore):
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled):
(WebCore::RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled):
(RuntimeEnabledFeatures):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled):
(WebCore):
* testing/InternalSettings.h:
(Backup):
(InternalSettings):
* testing/InternalSettings.idl:

Source/WebKit2:

* win/WebKit2.def:
* win/WebKit2CFLite.def:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor time format related methods on LocaleWin/Mac/ICU so that they override Localizer methods
https://bugs.webkit.org/show_bug.cgi?id=96726

Reviewed by Kent Tamura.

Source/WebCore:

Refactoring time format related methods on LocaleWin/Mac/ICU so that
they override Localizer methods. We can call them from the Localizer
from now on.

No new tests. No behavior change. Covered by existing tests.

* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::initializeDateTimeFormat): m_timeAMPMLabels is no longer a OwnPtr so we account for that.
(WebCore::LocaleICU::timeFormat): Removing Text from end of function
name because *FormatText() shoud return human readable text like "Day/Month/Year".
(WebCore::LocaleICU::shortTimeFormat):
(WebCore::LocaleICU::timeAMPMLabels):
* platform/text/LocaleICU.h:
(LocaleICU):
* platform/text/LocaleWin.cpp:
(WebCore::LocaleWin::timeFormat):
(WebCore::LocaleWin::shortTimeFormat):
(WebCore::LocaleWin::timeAMPMLabels):
* platform/text/LocaleWin.h:
(LocaleWin):
* platform/text/LocalizedDateICU.cpp:
(WebCore::localizedTimeFormatText):
(WebCore::localizedShortTimeFormatText):
* platform/text/LocalizedDateWin.cpp:
(WebCore::localizedTimeFormatText):
(WebCore::localizedShortTimeFormatText):
* platform/text/Localizer.cpp:
(WebCore):
(WebCore::Localizer::timeFormat):
(WebCore::Localizer::shortTimeFormat):
(WebCore::Localizer::timeAMPMLabels):
* platform/text/Localizer.h:
(Localizer): We unified some of the member variables like m_timeAMPMLabels into this class.
* platform/text/mac/LocaleMac.h:
(LocaleMac):
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::timeFormat):
(WebCore::LocaleMac::shortTimeFormat):
* platform/text/mac/LocalizedDateMac.cpp:
(WebCore::localizedTimeFormatText):
(WebCore::localizedShortTimeFormatText):

Source/WebKit/chromium:

* tests/LocaleMacTest.cpp:
(LocaleMacTest::timeFormat):
(LocaleMacTest::shortTimeFormat):
(TEST_F):
* tests/LocaleWinTest.cpp:
(LocaleWinTest::timeFormat):
(LocaleWinTest::shortTimeFormat):
(TEST_F):
* tests/LocalizedDateICUTest.cpp:
(LocalizedDateICUTest::localizedDateFormatText):
(LocalizedDateICUTest::localizedShortDateFormatText):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][WKTR] TestRunner is not dumping some frame load callbacks information
https://bugs.webkit.org/show_bug.cgi?id=96740

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-14
Reviewed by Kenneth Rohde Christiansen.

Tools:

Dump information expected by the test cases about the following
frame load callbacks:
"didDisplayInsecureContentForFrame"
"didRunInsecureContentForFrame"
"didDetectXSSForFrame"

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::willPerformClientRedirectForFrame): Print a URL
as expected by test results by calling pathSuitableForTestResult() instead
of printing raw URL.
(WTR::InjectedBundlePage::didDisplayInsecureContentForFrame):
(WTR::InjectedBundlePage::didRunInsecureContentForFrame):
(WTR::InjectedBundlePage::didDetectXSSForFrame):

LayoutTests:

Unskip test cases which were failing due to missing
frame load callbacks information dumping with
WebKitTestRunner.

* platform/wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed r128580 follow up: fixed qt minimal compilation.

* loader/DocumentThreadableLoader.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128586 268f45cc-cd09-0410-ab3c-d52691b4dbfc