Vibration cannot be canceled during pattern vibration.
https://bugs.webkit.org/show_bug.cgi?id=117822

Reviewed by Gyuyoung Kim.

Source/WebCore:

Vibration can not cancel during pattern vibration is working. If resting time which are
even numbers of pattern m_isVibraing will be false and cancel will thus return early.
In addition, m_timerStart needs to be stopped in the cancelVibration().
If cancelVibration() is called right after m_timerStart is fired, timerStartFired
function can be called even if vibration is already canceled because of timing issue of timer.

Test: vibration/cancelVibration-during-pattern-vibrating.html

* Modules/vibration/Vibration.cpp:
(WebCore::Vibration::vibrate):
(WebCore::Vibration::cancelVibration):
(WebCore::Vibration::suspendVibration):
(WebCore::Vibration::resumeVibration):
(WebCore::Vibration::stopVibration):
(WebCore::Vibration::timerStartFired):
(WebCore::Vibration::timerStopFired):
* Modules/vibration/Vibration.h:

LayoutTests:

Add a test case for vibration cancelation during pattern vibration.
In addition, restore visibilityState before executing cancelVibration-after-pagevisibility-changed-to-hidden.html.

* vibration/cancelVibration-after-pagevisibility-changed-to-hidden.html:
* vibration/cancelVibration-during-pattern-vibrating-expected.txt: Added.
* vibration/cancelVibration-during-pattern-vibrating.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][REGRESSION] Crash after r151540 with debug build
https://bugs.webkit.org/show_bug.cgi?id=118111

Reviewed by Gyuyoung Kim.

* ewk/ewk_view.cpp:
(ewk_view_scroll): Fixed ASSERT conditions wrongly refactored.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update ColorSync shared memory names in plug-in sandbox profile
https://bugs.webkit.org/show_bug.cgi?id=118099

Patch by Simon Cooper <scooper@apple.com> on 2013-06-26
Reviewed by Alexey Proskuryakov.

Update the common profile to use the names used in Mavericks

* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Silverlight deny ipc-posix-sem LC_Mutex playing Amazon Prime videos
https://bugs.webkit.org/show_bug.cgi?id=118102
<rdar://problem/14194077>

Patch by Simon Cooper <scooper@apple.com> on 2013-06-26
Reviewed by Alexey Proskuryakov.

Allow same-sandbox scoped semaphores on Mavericks. Permit the
named semaphore for older releases.

* Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
https://bugs.webkit.org/show_bug.cgi?id=104360

Patch by Gwang Yoon Hwang <ryumiel@company100.net> on 2013-06-26
Reviewed by Noam Rosenthal.

The CoordinatedLayerTreeHost has too many responsibilities. It
implements LayerTreeHost, GraphicsLayerClient,
CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
UpdateAtlas::Client, GraphicsLayerFactory and
WebCustomFilterProgramProxyClient.

This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.

This patch introduces a new class called CompositingCoordinator, which
takes the responsibility of managing compositing resources in
WebProcess.

CoordinatedLayerTreeHost is responsible only for the scheduling and
IPC-specific stuff, which are relevant only for WebKit2.

No new tests, covered by existing tests.

Source/WebCore:

* CMakeLists.txt:
* Target.pri:
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Added.
(WebCore::CompositingCoordinator::create):
(WebCore::CompositingCoordinator::~CompositingCoordinator):
(WebCore::CompositingCoordinator::CompositingCoordinator):
(WebCore::CompositingCoordinator::setRootCompositingLayer):
(WebCore::CompositingCoordinator::sizeDidChange):
(WebCore::CompositingCoordinator::flushPendingLayerChanges):
(WebCore::CompositingCoordinator::syncDisplayState):
(WebCore::CompositingCoordinator::nextAnimationServiceTime):
(WebCore::CompositingCoordinator::clearPendingStateChanges):
(WebCore::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
(WebCore::CompositingCoordinator::createRootLayer):
(WebCore::CompositingCoordinator::syncLayerState):
(WebCore::CompositingCoordinator::createImageBackingIfNeeded):
(WebCore::CompositingCoordinator::createImageBacking):
(WebCore::CompositingCoordinator::updateImageBacking):
(WebCore::CompositingCoordinator::clearImageBackingContents):
(WebCore::CompositingCoordinator::removeImageBacking):
(WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
(WebCore::CompositingCoordinator::notifyAnimationStarted):
(WebCore::CompositingCoordinator::notifyFlushRequired):
(WebCore::CompositingCoordinator::paintContents):
(WebCore::CompositingCoordinator::createGraphicsLayer):
(WebCore::CompositingCoordinator::deviceScaleFactor):
(WebCore::CompositingCoordinator::pageScaleFactor):
(WebCore::CompositingCoordinator::createUpdateAtlas):
(WebCore::CompositingCoordinator::removeUpdateAtlas):
(WebCore::CompositingCoordinator::visibleContentsRect):
(WebCore::CompositingCoordinator::mainContentsLayer):
(WebCore::CompositingCoordinator::setVisibleContentsRect):
(WebCore::CompositingCoordinator::deviceOrPageScaleFactorChanged):
(WebCore::CompositingCoordinator::detachLayer):
(WebCore::CompositingCoordinator::commitScrollOffset):
(WebCore::CompositingCoordinator::renderNextFrame):
(WebCore::CompositingCoordinator::purgeBackingStores):
(WebCore::CompositingCoordinator::paintToSurface):
(WebCore::CompositingCoordinator::scheduleReleaseInactiveAtlases):
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h: Added.
(WebCore::CompositingCoordinator::clearRootLayer):
(WebCore::CompositingCoordinator::rootLayer):
(WebCore::CompositingCoordinator::state):

Source/WebKit2:

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
(WebKit::CoordinatedLayerTreeHost::invalidate):
(WebKit::CoordinatedLayerTreeHost::forceRepaint):
(WebKit::CoordinatedLayerTreeHost::sizeDidChange):
(WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
(WebKit::CoordinatedLayerTreeHost::renderNextFrame):
(WebKit::CoordinatedLayerTreeHost::purgeBackingStores):
(WebKit::CoordinatedLayerTreeHost::willSyncLayerState):
(WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesForAnimations):
(WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies):
(WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy):
(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
(WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
(WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer):
(WebKit::CoordinatedLayerTreeHost::paintLayerContents):
(WebKit::CoordinatedLayerTreeHost::commitSceneState):
(WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
(WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory):
(WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
(WebKit::CoordinatedLayerTreeHost::commitScrollOffset):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/LayerTreeHost.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Flash Player: deny ipc-posix-sem 59918130
https://bugs.webkit.org/show_bug.cgi?id=118107
<rdar://problem/14271105>

Patch by Simon Cooper <scooper@apple.com> on 2013-06-26
Reviewed by Alexey Proskuryakov.

Allow same-sandbox scoped semaphores on Mavericks. Permit the
named semaphore for older releases.

* Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:

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