run-webkit-tests doesn't work with Apache 2.4
https://bugs.webkit.org/show_bug.cgi?id=128861

Reviewed by Andreas Kling.

Tools: 

Use apache<version>-httpd.conf like we do on Fedora and Debian.

* Scripts/webkitpy/port/base.py:
(Port._apache_config_file_name_for_platform):

LayoutTests: 

* http/conf/apache2.4-httpd.conf: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164148 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix after r164148.

Tools: 

* Scripts/webkitpy/port/base.py:
(Port._apache_config_file_name_for_platform):

LayoutTests: 

* http/conf/apache2-httpd.conf: Removed.
* http/conf/apache2.2-httpd.conf: Copied from LayoutTests/http/conf/apache2-httpd.conf.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Another build fix after r164149.

* Scripts/webkitpy/port/port_testcase.py:
(test_apache_config_file_name_for_platform):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: CRASH when debugger closes while paused and remote inspecting a JSContext
https://bugs.webkit.org/show_bug.cgi?id=127757

Reviewed by Timothy Hatcher.

The problem was that the lifetime of the InspectorController and all agents
was tied to the remote inspector session. So, if a remote inspector was
disconnected while in the nested run loop, everything would get torn
down and when execution continued out of the nested runloop we would be
back in the original call stack of destroyed objects.

This patch changes the lifetime of the InspectorController and agents to
the JSGlobalObject. This way the agents are always alive, just the
frontend and backend channels are destroyed and recreated each remote
inspector session. This matches the agent lifetime for WebCore agents.
We can also later take advantage of the agents being alive before
and between inspector debug sessions to stash exception messages to
pass on to a debugger if a debugger is connected later.

* inspector/JSGlobalObjectInspectorController.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
Cleaner initialization of agents. Easier to follow.

(Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
Move InjectedScript disconnection only once the global object is destroyed.
This way if a developer has attached once and included an injected script,
we will keep it around with any state it might want to remember until
the global object is destroyed.

(Inspector::JSGlobalObjectInspectorController::globalObjectDestroyed):
Disconnect agents and injected scripts when the global object is destroyed.

* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::disconnect):
Now that the injected script manager is reused between remote
inspector sessions, don't clear the pointer on disconnect calls.
We now only call this once when the global object is getting
destroyed anyways so it doesn't matter. But if we wanted to call
disconnect multiple times, e.g. once per session, we could.

* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::dispatchFunctionToListeners):
If the only listener was removed during the nested runloop, then when
we dispatch an event after the nested runloop the listener list will
be empty. Instead of asserting, just pass by an empty list.

* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::inspectorController):
Tie the inspector controller lifetime to the JSGlobalObject.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):
(JSC::JSGlobalObject::init):
Create the inspector controller, and eagerly signal teardown
in destruction.

* runtime/JSGlobalObjectDebuggable.h:
* runtime/JSGlobalObjectDebuggable.cpp:
(JSC::JSGlobalObjectDebuggable::connect):
(JSC::JSGlobalObjectDebuggable::disconnect):
(JSC::JSGlobalObjectDebuggable::dispatchMessageFromRemoteFrontend):
Simplify by using the inspector controller on JSGlobalObject.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164151 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Control tints don't update inside WebViews
https://bugs.webkit.org/show_bug.cgi?id=128862

Reviewed by Ryosuke Niwa.

* WebView/WebView.mm:
(-[WebView _windowChangedKeyState]):
Call [super _windowChangedKeyState].

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Windows rebaselines after dependency updates.

* platform/win/fast/css/first-letter-block-form-controls-crash-expected.txt:
* platform/win/fast/css/relative-position-replaced-in-table-display-crash-expected.txt:
* platform/win/fast/forms/access-key-for-all-elements-expected.txt:
* platform/win/fast/forms/form-associated-element-crash3-expected.txt:
* platform/win/fast/forms/search-styled-expected.txt:
* platform/win/fast/multicol/renderer-positioned-assert-crash-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mac rebaseline after r164145.

* platform/mac/fast/forms/search-styled-expected.png:
* platform/mac/fast/forms/search-styled-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add back pre-r164154 results to platform/mac-mountainlion.

* platform/mac-mountainlion/fast/forms/search-styled-expected.png: Copied from LayoutTests/platform/mac/fast/forms/search-styled-expected.png.
* platform/mac-mountainlion/fast/forms/search-styled-expected.txt: Copied from LayoutTests/platform/mac/fast/forms/search-styled-expected.txt.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164155 268f45cc-cd09-0410-ab3c-d52691b4dbfc
setSelectionRange shouldn't trigger a synchronous layout to check focusability when text field is already focused
https://bugs.webkit.org/show_bug.cgi?id=128804

Reviewed by Enrica Casucci.

Don't trigger a synchronous layout at the beginning of setSelectionRange if the element is already focused
since we don't have to check the size of render box in that case.

