Web Inspector: NMI make String* instrumentation non intrusive
https://bugs.webkit.org/show_bug.cgi?id=97964

Reviewed by Yury Semikhatsky.

Source/WebCore:

MemoryInstrumentationString.h include was added.

* dom/WebCoreMemoryInstrumentation.h:

Source/WebKit/chromium:

The expectations were fixed because old instrumentation had wrong detector for BufferInternal type of storage.

* tests/MemoryInstrumentationTest.cpp:
(WebCore::TEST):

Source/WTF:

MemoryInstrumentationString.h was added.
Intrusive instrumentation was removed.

* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
* wtf/MemoryInstrumentationString.h: Added.
(WTF):
(WTF::reportMemoryUsage):
* wtf/text/AtomicString.cpp:
(WTF):
* wtf/text/AtomicString.h:
(AtomicString):
* wtf/text/CString.h:
(WTF::CStringBuffer::length):
* wtf/text/StringImpl.cpp:
* wtf/text/StringImpl.h:
(WTF::StringImpl::usesInternalBuffer):
(WTF::StringImpl::baseString):
(StringImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: move cookies model out of the items view (into sdk component).
https://bugs.webkit.org/show_bug.cgi?id=98022

Reviewed by Yury Semikhatsky.

Otherwise Audits require code that belongs to the resources component.

* inspector/front-end/CookieItemsView.js:
* inspector/front-end/CookieParser.js:
(WebInspector.Cookies.getCookiesAsync):
(WebInspector.Cookies.buildCookiesFromString):
(WebInspector.Cookies.cookieMatchesResourceURL):
(WebInspector.Cookies.cookieDomainMatchesResourceDomain):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LocalzeNone::dateFormat() should have right date format.
https://bugs.webkit.org/show_bug.cgi?id=98123

Reviewed by Kent Tamura.

This patch changes date format in LocaleNone for multiple fields
date/datetime/datetime-local input UI.

No new tests. Other patch for ports which use LocaleNone and multiple
fields date/time input UI will have tests.

* platform/text/LocaleNone.cpp:
(WebCore::LocaleNone::dateFormat): Changed month specifier to "MM".

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening -- rebaselined canvas-render-layer and 4 week-multiple-fields-appearance tests.

* platform/chromium-linux/fast/canvas/canvas-render-layer-expected.png: Removed.
* platform/chromium-linux/platform/chromium/virtual/gpu/fast/canvas/canvas-render-layer-expected.png: Removed.
* platform/chromium-mac-snowleopard/fast/canvas/canvas-render-layer-expected.txt: Copied from LayoutTests/platform/chromium-linux/platform/chromium/virtual/gpu/fast/canvas/canvas-render-layer-expected.txt.
* platform/chromium-mac-snowleopard/fast/forms/week-multiple-fields/week-multiple-fields-appearance-basic-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-classes-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/forms/week-multiple-fields/week-multiple-fields-appearance-style-expected.png: Added.
* platform/chromium-mac/fast/canvas/canvas-render-layer-expected.png:
* platform/chromium-mac/fast/canvas/canvas-render-layer-expected.txt:
* platform/chromium-mac/fast/forms/week-multiple-fields/week-multiple-fields-appearance-basic-expected.png: Added.
* platform/chromium-mac/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-classes-expected.png: Added.
* platform/chromium-mac/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.png: Added.
* platform/chromium-mac/fast/forms/week-multiple-fields/week-multiple-fields-appearance-style-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/gpu/fast/canvas/canvas-render-layer-expected.png:
* platform/chromium-mac/platform/chromium/virtual/gpu/fast/canvas/canvas-render-layer-expected.txt: Removed.
* platform/chromium-win-xp/fast/canvas/canvas-render-layer-expected.txt: Copied from LayoutTests/platform/chromium-linux/platform/chromium/virtual/gpu/fast/canvas/canvas-render-layer-expected.txt.
* platform/chromium-win/fast/canvas/canvas-render-layer-expected.png:
* platform/chromium-win/fast/canvas/canvas-render-layer-expected.txt:
* platform/chromium-win/fast/forms/week-multiple-fields/week-multiple-fields-appearance-basic-expected.png: Added.
* platform/chromium-win/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-classes-expected.png: Added.
* platform/chromium-win/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.png: Added.
* platform/chromium-win/fast/forms/week-multiple-fields/week-multiple-fields-appearance-style-expected.png: Added.
* platform/chromium-win/platform/chromium/virtual/gpu/fast/canvas/canvas-render-layer-expected.png:
* platform/chromium-win/platform/chromium/virtual/gpu/fast/canvas/canvas-render-layer-expected.txt: Removed.
* platform/chromium/platform/chromium/virtual/gpu/fast/canvas/canvas-render-layer-expected.txt: Renamed from LayoutTests/platform/chromium-linux/platform/chromium/virtual/gpu/fast/canvas/canvas-render-layer-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Forms] Adding DateTimeDayFieldElement for multiple fields "date", "datetime", "datetime-local" input UI
https://bugs.webkit.org/show_bug.cgi?id=97998

