Animated images are not restarted when page visibility changes
https://bugs.webkit.org/show_bug.cgi?id=122464
<rdar://problem/14293474>

Reviewed by Simon Fraser.

Always kickstart animated images when the page visibility changes,
which can occur via window occlusion, and which is independent of in-window
state, which we were previously using to advance animation.

No new tests; attempts to make a test have resulted only in a flaky, timing-dependent test.

* page/Frame.cpp:
(WebCore::Frame::resumeActiveDOMObjectsAndAnimations):
Move this call to resumeAnimatingImages() up to Page.

* page/FrameView.cpp:
(WebCore::FrameView::setIsInWindow):
Move this call to resumeAnimatingImages() up to Page.

* WebCore.exp.in
* page/FrameView.h:
* page/Page.h:
Move resumeAnimatingImages() itself up to Page.

* page/Page.cpp:
(WebCore::Page::setIsInWindow):
Resume animated images when we move in-window.

(WebCore::Page::setVisibilityState):
Resume animated images when we become visible.
This is the one we were previously missing.

(WebCore::Page::resumeActiveDOMObjectsAndAnimations):
Resume animated images when we're told to.

(WebCore::Page::resumeAnimatingImages):
Kickstart any animated images in all frames.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Always force discrete mode when running layout tests
https://bugs.webkit.org/show_bug.cgi?id=122465

Reviewed by Tim Horton.

This should speed up WebGL tests and hopefully prevent race conditions that may cause window server crashes from happening.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
Link with IOKit.

* DumpRenderTree/mac/LayoutTestHelper.m:
(installLayoutTestColorProfile):
Check installColorProfile.

(restoreUserColorProfile):
Check installColorProfile.

(lockDownDiscreteGraphics):
New function to force discrete graphics.

(main):
Add '--install-color-profile' option.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._set_up_run):
Always start the helper, but pass self._options.pixel_tests to it.

* Scripts/webkitpy/port/mac.py:
(MacPort.start_helper):
Pass --install-color-profile' to the helper if pixel_tests is true.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CTTE: Use references in and around DragController
https://bugs.webkit.org/show_bug.cgi?id=122427

Patch by Sam Weinig <sam@webkit.org> on 2013-10-07
Reviewed by Andreas Kling.

Source/WebCore:

Use references to indicate non-nullness of DragController related
objects.

Source/WebKit/efl:

* WebCoreSupport/DragClientEfl.cpp:
(WebCore::DragClientEfl::willPerformDragDestinationAction):
(WebCore::DragClientEfl::willPerformDragSourceAction):
(WebCore::DragClientEfl::actionMaskForDrag):
(WebCore::DragClientEfl::startDrag):
* WebCoreSupport/DragClientEfl.h:

Source/WebKit/gtk:

* WebCoreSupport/DragClientGtk.cpp:
(WebKit::DragClient::willPerformDragDestinationAction):
(WebKit::DragClient::willPerformDragSourceAction):
(WebKit::DragClient::actionMaskForDrag):
(WebKit::DragClient::startDrag):
* WebCoreSupport/DragClientGtk.h:
* webkit/webkitwebview.cpp:
(dragExitedCallback):
(webkit_web_view_drag_motion):
(webkit_web_view_drag_data_received):
(webkit_web_view_drag_drop):

Source/WebKit/mac:

* WebCoreSupport/WebDragClient.h:
* WebCoreSupport/WebDragClient.mm:
(WebDragClient::actionMaskForDrag):
(WebDragClient::willPerformDragDestinationAction):
(WebDragClient::willPerformDragSourceAction):
(WebDragClient::startDrag):
(WebDragClient::declareAndWriteDragImage):
* WebView/WebFrame.mm:
(-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
* WebView/WebView.mm:
(-[WebView draggingEntered:]):
(-[WebView draggingUpdated:]):
(-[WebView draggingExited:]):
(-[WebView performDragOperation:]):

Source/WebKit/win:

* WebCoreSupport/WebDragClient.cpp:
(WebDragClient::actionMaskForDrag):
(WebDragClient::willPerformDragDestinationAction):
(WebDragClient::willPerformDragSourceAction):
(WebDragClient::startDrag):
* WebCoreSupport/WebDragClient.h:

Source/WebKit2:

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDragDataReceived):
(webkitWebViewBaseDragMotion):
(dragExitedCallback):
(webkitWebViewBaseDragDrop):
* UIProcess/API/mac/WKView.mm:
(-[WKView draggingEntered:]):
(-[WKView draggingUpdated:]):
(-[WKView draggingExited:]):
(-[WKView performDragOperation:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dragEntered):
(WebKit::WebPageProxy::dragUpdated):
(WebKit::WebPageProxy::dragExited):
(WebKit::WebPageProxy::performDrag):
(WebKit::WebPageProxy::performDragControllerAction):
* UIProcess/WebPageProxy.h:
* WebProcess/WebCoreSupport/WebDragClient.cpp:
(WebKit::WebDragClient::willPerformDragDestinationAction):
(WebKit::WebDragClient::willPerformDragSourceAction):
(WebKit::WebDragClient::actionMaskForDrag):
(WebKit::WebDragClient::dragSourceActionMaskForPoint):
(WebKit::WebDragClient::startDrag):
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
(WebKit::WebDragClient::startDrag):
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::startDrag):
(WebKit::cachedImage):
(WebKit::WebDragClient::declareAndWriteDragImage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FTL: Optimize IsString(@2<String>) -> JSConst(true) + Phantom()
https://bugs.webkit.org/show_bug.cgi?id=122363

Patch by Nadav Rotem <nrotem@apple.com> on 2013-10-07
Reviewed by Filip Pizlo.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modify WTF and JavaScriptCore makefiles for x64 build.
https://bugs.webkit.org/show_bug.cgi?id=122467.
<rdar://problem/15169174>.

Reviewed by Brent Fulgham.

* WTF.vcxproj/WTF.make:
* JavaScriptCore.vcxproj/JavaScriptCore.make:


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