Add empty UserContentController class
https://bugs.webkit.org/show_bug.cgi?id=127300
<rdar://problem/15861296>

Reviewed by Dan Bernstein.

This is the first step towards moving handling of user scripts and style sheets from
the page group to a separate objects and ultimately make them be settable per page instead of per page group.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* page/UserContentController.cpp: Added.
(WebCore::UserContentController::create):
(WebCore::UserContentController::UserContentController):
(WebCore::UserContentController::~UserContentController):
* page/UserContentController.h: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
build.webkit.org/dashboard should display information about patches in EWS
https://bugs.webkit.org/show_bug.cgi?id=127006

Reviewed by Ryosuke Niwa.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Bugzilla.js: Added.
(Bugzilla.prototype.detailsURLForAttachment):
Added a class for Bugzilla. So far, the only thing it can do is build patch URLs,
which is needed when one wants to do something with a patch EWS is stuck on.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Initialization.js:
Create a Bugzilla instance.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/EWS.js:
(EWS.prototype.jsonQueueLengthURL):
(EWS.prototype.jsonQueueStatusURL):
Build JSON ULRs here, not in EWSQueue, as this is how other classes are structured.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/EWSQueue.js:
(EWSQueue.prototype.get statusPageURL): Changed to use a URL provided by EWS instead
of second guessing.
(EWSQueue.prototype.get chartsPageURL): Added.
(EWSQueue.prototype.get loadedDetailedStatus): Tells whether we currently have
additional data already loaded (it's reset with every update).
(EWSQueue.prototype.get patches): Get patch queue.
(EWSQueue.prototype.get bots): Get bots.
(EWSQueue.prototype.update): Changed to use a specialized cheaper URL.
(EWSQueue.prototype.loadDetailedStatus): Load and transform detailed status JSON.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/EWSQueueView.js:
(EWSQueueView.prototype.update.appendQueue): Add a popover is there are any patches
in the queue.
(EWSQueueView.prototype.addLinkToRow): A helper to build the popover.
(EWSQueueView.prototype.addTextToRow): Ditto.
(EWSQueueView.prototype._addQueueHeadingToPopover): Ditto.
(EWSQueueView.prototype._addBotsHeadingToPopover): Ditto.
(EWSQueueView.prototype._addDividerToPopover): Ditto.
(EWSQueueView.prototype._timeIntervalString): A helper to format a timestamp into a
relative string.
(EWSQueueView.prototype._popoverContentForEWSQueue): Build the popover.
(EWSQueueView.prototype._presentPopoverForEWSQueue): Start loading data, and present
it when done.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/QueueView.css:
Added rules for EWS popover. Removed a duplicate rule for build-logs-popover.
Changed a few difficult to read padding styles to padding-left.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modernize WebCore/inspector with nullptr
https://bugs.webkit.org/show_bug.cgi?id=127303

Reviewed by Anders Carlsson.

Ran clang-modernize -use-nullptr over WebCore/inspector.

* inspector/ConsoleMessage.cpp:
(WebCore::ConsoleMessage::ConsoleMessage):
* inspector/ConsoleMessage.h:
* inspector/ContentSearchUtils.cpp:
(WebCore::ContentSearchUtils::findMagicComment):
* inspector/DOMEditor.cpp:
(WebCore::DOMEditor::SetOuterHTMLAction::SetOuterHTMLAction):
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::patchDocument):
(WebCore::DOMPatchSupport::patchNode):
(WebCore::DOMPatchSupport::diff):
(WebCore::DOMPatchSupport::innerPatchChildren):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::disable):
(WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
(WebCore::InspectorCanvasAgent::frameNavigated):
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::clearMessages):
(WebCore::InspectorConsoleAgent::didFinishXHRLoading):
(WebCore::InspectorConsoleAgent::didReceiveResponse):
(WebCore::InspectorConsoleAgent::didFailLoading):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::inspectedPageDestroyed):
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::disable):
(WebCore::InspectorDOMDebuggerAgent::discardAgent):
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::~InspectorDOMStorageAgent):
(WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
(WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
(WebCore::InspectorDOMStorageAgent::findStorageArea):
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::~InspectorDatabaseAgent):
(WebCore::InspectorDatabaseAgent::findByFileName):
(WebCore::InspectorDatabaseAgent::databaseForId):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::addMessageToConsole):
(WebCore::InspectorDebuggerAgent::resolveBreakpoint):
(WebCore::InspectorDebuggerAgent::didParseSource):
(WebCore::InspectorDebuggerAgent::didContinue):
(WebCore::InspectorDebuggerAgent::clearBreakDetails):
* inspector/InspectorFrontendHost.cpp:
(WebCore::FrontendMenuProvider::disconnect):
(WebCore::InspectorFrontendHost::InspectorFrontendHost):
(WebCore::InspectorFrontendHost::disconnectClient):
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::~InspectorHeapProfilerAgent):
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::assertDocument):
(WebCore::assertIDBFactory):
(WebCore::InspectorIndexedDBAgent::requestData):
* inspector/InspectorInstrumentation.cpp:
(WebCore::frameForScriptExecutionContext):
(WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl):
(WebCore::InspectorInstrumentation::consoleAgentEnabled):
(WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
(WebCore::InspectorInstrumentation::retrieveTimelineAgent):
(WebCore::InspectorInstrumentation::instrumentingAgentsForPage):
(WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
(WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
(WebCore::InspectorInstrumentation::instrumentingAgentsForFrame):
(WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::disable):
* inspector/InspectorNodeFinder.cpp:
(WebCore::InspectorNodeFinder::searchUsingXPath):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent):
(WebCore::InspectorPageAgent::sharedBufferContent):
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::frameForId):
(WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::~InspectorProfilerAgent):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForResourceResponse):
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::didReceiveResponse):
(WebCore::InspectorResourceAgent::didFinishLoading):
(WebCore::InspectorResourceAgent::didFailLoading):
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorResourceAgent::disable):
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
* inspector/InspectorStyleSheet.cpp:
(ParsedStyleSheet::ruleSourceDataAt):
(WebCore::buildSourceRangeObject):
(WebCore::asCSSRuleList):
(WebCore::fillMediaListChain):
(WebCore::InspectorStyle::setPropertyText):
(WebCore::InspectorStyle::populateAllProperties):
(WebCore::InspectorStyle::extractSourceData):
(WebCore::InspectorStyle::newLineAndWhitespaceDelimiters):
(WebCore::InspectorStyleSheet::addRule):
(WebCore::InspectorStyleSheet::ruleForId):
(WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
(WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::styleForId):
(WebCore::InspectorStyleSheet::inspectorStyleForId):
(WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
* inspector/InspectorStyleSheet.h:
(WebCore::InspectorCSSId::asProtocolValue):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::stop):
(WebCore::InspectorTimelineAgent::willComposite):
(WebCore::InspectorTimelineAgent::page):
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::~InspectorWorkerAgent):
* inspector/InstrumentingAgents.cpp:
(WebCore::InstrumentingAgents::InstrumentingAgents):
(WebCore::InstrumentingAgents::reset):
* inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::ResourceData::ResourceData):
(WebCore::NetworkResourcesData::xhrReplayData):
(WebCore::NetworkResourcesData::removeCachedResource):
(WebCore::NetworkResourcesData::resourceDataForRequestId):
* inspector/PageConsoleAgent.cpp:
(WebCore::PageConsoleAgent::~PageConsoleAgent):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::disable):
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::~PageRuntimeAgent):
(WebCore::PageRuntimeAgent::didCreateMainWorldContext):
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):
* inspector/ScriptArguments.cpp:
(WebCore::ScriptArguments::globalState):
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::~WorkerRuntimeAgent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace uses of std::forward<T>(), std::unique_ptr<T>::clear() that landed in r162368
https://bugs.webkit.org/show_bug.cgi?id=127306

