[iOS] JavaScriptCore fails to build with newer versions of clang
https://bugs.webkit.org/show_bug.cgi?id=122162

Reviewed by Darin Adler.

* runtime/GCActivityCallback.cpp: Add !PLATFORM(IOS)-guard around constant pagingTimeOut
as we don't compile the code that uses it on iOS.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] WebCore fails to build with newer versions of clang
https://bugs.webkit.org/show_bug.cgi?id=122161

Reviewed by Darin Adler.

* editing/FrameSelection.cpp: Add ENABLE(TEXT_CARET)-guard around shouldStopBlinkingDueToTypingCommand().
* page/EventHandler.cpp: Add !PLATFORM(IOS)-guard around constants cursorUpdateInterval and maximumCursorSize;
also add touch event/gesture event guard around shouldGesturesTriggerActive().
* platform/network/cf/ResourceResponseCFNet.cpp: Remove unused function filenameHasSaneExtension.
* platform/network/mac/ResourceResponseMac.mm: Only define static variables commonHeaderFields when building
without CFNetwork; also remove variable numCommonHeaderFields, instead use WTF_ARRAY_LENGTH(commonHeaderFields)
to compute the size of the fixed-sized array commonHeaderFields.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Center misspelling dots across width of word
https://bugs.webkit.org/show_bug.cgi?id=122046

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-10-01
Reviewed by Darin Adler.

Source/WebCore:

Test: editing/spelling/spelling.html

* platform/graphics/GraphicsContext.h:
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawLineForDocumentMarker):

LayoutTests:

This patch only rebaselines a single test. I would have rebaselined
the rest of the tests, but they seem to be affected by
webkit.org/b/122146. I don't want to commit incorrect expected results.

* platform/mac/editing/spelling/spelling-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename URL type variables in Curl network backend.
https://bugs.webkit.org/show_bug.cgi?id=122158

Patch by Szabolcs Dávid <davidsz@inf.u-szeged.hu> on 2013-10-01
Reviewed by Darin Adler.

I changed the name of the URL objects to match with the new class name.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::getProtectionSpace):
(WebCore::ResourceHandleManager::initializeHandle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Leaf EventTarget subclasses should be FINAL.
<https://webkit.org/b/122141>

Reviewed by Darin Adler.

Clear out a slew of FIXMEs now that HasMemoryCostMemberFunction
works on classes marked FINAL (fixed in bug 121747.)


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156719 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Add support for VideoTrack to MediaPlayerPrivateAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=122122

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/track/video-track.html

Refactor the methods which query AVAssetTrack and AVPlayerItemTrack into an Impl class, and
use that class to reset the properties of both AudioTrackAVFObjC and the new VideoTrackAVFObjC.

Add new files to project:
* WebCore.xcodeproj/project.pbxproj:

Add the new implementation class, shared by AudioTrackAVFObjC and VideoTrackAVFObjC:
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h: Added.
(WebCore::AVTrackPrivateAVFObjCImpl::create): Simple factory.
(WebCore::AVTrackPrivateAVFObjCImpl::playerItemTrack): Simple getter.
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: Added.
(WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl): Simple constructor.
(WebCore::AVTrackPrivateAVFObjCImpl::enabled): Pass to AVPlayerItemTrack.
(WebCore::AVTrackPrivateAVFObjCImpl::setEnabled): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::audioKind): Distinguish between Alternative and Main content.
(WebCore::AVTrackPrivateAVFObjCImpl::videoKind): Distinguish between Alternative, Main, Caption,
    and Description content.
(WebCore::AVTrackPrivateAVFObjCImpl::id): Pass to AVAssetTrack.
(WebCore::AVTrackPrivateAVFObjCImpl::label): Retrieve the Title metadata in the user's preferred
    language.
(WebCore::AVTrackPrivateAVFObjCImpl::language): Pass to languageForAVAssetTrack.
(WebCore::AVTrackPrivateAVFObjCImpl::languageForAVAssetTrack): Moved from AudioTrackPrivateAVFObjC.
* platform/graphics/avfoundation/VideoTrackPrivateAVF.h: Copied from Source/WebCore/platform/graphics/avfoundation/AudioTrackPrivateAVF.h.
(WebCore::VideoTrackPrivateAVF::kind): Simple getter.
(WebCore::VideoTrackPrivateAVF::id): Ditto.
(WebCore::VideoTrackPrivateAVF::label): Ditto.
(WebCore::VideoTrackPrivateAVF::language): Ditto.
(WebCore::VideoTrackPrivateAVF::setKind): Simple setter.
(WebCore::VideoTrackPrivateAVF::setId): Ditto.
(WebCore::VideoTrackPrivateAVF::setLabel): Ditto.
(WebCore::VideoTrackPrivateAVF::setLanguage): Ditto.
(WebCore::VideoTrackPrivateAVF::VideoTrackPrivateAVF): Simple constructor.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Create a AVTrackPrivateAVFObjCImpl.
(WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack): Retrieve properties from m_impl.
(WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack): Create a new AVTrackPrivateAVFObjCImpl.
(WebCore::AudioTrackPrivateAVFObjC::playerItemTrack): Pass to m_impl.
(WebCore::AudioTrackPrivateAVFObjC::setEnabled): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Refactor implementation into
    template method determineChangedTracksFromNewTracksAndOldItems().