We should be able to get rid of this synchronous layout entirely once we fix https://webkit.org/b/128797
but that's somewhat risky behavioral change so we'll do that in a separate patch.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll): Fixed the bug where selectAll selects the entire document even if the text
form contol is focused if the selection is none (i.e. not anchored to any node).
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionRange): Only update the layout if the element is not focused
already. Also pass in DoNotSetFocus option to setSelection since we already have the focus in that case.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164156 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Improve the appearance of DYEBench
https://bugs.webkit.org/show_bug.cgi?id=128866

Reviewed by Antti Koivisto.

Add a div that shows progress during the test. Also show 95th percentile,
and use a table instead of pre to show results.

* DoYouEvenBench/Full.html:
(.addResult): Added. Shows results in a table.
(benchmarkClient.willRunTest): Added to show the progress bar.
(benchmarkClient.didRunTest):
(benchmarkClient.didRunSuites):
(benchmarkClient.didFinishLastIteration): Compute 95th percentile using Statistics.js

* DoYouEvenBench/resources/benchmark-runner.js:
(BenchmarkRunner.prototype._appendFrame): Fix the bug where marginLeft and marginTop
weren't correctly parsed. We were treating top as left and bottom as top somehow.
(BenchmarkRunner.prototype._runTestAndRecordResults): Fixed a typo.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CTTE: WorkerGlobalScope is always owned by a WorkerThread.
<https://webkit.org/b/128834>

Codify this by storing the owner thread as a WorkerThread& and making
thread() return a reference.

This exposed a couple of unnecessary assertions.

Reviewed by Anders Carlsson.

* Modules/notifications/WorkerGlobalScopeNotifications.cpp:
(WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
* Modules/websockets/ThreadableWebSocketChannel.cpp:
(WebCore::ThreadableWebSocketChannel::create):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::createdMessagePort):
(WebCore::ScriptExecutionContext::destroyedMessagePort):
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
(WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
* inspector/WorkerInspectorController.cpp:
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::pauseWorkerGlobalScope):
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
(WebCore::WorkerThreadableLoader::loadResourceSynchronously):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeRequestFromCache):
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::create):
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
(WebCore::DedicatedWorkerGlobalScope::postMessage):
(WebCore::DedicatedWorkerGlobalScope::importScripts):
(WebCore::DedicatedWorkerGlobalScope::thread):
* workers/DedicatedWorkerGlobalScope.h:
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
* workers/SharedWorkerGlobalScope.cpp:
(WebCore::SharedWorkerGlobalScope::create):
(WebCore::SharedWorkerGlobalScope::SharedWorkerGlobalScope):
(WebCore::SharedWorkerGlobalScope::thread):
* workers/SharedWorkerGlobalScope.h:
* workers/SharedWorkerThread.cpp:
(WebCore::SharedWorkerThread::createWorkerGlobalScope):
* workers/WorkerGlobalScope.cpp:
(WebCore::CloseWorkerGlobalScopeTask::performTask):
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
(WebCore::WorkerGlobalScope::~WorkerGlobalScope):
(WebCore::WorkerGlobalScope::postTask):
(WebCore::WorkerGlobalScope::logExceptionToConsole):
(WebCore::WorkerGlobalScope::addConsoleMessage):
(WebCore::WorkerGlobalScope::addMessage):
(WebCore::WorkerGlobalScope::isContextThread):
* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::thread):
* workers/WorkerMessagingProxy.cpp:
(WebCore::MessageWorkerGlobalScopeTask::performTask):
(WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
(WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::runInMode):
(WebCore::WorkerRunLoop::runCleanupTasks):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CQ fix after r164105.

* DumpRenderTree/mac/EventSendingController.mm:
* WebKitTestRunner/mac/EventSenderProxy.mm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] 10X slower than Chrome when drawing a video into a canvas
https://bugs.webkit.org/show_bug.cgi?id=124599

Reviewed by Darin Adler.

Follow up patch to r159518 to address Darin's post-commit review.

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::nativeImageForCurrentTime): Use nullptr.
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::nativeImageForCurrentTime): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Clear the
        AVPlayerItemVideoOutput's delegate callback.
(WebCore::CVPixelBufferGetBytePointerCallback): Use static_cast.
(WebCore::CVPixelBufferReleaseBytePointerCallback): Ditto.
(WebCore::CVPixelBufferReleaseInfoCallback): Ditto.
(-[WebCoreAVFPullDelegate initWithCallback:]): Space changes.
(-[WebCoreAVFPullDelegate setCallback:]): Added.
(-[WebCoreAVFPullDelegate outputMediaDataWillChange:]): Check the value of m_callback.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WK2 AVKit enter fullscreen doesn't work a second time.
https://bugs.webkit.org/show_bug.cgi?id=128558

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-02-15
Reviewed by Jer Noble.

Lazily create WebAVPlayerController when needed.

* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit):
(WebVideoFullscreenInterfaceAVKit::getPlayerController):
Add getPlayerController()

(WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel):
(WebVideoFullscreenInterfaceAVKit::setDuration):
(WebVideoFullscreenInterfaceAVKit::setCurrentTime):
(WebVideoFullscreenInterfaceAVKit::setRate):
(WebVideoFullscreenInterfaceAVKit::setVideoDimensions):
(WebVideoFullscreenInterfaceAVKit::setVideoLayer):
(WebVideoFullscreenInterfaceAVKit::enterFullscreenWithCompletionHandler):
use getPlayerController();

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Add performance test for raster shape with shape-margin
https://bugs.webkit.org/show_bug.cgi?id=128770