Reviewed by Darin Adler.

Address the post-landing reviews of the r162368 commit that moved WebAudio source code to using std::unique_ptr.
std::move() should be used instead of std::forward<T>() in HRTFKernel::create().
Instead of calling std::unique_ptr<T>::reset(), nullptr should be assigned to that smart pointer to reset it.

* Modules/webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::uninitialize):
* Modules/webaudio/DynamicsCompressorNode.cpp:
(WebCore::DynamicsCompressorNode::uninitialize):
* Modules/webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::setFormat):
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::uninitialize):
* platform/audio/AudioChannel.h:
(WebCore::AudioChannel::set):
* platform/audio/HRTFDatabaseLoader.cpp:
(WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
* platform/audio/HRTFKernel.h:
(WebCore::HRTFKernel::create):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CodeBlockSet::traceMarked doesn't need to visit the ownerExecutable
https://bugs.webkit.org/show_bug.cgi?id=127301

Reviewed by Oliver Hunt.

We used to just call CodeBlock::visitAggregate, but now we call visitChildren
on the ownerExecutable, which is unnecessary.

* heap/CodeBlockSet.cpp:
(JSC::CodeBlockSet::traceMarked):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
svg/filters/feComponentTransfer-style-crash.xhtml is flaky
https://bugs.webkit.org/show_bug.cgi?id=127310

* platform/mac/TestExpectations: Marked it as such.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add AVKit fullscreen video interface.
https://bugs.webkit.org/show_bug.cgi?id=126818

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-01-20
Reviewed by Eric Carlson.

Source/WebCore:

No new tests, no observable change in functionality.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
Add ability for fullscreen to borrow the AVPlayerLayer.
* page/Settings.cpp:
* page/Settings.h:
(WebCore::Settings::setMediaPlaybackFullscreenAVKit):
(WebCore::Settings::mediaPlaybackFullscreenAVKit):
Add a disabled setting.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen):
Enabled fullscreen for iOS.
* platform/ios/WebVideoFullscreenControllerAVKit.h: Added.
* platform/ios/WebVideoFullscreenControllerAVKit.mm: Added.
(-[WebAVPlayerController init]):
(-[WebAVPlayerController dealloc]):
(-[WebAVPlayerController forwardingTargetForSelector:]):
(-[WebAVPlayerController shouldDismissForDone]):
(-[WebAVPlayerController play:]):
(-[WebAVPlayerController pause:]):
(-[WebAVPlayerController togglePlayback:]):
(-[WebAVPlayerController isPlaying]):
(-[WebAVPlayerController setPlaying:]):
(+[WebAVPlayerController keyPathsForValuesAffectingPlaying]):
(-[WebAVPlayerController seekToTime:]):
(-[WebAVPlayerController updateTimingWithCurrentTime:]):
(-[WebAVPlayerController effectiveRate]):
(-[WebAVPlayerController setMediaElement:]):
(-[WebAVPlayerController handleEvent:]):
(-[WebVideoFullscreenController init]):
(-[WebVideoFullscreenController dealloc]):
(-[WebVideoFullscreenController setMediaElement:]):
(-[WebVideoFullscreenController mediaElement]):
(-[WebVideoFullscreenController enterFullscreen:]):
(-[WebVideoFullscreenController exitFullscreen]):
Add WebAVPlayerController for HTMLMediaElememt to interface with AVPlayerViewController.

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::supportsFullscreenForNode):
Enable *FullscreenForNode for HTMLMediaElement for iOS

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences mediaPlaybackFullscreenAVKit]):
(-[WebPreferences setMediaPlaybackFullscreenAVKit:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
(-[WebView _enterFullscreenForNode:WebCore::]):
* WebView/WebViewInternal.h:
Add a disabled pref mediaPlaybackFullscreenAVKit.
Use WebVideoFullscreenControllerAVKit on iOS

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Give each page a UserContentController
https://bugs.webkit.org/show_bug.cgi?id=127315

Reviewed by Andreas Kling.

Add a UserContentController object to PageGroup and have the page group set it on any
pages that are added to the page group.

This is another step towards moving handling of user content away from PageGroup and make it
possible for each page to have different user content.

* page/Page.cpp:
(WebCore::Page::~Page):
(WebCore::Page::setUserContentController):
* page/Page.h:
(WebCore::Page::userContentController):
* page/PageGroup.cpp:
(WebCore::PageGroup::PageGroup):
(WebCore::PageGroup::addPage):
(WebCore::PageGroup::removePage):
* page/PageGroup.h:
* page/UserContentController.cpp:
(WebCore::UserContentController::addPage):
(WebCore::UserContentController::removePage):
* page/UserContentController.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Subpixel layout: 100000px overflows while calculating layout positions.
https://bugs.webkit.org/show_bug.cgi?id=126896

Reviewed by Simon Fraser.

Test case is adjusted to subpixel layout.

* fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html:
* platform/efl/TestExpectations:
* platform/gtk/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction-expected.txt: Removed.
* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162381 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Setting m_pageScaleFactor directly in WebPageProxy::scalePage
https://bugs.webkit.org/show_bug.cgi?id=127090

Reviewed by Simon Fraser.

When the client side sets the scale factor, the UIProcess will send the message to WebProcess and only after
WebPageProxy::pageScaleFactorDidChange is called the desired scale factor is returned correctly by
WebPageProxy::pageScaleFactor.
This will avoid the client side retrieve a wrong scale factor while UIProcess and WebProcess gets synchronized.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scalePage):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
svg/dom/SVGPolygonElement-baseVal-list-removal-crash.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=127316

* platform/mac-wk2/TestExpectations: Marked as such.



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