Incorrect keycodes for numpad /, -, +, .
https://bugs.webkit.org/show_bug.cgi?id=99188

Patch by Sailesh Agrawal <sail@chromium.org> on 2012-10-24
Reviewed by Tony Chang.

Source/WebCore:

In r57951 we switched to mapping keys by character code.
This regressed the numpad keys which no longer match the Windows virtual key codes.
This CL fixes this by never mapping numpad keys by character code.

Test: platform/mac/fast/events/numpad-keycode-mapping.html

* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::windowsKeyCodeForKeyEvent):

Source/WebKit/chromium:

In r57951 we switched to mapping keys by character code.
This regressed the numpad keys which no longer match the Windows virtual key codes.
This CL fixes this by never mapping numpad keys by character code.

* src/mac/WebInputEventFactory.mm: Disallow mapping numpad keys by character code.
(WebKit::windowsKeyCodeForKeyEvent):
* tests/WebInputEventFactoryTestMac.mm: Test to verify that all numpad keys are correctly mapped.
(TEST):

Tools:

Add key mappings for all numpad keys.

* DumpRenderTree/mac/EventSendingController.mm:
(KeyMappingEntry):
(-[EventSendingController keyDown:withModifiers:withLocation:]): Added all numpad keys.

LayoutTests:

Added test to map numpad keys to windows virtual keycodes. This test is for the Mac port only. DumpRenderTree in the chromium-mac port doesn't use Mac keycodes so this can't be tested on that platform.

* platform/mac/fast/events/numpad-keycode-mapping-expected.txt: Added.
* platform/mac/fast/events/numpad-keycode-mapping.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
loaderRunLoop() should use synchronization instead of while loop
https://bugs.webkit.org/show_bug.cgi?id=55402

Patch by Jae Hyun Park <jae.park@company100.net> on 2012-10-24
Reviewed by Alexey Proskuryakov.

Originally, loaderRunLoop() sleeps until a thread has started and set
the loaderRunLoopObject static variable. This patch uses
ThreadCondition to synchronize instead of a while loop.

No new tests (No behavior change).

* platform/network/cf/LoaderRunLoopCF.cpp:
(WebCore::runLoaderThread):
(WebCore::loaderRunLoop):
* platform/network/cf/LoaderRunLoopCF.h:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed, land pixel results on Win/Mac for a new repaint test.

* platform/chromium-mac/css3/flexbox/repaint-during-resize-no-flex-expected.png: Added.
* platform/chromium-win/css3/flexbox/repaint-during-resize-no-flex-expected.png: Renamed from LayoutTests/platform/chromium-linux/css3/flexbox/repaint-during-resize-no-flex-expected.png.
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] change CMAKE_<CCXX|C>_FLAGS_<RELEASE|DEBUG> from enviroment flags
https://bugs.webkit.org/show_bug.cgi?id=100256

Patch by Michael Carmody <mcarmody@rim.com> on 2012-10-24
Reviewed by Rob Buis.

This allow override of compile flags without having to edit CMake files.

* Source/cmake/OptionsBlackBerry.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
tweak debug logging in webkit-patch optimize-baselines
https://bugs.webkit.org/show_bug.cgi?id=100294

Reviewed by Ojan Vafai.

This changes the logging to print out the baselines found
(and their checksums) even when we don't do anything.

* Scripts/webkitpy/common/checkout/baselineoptimizer.py:
(BaselineOptimizer.optimize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132415 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shaders] The mesh should be specified using <column, row> order
https://bugs.webkit.org/show_bug.cgi?id=96285

Patch by Max Vujovic <mvujovic@adobe.com> on 2012-10-24
Reviewed by Dean Jackson.

Source/WebCore:

Change StyleResolver and CSSComputedStyleDeclaration to handle the mesh parameters in
column, row order.

Test: css3/filters/custom/custom-filter-mesh-column-row-order.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::valueForFilter):
    Append the number of columns before the number of rows in the meshParameters
    CSSValueList.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createCustomFilterOperation):
    Store the second mesh parameter in meshRows instead of meshColumns.

LayoutTests:

Add a test verifying that WebKit interprets the CSS mesh values in column, row order.
Update existing tests for u_meshSize and u_tileSize to expect column, row order.

* css3/filters/custom/custom-filter-mesh-column-row-order-expected.html: Added.
* css3/filters/custom/custom-filter-mesh-column-row-order.html: Added.
* css3/filters/resources/checkerboard.vs: Added.
* css3/filters/resources/u-mesh-size.fs:
* css3/filters/resources/u-tile-size.fs:
* css3/filters/resources/varying-mix-color.fs: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] WorkerContextExecutionProxy doesn't need to track events
https://bugs.webkit.org/show_bug.cgi?id=100295

Reviewed by Eric Seidel.

This code was added when this code was originally upstreamed as part of
the Chromium port. There doesn't appear to be any reason why
WorkerContextExecutionProxy needs to keep a Vector of raw event
pointers. Those points are likely to become dangling, making the rest
of what this code does very sketchy.