Reviewed by Kent Tamura.

This patch introduces DateTimeDayFieldElement class for implementing
multiple fields "date", "datetime", and "datetime-local" input UI.

No new tests. This patch doesn't change behavior.

* html/shadow/DateTimeFieldElements.cpp:
(WebCore::DateTimeDayFieldElement::DateTimeDayFieldElement): Added.
(WebCore::DateTimeDayFieldElement::create): Added.
(WebCore::DateTimeDayFieldElement::populateDateTimeFieldsState): Added.
(WebCore::DateTimeDayFieldElement::setValueAsDate): Added.
(WebCore::DateTimeDayFieldElement::setValueAsDateTimeFieldsState): Added.
* html/shadow/DateTimeFieldElements.h:
(DateTimeDayFieldElement): Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix PerfTest standard deviation calculation.
https://bugs.webkit.org/show_bug.cgi?id=98115

Reviewed by Ryosuke Niwa.

Previously our standard deviation calculation was incorrect. This patch
updates perftest.py's algorithm to calculate the sample standard deviation
(with Bessel's correction) using Knuth's online algorithm:
http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm
An existing test has been modified to prove our new results.

This patch also updates runner.js to use Bessel's correction in
its sample standard deviation calculation, which is more accurate
for small sample sizes.

Additionally, runner.js has been modified to not calculate
the 'sum' statistic, which was not very useful.

PerformanceTests:

* resources/runner.js:
(PerfTestRunner.computeStatistics):

Tools:

* Scripts/webkitpy/performance_tests/perftest.py:

    The unused variable valueSum has also been removed.

(PageLoadingPerfTest.run):
* Scripts/webkitpy/performance_tests/perftest_unittest.py:

    This test calculates the stdev of {2000, 3000, ..., 20000} which
    was hand-calculated using a spreadsheet.

(TestPageLoadingPerfTest.test_run):

LayoutTests:

* fast/harness/perftests/perf-runner-compute-statistics-expected.txt:
* fast/harness/perftests/perf-runner-compute-statistics.html:
* fast/harness/perftests/runs-per-second-log-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: move runScript into the snippets model
https://bugs.webkit.org/show_bug.cgi?id=98122

Reviewed by Vsevolod Vlasov.

- Moves runScript into the SnippetsModel
- Drive-by: annotates more RuntimeModel methods
- common, sdk, ui, components, elements, network, resources, network,
  scripts, console, timeline, workers, tests
  modules now compile with no errors in dedicated compilation mode.

* inspector/compile-front-end.py:
* inspector/front-end/ConsoleView.js:
* inspector/front-end/DatabaseQueryView.js:
* inspector/front-end/RuntimeModel.js:
(WebInspector.RuntimeModel.prototype.completionsForTextPrompt):
* inspector/front-end/ScriptSnippetModel.js:
(WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet.compileCallback):
(WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet):
(WebInspector.ScriptSnippetModel.prototype._runScript):
* inspector/front-end/StylesSidebarPane.js:
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype.complete):
* inspector/front-end/externs.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r130129.
http://trac.webkit.org/changeset/130129
https://bugs.webkit.org/show_bug.cgi?id=98125

broke 4 webkit_unit_tests
(MemoryInstrumentationTest.hashMapWith*) (Requested by caseq
on #webkit).

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

Source/WebCore:

* dom/WebCoreMemoryInstrumentation.h:
* platform/KURL.cpp:
* platform/KURLGoogle.cpp:
* platform/PlatformMemoryInstrumentation.h:

Source/WebKit/chromium:

* tests/MemoryInstrumentationTest.cpp:

Source/WTF:

* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
* wtf/MemoryInstrumentationString.h: Removed.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::reportMemoryUsage):
(WTF):
* wtf/text/AtomicString.h:
(AtomicString):
* wtf/text/CString.h:
(WTF::CStringBuffer::length):
(CStringBuffer):
(WTF::CStringBuffer::reportMemoryUsage):
(CString):
(WTF::CString::reportMemoryUsage):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::reportMemoryUsage):
(WTF):
* wtf/text/StringImpl.h:
(StringImpl):
* wtf/text/WTFString.cpp:
(WTF::String::reportMemoryUsage):
(WTF):
* wtf/text/WTFString.h:
(String):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Provide a way to distinguish scripts having sourceURL from standalone scripts.
https://bugs.webkit.org/show_bug.cgi?id=97231

Reviewed by Pavel Feldman.

Source/WebCore:

DebuggerAgent now scans scripts for sourceURL comment and provides
hasSourceURL flag for each non-inline script with such a comment.

* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::dispatchDidParseSource):
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype._parsedScriptSource):
(WebInspector.DebuggerDispatcher.prototype.scriptParsed):
* inspector/front-end/Script.js:
(WebInspector.Script):

LayoutTests:

* inspector/debugger/source-url-comment-expected.txt:
* inspector/debugger/source-url-comment.html:

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