(WebCore::determineChangedTracksFromNewTracksAndOldItems): Refactored.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Pass to determineChangedTracksFromNewTracksAndOldItems.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Changed class hosting
    languageForAVAssetTrack.
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp: Added.
(WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): Create a AVTrackPrivateAVFObjCImpl.
(WebCore::VideoTrackPrivateAVFObjC::resetPropertiesFromTrack): Retrieve properties from m_impl.
(WebCore::VideoTrackPrivateAVFObjC::setPlayerItemTrack): Create a new AVTrackPrivateAVFObjCImpl.
(WebCore::VideoTrackPrivateAVFObjC::playerItemTrack): Pass to m_impl.
(WebCore::VideoTrackPrivateAVFObjC::setSelected): Ditto.
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h: Added.
(WebCore::VideoTrackPrivateAVFObjC::create): Simple factory.

LayoutTests:

* media/track/video-track-expected.txt: Added.
* media/track/video-track.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
SpeculativeJIT::m_arguments/m_variables are vestiges of a time long gone
https://bugs.webkit.org/show_bug.cgi?id=122140

Reviewed by Darin Adler.
        
Just killing code.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::SpeculativeJIT):
(JSC::DFG::SpeculativeJIT::compileInlineStart):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::recordSetLocal):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[mac] 1x emulation on Retina hardware shouldn't use SPI
https://bugs.webkit.org/show_bug.cgi?id=122152
<rdar://problem/15119384>

Reviewed by Anders Carlsson.

* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow):
(main):
* DumpRenderTree/mac/DumpRenderTreeWindow.h:
* DumpRenderTree/mac/DumpRenderTreeWindow.mm:
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView):
* WebKitTestRunner/mac/main.mm:
(main):
Register for AppleMagnifiedMode instead of using _setWindowResolution:displayIfChanged:.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[wk2] WebKitTestRunner's window snapshots are blank with tiled drawing
https://bugs.webkit.org/show_bug.cgi?id=122006
<rdar://problem/15095197>

Reviewed by Dean Jackson.

* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView):
Layer-back the root view in WebKitTestRunner's window, to work around a bug
where the window server snapshot API returns blank snapshots.

Re-landing after r156724, this should not break everything now.

Add a test that ensures that WebKitTestRunner's snapshots are not
completely blank with tiled drawing enabled.

* platform/mac-wk2/tiled-drawing/window-server-snapshots-work-expected-mismatch.html: Added.
* platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix; The addedFunction and removedFunction arguments to determineChangedTracksFromNewTracksAndOldItems
were reversed, exposing an underlying, existing bug in AudioTrackPrivate and VideoTrack private. Give a default (null)
value to AudioTrackPrivate::m_client and VideoTrackPrivate::m_client and fix the ordering of arguments in
determineChangedTracksFromNewTracksAndOldItems.

* platform/graphics/AudioTrackPrivate.h:
(WebCore::AudioTrackPrivate::AudioTrackPrivate):
* platform/graphics/VideoTrackPrivate.h:
(WebCore::VideoTrackPrivate::VideoTrackPrivate):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::determineChangedTracksFromNewTracksAndOldItems):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Console buttons don’t show after page reload
https://bugs.webkit.org/show_bug.cgi?id=116515

Reviewed by Darin Adler.

The correct display of navigation items in the ContentBrowser is contingent on
the ContentViewContainer's _backForwardList being up-to-date when the navigation
items are retrieved from it. However, when the main resource changes (in this case
the user refreshes the browser), calls are made to ContentViewContainer's
closeAllContentViewsOfPrototype() which may modify the _backForwardList but doesn't
necessarily notify of a change to the currentContentView since we may be still showing
the same view in case it wasn't directly related to the main resource, for instance
the console log.

We now check if the _backForwardList is changed as a result of calling
closeAllContentViewsOfPrototype() and in that case also dispatch the
CurrentContentViewDidChange event which will restore the correct state
for the back/forward buttons and navigation items of the navigation bar.

* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype):
Track changes to the _backForwardList and dispatch the CurrentContentViewDidChange
event in case such changes happened.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: evaluate and show a popover for selected text in JS source when paused
https://bugs.webkit.org/show_bug.cgi?id=122151

Reviewed by Joseph Pecoraro.

Identify if the hovered token is contained within the text selection (if any) and use
the selection as the hovered expression to allow the user to select text and hover it
to see what it evaluates to.

* UserInterface/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype.highlightRange):
Check we're trying to highlight a different range before removing the highlight
and applying the new one, this prevents the marked text from flashing if it's
being re-hovered which would easily happen when hovering multiple tokens within
the same selection.

(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
In the case where there is selected text, check whether the hovered token is at least
partially contained within the selection, and if so use the selection text as the
hovered expression to evaluate.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Added adoptCOM to COMPtr on Windows.
https://bugs.webkit.org/show_bug.cgi?id=122069

Patch by Alex Christensen <achristensen@webkit.org> on 2013-10-01
Reviewed by Brent Fulgham.

* platform/win/COMPtr.h:
(adoptCOM): Added.

Source/WebKit/win: Implemented createWebViewWithRequest in WinLauncher.
https://bugs.webkit.org/show_bug.cgi?id=122069

Patch by Alex Christensen <achristensen@webkit.org> on 2013-10-01
Reviewed by Brent Fulgham.

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::createWindow):
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchCreatePage):
Pass request url from the NavigationAction to createWebViewWithRequest.

Tools: Implemented createWebViewWithRequest in WinLauncher.
https://bugs.webkit.org/show_bug.cgi?id=122069

Patch by Alex Christensen <achristensen@webkit.org> on 2013-10-01
Reviewed by Brent Fulgham.

* WinLauncher/PrintWebUIDelegate.cpp:
(PrintWebUIDelegate::createWebViewWithRequest): Added.
* WinLauncher/PrintWebUIDelegate.h:
Removed createWebViewWithRequest stub.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: [Win] Implement the media controls in JavaScript 
https://bugs.webkit.org/show_bug.cgi?id=122166

Reviewed by Jer Noble.

* DerivedSources.make: Uncomment feature flag test.
* WebCore.vcxproj/WebCore.vcxproj: Add new media control implementation files.
Also cleaned up some misplaced files in the project tree.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.vcxproj/WebCoreCommon.props: Add missing include path for the
mediacontrols path.
* WebCore.vcxproj/copyForwardingHeaders.cmd: Add Modules/mediacontrols to copied headers.
* rendering/RenderThemeWin.cpp: Add missing include for UserAgentScripts.

WebKitLibraries: [Win] Implement the media controls in JavaScript.
https://bugs.webkit.org/show_bug.cgi?id=122166

Reviewed by Jer Noble.

* win/tools/vsprops/FeatureDefines.props: Activate the
ENABLE_MEDIA_CONTROLS_SCRIPT flag.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r156725.
http://trac.webkit.org/changeset/156725
https://bugs.webkit.org/show_bug.cgi?id=122176

broke all the mismatch tests again (Requested by thorton on
#webkit).

Tools:

* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView):

LayoutTests:

* platform/mac-wk2/tiled-drawing/window-server-snapshots-work-expected-mismatch.html: Removed.
* platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fast/forms/search-event-delay.html is flakey
https://bugs.webkit.org/show_bug.cgi?id=53990

* TestExpectations: Marking as such.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cleanup Document::dispatchFullScreenChangeOrErrorEvent
https://bugs.webkit.org/show_bug.cgi?id=122143

Reviewed by Antti Koivisto.

Reduce the code duplication by extracting dispatchFullScreenChangeOrErrorEvent.

* dom/Document.cpp:
(WebCore::Document::fullScreenChangeDelayTimerFired):
(WebCore::Document::dispatchFullScreenChangeOrErrorEvent): Extracted.
* dom/Document.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Consolidate multiple OSRExit calls into one.
https://bugs.webkit.org/show_bug.cgi?id=122168

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

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileArithMul):
(JSC::FTL::LowerDFGToLLVM::compileArithDiv):
(JSC::FTL::LowerDFGToLLVM::compileArithMod):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Unreviewed build fix after r156730.
https://bugs.webkit.org/show_bug.cgi?id=122021

* platform/win/TestExpectations: Disable a number of tests broken by the switch to the new
CSS/JS-based media controls.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tweaks to the Buildbot Dashboard

https://bugs.webkit.org/show_bug.cgi?id=122169

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js:
(BuildbotBuilderQueueView.prototype.update.appendBuilderQueueStatus):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView.prototype.revisionLinksForIteration):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Initialization.js: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot.prototype.buildLogURLForIteration):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html:


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