Web Inspector: [Canvas] if many canvases are being instrumented show the screenshot of the first one
https://bugs.webkit.org/show_bug.cgi?id=102522

Patch by Andrey Adaikin <aandrey@chromium.org> on 2012-11-19
Reviewed by Yury Semikhatsky.

When many canvases are being instrumented we'll want to show replay screenshots for each canvas.
Meanwhile, show the screenshot of the first one (instead of the last one), as it's likely to be the "main" canvas.
Drive-by: add more typification for the JS compiler.
Drive-by: create a new canvas for WebGL replay every time (similar to 2D replay) to avoid problems with resetting the context state.

* inspector/InjectedScriptCanvasModuleSource.js:
(.):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
input.value="" should clear date/time input elements with partial values
https://bugs.webkit.org/show_bug.cgi?id=102645

Reviewed by Kentaro Hara.

Source/WebCore:

Tests: fast/forms/date-multiple-fields/date-multiple-fields-value-set-empty.html
       fast/forms/datetime-multiple-fields/datetime-multiple-fields-value-set-empty.html
       fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-value-set-empty.html
       fast/forms/month-multiple-fields/month-multiple-fields-value-set-empty.html
       fast/forms/time-multiple-fields/time-multiple-fields-value-set-empty.html
       fast/forms/week-multiple-fields/week-multiple-fields-value-set-empty.html

* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::setValue):
If the new value is an empty string and sub-fields has values, we should
update the UI value to the empty state.
* html/DateTimeFieldsState.h:
(WebCore::DateTimeFieldsState::hasAnyValue):
Added. It returns true if one or more sub-fields are not empty.

LayoutTests:

- Add tests for each of date/time input types.
- Add them to TextExpectations for platforms without ENABLE_INPUT_MULTIPLE_FIELDS_UI.

* fast/forms/date-multiple-fields/date-multiple-fields-value-set-empty-expected.txt: Added.
* fast/forms/date-multiple-fields/date-multiple-fields-value-set-empty.html: Added.
* fast/forms/datetime-multiple-fields/datetime-multiple-fields-value-set-empty-expected.txt: Added.
* fast/forms/datetime-multiple-fields/datetime-multiple-fields-value-set-empty.html: Added.
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-value-set-empty-expected.txt: Added.
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-value-set-empty.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-value-set-empty-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-value-set-empty.html: Added.
* fast/forms/resources/multiple-fields-value-set-empty.js: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-value-set-empty-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-value-set-empty.html: Added.
* fast/forms/week-multiple-fields/week-multiple-fields-value-set-empty-expected.txt: Added.
* fast/forms/week-multiple-fields/week-multiple-fields-value-set-empty.html: Added.
* platform/chromium-android/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:


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