Reviewed by Ryosuke Niwa.

This patch introduces a new performance test for image valued shapes,
where shape-margin is applied on the shape.
The test is skipped by default.

* Layout/Shapes/ShapeOutsideRasterWithMargin.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: scope chain details sidebar doesn't update values modified via console
https://bugs.webkit.org/show_bug.cgi?id=126855

Patch by Chris J. Shull <chrisjshull@gmail.com> on 2014-02-15
Reviewed by Timothy Hatcher.

Add a RuntimeManager event that the scope chain details sidebar can
listen to to trigger refresh.

Testing on this is blocked by http://webkit.org/b/128724
(Web Inspector: Issue testing breakpoints).

* UserInterface/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evalCallback):
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
* UserInterface/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] LLINT is not working.
https://bugs.webkit.org/show_bug.cgi?id=128115

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-02-15
Reviewed by Mark Lam.

This patch will generate assembly code with Intel syntax, which can be processed by the Microsoft assembler (MASM).
By creating an asm file instead of a header file with inline assembly, we can support 64-bit.
Only 32-bit compilation has been tested, not 64-bit.
The aim of this patch is to get LLINT up and running on Windows.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Added new files, and generated asm file.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto.
* LLIntAssembly/build-LLIntAssembly.sh: Generate dummy asm file in case we're using C backend.
* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFor): Compile fix when DFG is disabled.
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFor): Ditto.
* bytecode/GetByIdStatus.h: Ditto.
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFor): Ditto.
* bytecode/PutByIdStatus.h: Ditto.
* llint/LLIntData.cpp:
(JSC::LLInt::initialize): Compile fix.
* llint/LLIntSlowPaths.h: Added llint_crash function.
* llint/LLIntSlowPaths.cpp: Ditto.
* llint/LowLevelInterpreter.cpp: Disable code for Windows.
* llint/LowLevelInterpreter.asm: Remove instruction which generates incorrect assembly code on Windows (MOV 0xbbadbeef, register), call llint_crash instead.
Make local labels visible to MASM on Windows.
* llint/LowLevelInterpreter32_64.asm: Make local labels visible to MASM on Windows.
* offlineasm/asm.rb: Generate asm file with Intel assembly syntax.
* offlineasm/settings.rb: Ditto.
* offlineasm/x86.rb: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Add ability to specify descendant type when using AXUIElementsForSearchPredicate.
https://bugs.webkit.org/show_bug.cgi?id=128747

Reviewed by Chris Fleizach.

Source/WebCore:

Added support for 'immediate descendant only' to existing predicate based searching. This
addition allows VoiceOver to fetch each child element lazily (rather than all at once via AXChildren).

Test: platform/mac/accessibility/search-predicate-immediate-descendants-only.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::findMatchingObjects):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):

Tools:

Updated uiElementCountForSearchPredicate and uiElementForSearchPredicate test methods to support 'immediate descendant only' searching.

* DumpRenderTree/AccessibilityUIElement.cpp:
(uiElementCountForSearchPredicateCallback):
(uiElementForSearchPredicateCallback):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::uiElementCountForSearchPredicate):
(AccessibilityUIElement::uiElementForSearchPredicate):
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::uiElementCountForSearchPredicate):
(AccessibilityUIElement::uiElementForSearchPredicate):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(searchPredicateParameterizedAttributeForSearchCriteria):
(AccessibilityUIElement::uiElementCountForSearchPredicate):
(AccessibilityUIElement::uiElementForSearchPredicate):
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::uiElementCountForSearchPredicate):
(AccessibilityUIElement::uiElementForSearchPredicate):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::uiElementCountForSearchPredicate):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::uiElementCountForSearchPredicate):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::uiElementCountForSearchPredicate):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::searchPredicateParameterizedAttributeForSearchCriteria):
(WTR::AccessibilityUIElement::uiElementCountForSearchPredicate):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):

LayoutTests:

Added test to verify that 'immediate descendant only' predicate based searching works as expected.

* platform/mac/accessibility/search-predicate-immediate-descendants-only-expected.txt: Added.
* platform/mac/accessibility/search-predicate-immediate-descendants-only.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Added GetMyArgumentByVal to FTL
https://bugs.webkit.org/show_bug.cgi?id=128850

Patch by Matthew Mirman <mmirman@apple.com> on 2014-02-15
Reviewed by Filip Pizlo.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileGetMyArgumentByVal):
* tests/stress/ftl-getbyval-arguments.js: Added.
(foo):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Fix marshaller used in WebKitWebPage::document-loaded signal
https://bugs.webkit.org/show_bug.cgi?id=128808

Reviewed by Sergio Villar Senin.

* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkit_web_page_class_init): Use g_cclosure_marshal_VOID__VOID
instead of g_cclosure_marshal_VOID__OBJECT.

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