[Forms] DateTimeEditElement should return string value for ease of implementing other date/time input types.
https://bugs.webkit.org/show_bug.cgi?id=97303

Reviewed by Kent Tamura.

This patch introduces a function DateTimeEditElement::value() for
setting internal text value of TimeInputType with new function
EditControlOwner::formatDateTimeFieldsState() to utilize this protocl
in other date time input types.

We used DateTimeEditElement::valueAsDouble() and and BaseDateAndTimeInputType::serialize()
to make string value then setting internal text value of multiple
fields time input UI. Although, this steps doesn't work well for
other date/time input types.

This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.

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

* html/DateTimeFieldsState.cpp:
(WebCore::DateTimeFieldsState::hour23): Added to convert 1 to 12 hour value to 0 to 23 hour.
* html/DateTimeFieldsState.h:
(DateTimeFieldsState): Added declaration of hour23().
* html/TimeInputType.cpp:
(WebCore::TimeInputType::DateTimeEditControlOwnerImpl::editControlValueChanged): Changed to use DateTimeEditElement::value() instead of DateTimeEditElement::valueAsDouble().
(WebCore::TimeInputType::DateTimeEditControlOwnerImpl::formatDateTimeFieldsState): Added to format time.
(WebCore::TimeInputType::restoreFormControlState): Changed to use DateTimeEditElement::value() instead of DateTimeEditElement::valueAsDouble().
* html/TimeInputType.h:
(DateTimeEditControlOwnerImpl): Added a declaration of formatDateTimeFieldsState().
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditElement::value): Added.
* html/shadow/DateTimeEditElement.h:
(EditControlOwner): Added a declaration of formatDateTimeFieldsState().
(DateTimeEditElement): Added a declaration of value().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Remove WebRuntimeFeatures::{enablePushState,isPushStateEnabled}
https://bugs.webkit.org/show_bug.cgi?id=97506

Reviewed by Adam Barth.

These methods have been no-ops since r127674. All Chromium code that
called them was removed with http://crrev.com/155205.

* public/WebRuntimeFeatures.h:
(WebRuntimeFeatures):
* src/WebRuntimeFeatures.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Implement ValidationMessageClient for Chromium
https://bugs.webkit.org/show_bug.cgi?id=97167

Reviewed by Hajime Morita.

Source/WebCore:

* page/ValidationMessageClient.h:
Add forward declaration for WTF::String.

Source/WebKit/chromium:

Introduce ValidationMessageClientImpl. However actual popup
implementation should be done in WebViewClient.

* WebKit.gyp: Add ValidationMessageClientImpl.{cpp,h}.
* public/WebViewClient.h:
(WebKit::WebViewClient::showValidationMessage): Added.
(WebKit::WebViewClient::hideValidationMessage): Added.
* src/ValidationMessageClientImpl.cpp: Added.
(WebKit::ValidationMessageClientImpl::ValidationMessageClientImpl):
(WebKit::ValidationMessageClientImpl::create):
(WebKit::ValidationMessageClientImpl::~ValidationMessageClientImpl):
Make sure that a popup is closed.
(WebKit::ValidationMessageClientImpl::showValidationMessage):
Implementataion of ValidationMessageClient::showValidationMessage.
minimumSecondToShowValidationMessage and secondPerCharacter are same as
the corresponding values in the current Shadow DOM implementation.
(WebKit::ValidationMessageClientImpl::hideValidationMessage):
Implementataion of ValidationMessageClient::hideValidationMessage.
(WebKit::ValidationMessageClientImpl::isValidationMessageVisible):
Implementataion of ValidationMessageClient::isValidationMessageVisible.
(WebKit::ValidationMessageClientImpl::hideCurrentValidationMessage):
This is a callback function for the timer.
* src/ValidationMessageClientImpl.h: Added.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
 - Initialize m_validationMessage.
 - Add a comment for PageClients.
* src/WebViewImpl.h:
Add m_validationMessage.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix Geolocation error reporting in the test support
https://bugs.webkit.org/show_bug.cgi?id=97386

Source/WebCore: 

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-09-24
Reviewed by Sam Weinig.

GeolocationController currently expose GeolocationError which can be either
PermissionDenied or PositionUnavailable.

In practice, only PositionUnavailable is supported and tested, only Chrome
somewhat expose PermissionDenied.
The correct way to deny the permission is through Geolocation::setIsAllowed().

This patch does some of the initial cleanup toward that goal, reducing how
far GeolocationError is spread.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
Mac does not use GeolocationClientMock, it should not be compiled in WebCore.

* platform/mock/GeolocationClientMock.cpp:
(WebCore::GeolocationClientMock::GeolocationClientMock):
(WebCore::GeolocationClientMock::setPosition):
(WebCore::GeolocationClientMock::setPositionUnavailableError):
This method replace setError(). It is limited to PositionUnavailable errors.

