[WTF] Add using WTF::msPerHour into DateMath.h
https://bugs.webkit.org/show_bug.cgi?id=93428

Reviewed by Kent Tamura.

This patch adds "using WTF::msPerHour" into DateMath.h for some codes
which will use it, e.g. bug 92960. Note: DateMath.h already has had
using statements for msPerDay, msPerMinute and msPerSecond.

* wtf/DateMath.h: Added "using WTF::msPerHour".

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] StringCache::m_lastStringImpl and StringCache::m_lastV8String should be in sync
https://bugs.webkit.org/show_bug.cgi?id=93065

Reviewed by Eric Seidel.

StringCache::m_lastStringImpl caches a StringImpl that was accessed most
recently. StringCache::m_lastV8String caches Persistent<String> corresponding
to the StringImpl. Hence m_lastStringImpl and m_lastV8String should be in sync.

However, StringCache::remove() breaks the sync. StringCache::remove() clears
m_lastStringImpl but does not clear m_lastV8String. As far as I analyze the code,
this won't cause any problem, but we should fix it just in case.

No tests. No change in behavior.

* bindings/v8/V8Binding.cpp:
(WebCore::StringCache::remove):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Move V8BindingMacros.h from bindings/v8/custom/ to bindings/v8/
https://bugs.webkit.org/show_bug.cgi?id=93254

Reviewed by Eric Seidel.

V8BindingMacros.h should exist in bindings/v8/.
This patch also moves related enums from V8Binding.h to V8BindingMacros.h.

No tests. No change in behavior.

* WebCore.gypi:
* bindings/v8/V8BindingMacros.h: Renamed from Source/WebCore/bindings/v8/custom/V8BindingMacros.h.
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Do not reformat numbers in <input type=number>
https://bugs.webkit.org/show_bug.cgi?id=93236

Reviewed by Hajime Morita.

Source/WebCore:

We had bugs such as stripping leading zeros, dropping lower digits of
large numbers because we parse a user-input string to a double value,
and generate a string from the double value.

In order to avoid such reformatting, we use
platform/text/NumberLocalizer, which maps ASCII digits to the
corresponding localized digits.

Test: fast/forms/number/number-lossless-localization.html

* WebCore.xcodeproj/project.pbxproj:
Add the following files:
 - platform/text/NumberLocalizer.cpp
 - platform/text/NumberLocalizer.h
 - platform/mac/LocaleMac.h
 - platform/mac/LocaleMac.mm
* platform/text/mac/LocaleMac.h:
(LocaleMac): Inherit NumberLocalizer, and declare
initializeNumberLocalizerData() for it.
Add m_didInitializeNumberData flag.
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::LocaleMac): Initialize m_didInitializeNumberData
(WebCore::LocaleMac::initializeNumberLocalizerData):
Added. Prepare data for number localization, and call
NumberLocalizer::setNumberLocalizerData().
A tricky part is to format 9876543210 for m_locale. It seems OSX doesn't
have API to get localized digits.
* platform/text/mac/LocalizedNumberMac.mm:
Remove many lines, and calls the corresponding functions of LocaleMac.
(WebCore::convertToLocalizedNumber):
(WebCore::convertFromLocalizedNumber):
(WebCore::localizedDecimalSeparator):

LayoutTests:

* fast/forms/number/number-lossless-localization-expected.txt: Added.
* fast/forms/number/number-lossless-localization.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix regression in credential storage when using Negotiate auth
https://bugs.webkit.org/show_bug.cgi?id=93386

Patch by Joe Mason <jmason@rim.com> on 2012-08-07
Reviewed by George Staikos.

r124205 regressed credential storage and lookup.  It added code to update the scheme used in
credential storage if the scheme chosen by the network stack is different from that requested by
webkit (currently this is only used when webkit requests Negotiate auth, but the Negotiate
infrastructure isn't set up correctly, so the network stack falls back to another auth type, usually
NTLM).  But the credentials are saved when a "success" status is received, and the scheme in the
credentials is not updated until notifyAuthReceived is called to report the actual auth scheme used.
The result is that the credentials are stored with the wrong auth scheme and can never be retreived.

Fixed by delaying the credential save until notifyAuthReceived.

RIM PR 166514
Internally reviewed by George Staikos

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyStatusReceived): Stop storing credentials here.
(WebCore::NetworkJob::notifyAuthReceived): Store credentials here instead.

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