* bindings/v8/V8WorkerContextEventListener.cpp:
(WebCore::V8WorkerContextEventListener::callListenerFunction):
* bindings/v8/WorkerContextExecutionProxy.cpp:
(WebCore::WorkerContextExecutionProxy::dispose):
* bindings/v8/WorkerContextExecutionProxy.h:
(WebCore::WorkerContextExecutionState::WorkerContextExecutionState):
(WorkerContextExecutionProxy):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Chromium revision 163873 also made
platform/chromium/virtual/gpu/fast/canvas/canvas-incremental-repaint.html slow.

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Remove screen-related functions from PlatformSupport
https://bugs.webkit.org/show_bug.cgi?id=97474

Reviewed by Adam Barth.

Screen-related functions like screenHorizontalDPI that
used to be on PlatformSupport are now accessed through a new
PlatformPageClient attached to Widget in WebCore-land, which is
implemented by ChromeClientImpl in WebKit-land, which proxies
calls to WebWidgetClient, which is actually implemented in
Chromium-land.

Source/Platform:

* Platform.gypi:
* chromium/public/WebScreenInfo.h: Added.
(WebKit):
(WebScreenInfo):
(WebKit::WebScreenInfo::WebScreenInfo):

Source/WebCore:

* WebCore.gypi:
* platform/Widget.h:
* platform/chromium/PageClientChromium.h: Copied from Source/WebCore/platform/chromium/PlatformWidget.h.
(PageClientChromium):
* platform/chromium/PlatformScreenChromium.cpp:
(WebCore::toPlatformPageClient):
(WebCore):
(WebCore::screenHorizontalDPI):
(WebCore::screenVerticalDPI):
(WebCore::screenDepth):
(WebCore::screenDepthPerComponent):
(WebCore::screenIsMonochrome):
(WebCore::screenRect):
(WebCore::screenAvailableRect):
* platform/chromium/PlatformSupport.h:
(PlatformSupport):

Source/WebKit/chromium:

* public/WebScreenInfo.h:
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::screenInfo):
(WebKit):
* src/ChromeClientImpl.h:
(WebKit):
(WebKit::ChromeClientImpl::platformPageClient):
(ChromeClientImpl):
* src/PlatformSupport.cpp:
(WebCore):
* src/WebPagePopupImpl.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132419 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: MediaStream API: Make sure all events are dispatched asynchronously
https://bugs.webkit.org/show_bug.cgi?id=100286

Reviewed by Adam Barth.

This is necessary to safeguard against if the UA uses synchronous UA->WebKit calls,
and the web application calls methods on the RTCPeerConnection in the event callbacks.

Test: fast/mediastream/RTCPeerConnection-events.html
Also tested by the chromium webrtc fuzz tests.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection):
(WebCore::RTCPeerConnection::negotiationNeeded):
(WebCore::RTCPeerConnection::didGenerateIceCandidate):
(WebCore::RTCPeerConnection::didAddRemoteStream):
(WebCore::RTCPeerConnection::didRemoveRemoteStream):
(WebCore::RTCPeerConnection::didAddRemoteDataChannel):
(WebCore::RTCPeerConnection::changeReadyState):
(WebCore::RTCPeerConnection::changeIceState):
(WebCore):
(WebCore::RTCPeerConnection::scheduleDispatchEvent):
(WebCore::RTCPeerConnection::scheduledEventTimerFired):
* Modules/mediastream/RTCPeerConnection.h:
(RTCPeerConnection):

LayoutTests: MediaStream API: Make sure all RTCPeerConnection events are dispatched asynchronously
https://bugs.webkit.org/show_bug.cgi?id=100286

Reviewed by Adam Barth.

RTCPeerConnection::close is the only function that dispatches an event directly so only test that.

* fast/mediastream/RTCPeerConnection-events-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-events.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132420 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Allow pushState and related history APIs to be disabled per context
https://bugs.webkit.org/show_bug.cgi?id=99780

Reviewed by Adam Barth.

Source/WebCore:

Chrome Apps do not support the history API (or navigation in general).
Since pushState is generally feature detected, it's cleanest to disable
it via a V8 per-context feature, so that applications can have the
appropriate fallback behavior (other history APIs are re-mapped to throw
exceptions, since history.back() and the link are not feature detected).

* dom/ContextFeatures.cpp:
(WebCore::ContextFeatures::pushStateEnabled):
(WebCore):
* dom/ContextFeatures.h:
* dom/Document.cpp:
(WebCore::Document::enqueuePopstateEvent):
* page/History.idl:

Source/WebKit/chromium:

Add pushState context feature.

* public/WebPermissionClient.h:
(WebPermissionClient):
(WebKit::WebPermissionClient::allowPushState):
* src/ContextFeaturesClientImpl.cpp:
(WebKit::ContextFeaturesClientImpl::askIfIsEnabled):


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