(WebCore::GeolocationClientMock::reset):
(WebCore::GeolocationClientMock::controllerTimerFired):
(WebCore):
(WebCore::GeolocationClientMock::clearError):
* platform/mock/GeolocationClientMock.h:
(WebCore):
(GeolocationClientMock):

Source/WebKit/blackberry: 

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-09-24
Reviewed by Sam Weinig.

* WebKitSupport/DumpRenderTreeSupport.cpp:
(DumpRenderTreeSupport::setMockGeolocationPositionUnavailableError):
* WebKitSupport/DumpRenderTreeSupport.h:
(DumpRenderTreeSupport):

Source/WebKit/chromium: 

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-09-24
Reviewed by Sam Weinig.

* public/WebGeolocationClientMock.h:
(WebGeolocationClientMock):
* src/WebGeolocationClientMock.cpp:
(WebKit::WebGeolocationClientMock::setMockGeolocationPositionUnavailableError):

Source/WebKit/gtk: 

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-09-24
Reviewed by Sam Weinig.

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::setMockGeolocationPositionUnavailableError):
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):

Source/WebKit/mac: 

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-09-24
Reviewed by Sam Weinig.

* WebView/WebView.mm:
(-[WebView _geolocationDidFailWithMessage:]):
* WebView/WebViewPrivate.h:

Source/WebKit/qt: 

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-09-24
Reviewed by Sam Weinig.

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::setMockGeolocationPositionUnavailableError):
* WebCoreSupport/DumpRenderTreeSupportQt.h:

Tools: 

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-09-24
Reviewed by Sam Weinig.
The TestRunner was exposing internal implementation details of
the Geolocation object through setMockGeolocationError().

In practice, only the error code PositionUnavailable is supported
or even implemented.

Exposing setMockGeolocationError() does not make sense for WebKit2 as
passing generic errors from the UIProcess is a bad idea. This is the
opportunity to clean TestRunner and prepare and interface suitable for WebKit2.

* DumpRenderTree/TestRunner.cpp:
(setMockGeolocationPositionUnavailableErrorCallback):
(TestRunner::staticFunctions):
* DumpRenderTree/TestRunner.h:
(TestRunner):
* DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
(TestRunner::setMockGeolocationPositionUnavailableError):
* DumpRenderTree/chromium/DRTTestRunner.cpp:
(DRTTestRunner::DRTTestRunner):
(DRTTestRunner::setMockGeolocationPositionUnavailableError):
* DumpRenderTree/chromium/DRTTestRunner.h:
(DRTTestRunner):
* DumpRenderTree/efl/TestRunnerEfl.cpp:
(TestRunner::setMockGeolocationPositionUnavailableError):
* DumpRenderTree/gtk/TestRunnerGtk.cpp:
(TestRunner::setMockGeolocationPositionUnavailableError):
* DumpRenderTree/mac/MockGeolocationProvider.h:
* DumpRenderTree/mac/MockGeolocationProvider.mm:
(-[MockGeolocationProvider dealloc]):
(-[MockGeolocationProvider resetError]):
(-[MockGeolocationProvider setPosition:]):
(-[MockGeolocationProvider setPositionUnavailableErrorWithMessage:]):
(-[MockGeolocationProvider lastPosition]):
(-[MockGeolocationProvider timerFired]):
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setMockGeolocationPositionUnavailableError):
* DumpRenderTree/qt/TestRunnerQt.cpp:
(TestRunner::setMockGeolocationPositionUnavailableError):
* DumpRenderTree/qt/TestRunnerQt.h:
(TestRunner):
* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::setMockGeolocationPositionUnavailableError):
* DumpRenderTree/wx/TestRunnerWx.cpp:
(TestRunner::setMockGeolocationPositionUnavailableError):

LayoutTests: 

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-09-24
Reviewed by Sam Weinig.

Update the tests to use setMockGeolocationPositionUnavailableError() instead
of setMockGeolocationError().

Only PositionError.POSITION_UNAVAILABLE was supported, so this not change
anything for the test coverage.

* fast/dom/Geolocation/error-clear-watch.html:
* fast/dom/Geolocation/error-expected.txt:
* fast/dom/Geolocation/maximum-age-expected.txt:
* fast/dom/Geolocation/reentrant-error-expected.txt:
* fast/dom/Geolocation/script-tests/error.js:
* fast/dom/Geolocation/script-tests/maximum-age.js:
(checkError):
(testNonZeroMaximumAge):
* fast/dom/Geolocation/script-tests/permission-denied-already-error.js:
* fast/dom/Geolocation/script-tests/reentrant-error.js:
* fast/dom/Geolocation/script-tests/watch.js:
(checkError):
* fast/dom/Geolocation/watch-expected.txt:


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