FTL should support UntypedUse versions of Compare nodes
https://bugs.webkit.org/show_bug.cgi?id=125426

Reviewed by Oliver Hunt.
        
This adds UntypedUse versions of all comparisons except CompareStrictEq, which is
sufficiently different that I thought I'd do it in another patch.
        
This also extends our ability to abstract over comparison kind and removes a bunch of
copy-paste code.

* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileCompareEq):
(JSC::FTL::LowerDFGToLLVM::compileCompareLess):
(JSC::FTL::LowerDFGToLLVM::compileCompareLessEq):
(JSC::FTL::LowerDFGToLLVM::compileCompareGreater):
(JSC::FTL::LowerDFGToLLVM::compileCompareGreaterEq):
(JSC::FTL::LowerDFGToLLVM::compare):
(JSC::FTL::LowerDFGToLLVM::nonSpeculativeCompare):
* ftl/FTLOutput.h:
(JSC::FTL::Output::icmp):
(JSC::FTL::Output::equal):
(JSC::FTL::Output::notEqual):
(JSC::FTL::Output::above):
(JSC::FTL::Output::aboveOrEqual):
(JSC::FTL::Output::below):
(JSC::FTL::Output::belowOrEqual):
(JSC::FTL::Output::greaterThan):
(JSC::FTL::Output::greaterThanOrEqual):
(JSC::FTL::Output::lessThan):
(JSC::FTL::Output::lessThanOrEqual):
(JSC::FTL::Output::fcmp):
(JSC::FTL::Output::doubleEqual):
(JSC::FTL::Output::doubleNotEqualOrUnordered):
(JSC::FTL::Output::doubleLessThan):
(JSC::FTL::Output::doubleLessThanOrEqual):
(JSC::FTL::Output::doubleGreaterThan):
(JSC::FTL::Output::doubleGreaterThanOrEqual):
(JSC::FTL::Output::doubleEqualOrUnordered):
(JSC::FTL::Output::doubleNotEqual):
(JSC::FTL::Output::doubleLessThanOrUnordered):
(JSC::FTL::Output::doubleLessThanOrEqualOrUnordered):
(JSC::FTL::Output::doubleGreaterThanOrUnordered):
(JSC::FTL::Output::doubleGreaterThanOrEqualOrUnordered):
* tests/stress/untyped-equality.js: Added.
(foo):
* tests/stress/untyped-less-than.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add the notion of ConstantStoragePointer to DFG IR
https://bugs.webkit.org/show_bug.cgi?id=125395

Reviewed by Oliver Hunt.
        
This pushes more typed array folding into StrengthReductionPhase, and enables CSE on
storage pointers. Previously, you might have separate nodes for the same storage
pointer and this would cause some bad register pressure in the DFG. Note that this
was really a theoretical problem and not, to my knowledge a practical one - so this
patch is basically just a clean-up.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::::executeEffects):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::constantStoragePointerCSE):
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToConstantStoragePointer):
(JSC::DFG::Node::hasStoragePointer):
(JSC::DFG::Node::storagePointer):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileConstantStoragePointer):
(JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
(JSC::DFG::StrengthReductionPhase::foldTypedArrayPropertyToConstant):
(JSC::DFG::StrengthReductionPhase::prepareToFoldTypedArray):
* dfg/DFGWatchpointCollectionPhase.cpp:
(JSC::DFG::WatchpointCollectionPhase::handle):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileConstantStoragePointer):
(JSC::FTL::LowerDFGToLLVM::compileGetIndexedPropertyStorage):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] Remove knowledge of the WKView from the WebFullScreenManagerProxy by adding a proper client
https://bugs.webkit.org/show_bug.cgi?id=125427

Reviewed by Dan Bernstein.

* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::fullScreenManagerProxyClient):
(WebKit::PageClientImpl::closeFullScreenManager):
(WebKit::PageClientImpl::isFullScreen):
(WebKit::PageClientImpl::enterFullScreen):
(WebKit::PageClientImpl::exitFullScreen):
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
Implement the new client.

* UIProcess/API/mac/WKView.mm:
Remove call to setWebView() and do some cleanup.

* UIProcess/API/mac/WKViewInternal.h:
Convert to property syntax and re-arrange.

* UIProcess/PageClient.h:
Expose access to the new client.

* UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::create):
(WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
(WebKit::WebFullScreenManagerProxy::invalidate):
(WebKit::WebFullScreenManagerProxy::close):
(WebKit::WebFullScreenManagerProxy::isFullScreen):
(WebKit::WebFullScreenManagerProxy::enterFullScreen):
(WebKit::WebFullScreenManagerProxy::exitFullScreen):
(WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
(WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
* UIProcess/WebFullScreenManagerProxy.h:
Use the new client.

* UIProcess/WebPageProxy.cpp:
Pass the new client.

* UIProcess/mac/WebFullScreenManagerProxyMac.mm:
Removed. Now goes through the client.

* WebKit2.xcodeproj/project.pbxproj:
Remove WebFullScreenManagerProxyMac.mm.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the iOS build.

* UIProcess/API/ios/PageClientImplIOS.h:
* UIProcess/API/ios/PageClientImplIOS.mm:
* UIProcess/ios/WebFullScreenManagerProxyIOS.mm: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32-bit MiniBrowser doesn't build
https://bugs.webkit.org/show_bug.cgi?id=125420

Reviewed by Dan Bernstein.

* MiniBrowser/mac/AppDelegate.h:
* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate init]):
(-[BrowserAppDelegate applicationWillTerminate:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
getComputedStyle border-radius shorthand omits vertical radius information
https://bugs.webkit.org/show_bug.cgi?id=125394

Reviewed by Andreas Kling.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/4c2866855dddbb28bb7d978ad627acc368af23d0

getComputedStyle of border-radius shows the vertical radius components if they differ from their horizontal counterpants.
We were incorrectly detecting this case and over simplifying the results of getComputedStyle.
This patch ensures we only hide the vertical values if they are identical to the horizontal values.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::getBorderRadiusShorthandValue):

LayoutTests:

* fast/css/getComputedStyle/getComputedStyle-border-radius-shorthand-expected.txt:
* fast/css/getComputedStyle/getComputedStyle-border-radius-shorthand.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove WebContext::sharedProcessContext()
https://bugs.webkit.org/show_bug.cgi?id=125437

Reviewed by Dan Bernstein.

* UIProcess/API/ios/WKGeolocationProviderIOS.mm:
* UIProcess/WebContext.cpp:
* UIProcess/WebContext.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Move FullScreenManager logic to WebViewEfl
https://bugs.webkit.org/show_bug.cgi?id=125438

Reviewed by Gyuyoung Kim.

This patch fixed build break on EFL port Since r160296.

* PlatformEfl.cmake: Removed WebFullScreenManagerProxyEfl.cpp.
* UIProcess/WebFullScreenManagerProxy.cpp: Removed EFL specific code.
(WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
* UIProcess/WebFullScreenManagerProxy.h: Ditto.
* UIProcess/efl/WebFullScreenManagerProxyEfl.cpp: Removed file and moved logic to WebViewEfl.
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebViewEfl::WebViewEfl):
(WebKit::WebViewEfl::setEwkView): Removed call to setWebView().
(WebKit::WebViewEfl::fullScreenManagerProxyClient):
(WebKit::WebViewEfl::isFullScreen):
(WebKit::WebViewEfl::enterFullScreen):
(WebKit::WebViewEfl::exitFullScreen):
* UIProcess/efl/WebViewEfl.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][Gtk] Add support for ENABLE_NETWORK_PROCESS to the build system
https://bugs.webkit.org/show_bug.cgi?id=118231

Patch by Brian Holt <brian.holt@samsung.com> on 2013-12-09
Reviewed by Martin Robinson.

Original patch by Kwang Yul Seo  <skyul@company100.net>.

.:

Disabled ENABLE_NETWORK_PROCESS by default.

* Source/autotools/SetupAutomake.m4:
* Source/autotools/SetupWebKitFeatures.m4:

Source/WebKit2:

Add source files to the build system and build NetworkProcess executable.

* GNUmakefile.am:
* GNUmakefile.list.am:
* NetworkProcess/unix/NetworkProcessMainUnix.cpp:
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformInitializeWebProcess):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] Move WebFullScreenManagerProxyGtk logic to PageClientImpl
https://bugs.webkit.org/show_bug.cgi?id=125440

Reviewed by Martin Robinson.

Make PageClientImpl a WebFullScreenManagerProxyClient. This brings the GTK port in line
with changes in r160296 and fixes the WK2 build for that port.

* GNUmakefile.list.am:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::fullScreenManagerProxyClient):
(WebKit::PageClientImpl::closeFullScreenManager):
(WebKit::PageClientImpl::isFullScreen):
(WebKit::PageClientImpl::enterFullScreen):
(WebKit::PageClientImpl::exitFullScreen):
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage):
* UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] run-webkit-tests may DOS the system, specially in debug builds
https://bugs.webkit.org/show_bug.cgi?id=125436

Reviewed by Martin Robinson.

* GNUmakefile.am: use -no-fast-install for WebKitWebProcess and WebKitPluginProcess so
they do not need to be relinked the first time they are executed in-tree.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
accessibility/press-targets-center-point.html should not depend on font layout
https://bugs.webkit.org/show_bug.cgi?id=125387

Reviewed by Chris Fleizach.

* accessibility/press-targets-center-point.html: use explicit sizes for heights (and width
for vertical writing mode), so that font layout does not alter the results.
* platform/gtk/TestExpectations: remove failure expectation for accessibility/press-targets-center-point.html

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix the GTK+ build with NetworkProcess enabled.

* GNUmakefile.list.am: Add missing file to compilation.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][Soup] Support cache model in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=118343

Reviewed by Carlos Garcia Campos.

Original patch by Kwang Yul Seo <skyul@company100.net> and Csaba Osztrogonác <ossy@webkit.org>.

Copied cache model code from WebProcess.
NetworkProcess is configured not to use the WebCore memory cache.

* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::getCacheDiskFreeSize):
(WebKit::getMemorySize):
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
Initialize soup cache.
(WebKit::NetworkProcess::platformSetCacheModel):
Copied code from WebProcess::platformSetCacheModel but removed
WebCore memory cache initialization because NetworkProcess does not use
the WebCore memory cache.
(WebKit::NetworkProcess::clearCacheForAllOrigins):
Copied code from WebProcess::clearCacheForAllOrigins.
* NetworkProcess/unix/NetworkProcessMainUnix.cpp:
Copied initialization code from WebProcessMainGtk.cpp.
(WebKit::NetworkProcessMain):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel):
Don't set the disk cache if NetworkProcess is used.
(WebKit::WebProcess::platformClearResourceCaches):
Don't clear the non-existing disk cache. (if NetworkProcess is used)
(WebKit::WebProcess::platformInitializeWebProcess):
Don't initialize the disk cache if NetworkProcess is used.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Add UNIX_DOMAIN_SOCKETS specific bits for supporting NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=110093

Reviewed by Martin Robinson.

Original patch by Balazs Kelemen <kbalazs@webkit.org>.

Adds the UNIX specific bits to support connections to the
NetworkProcess. Since the process of creating the pair of sockets
is exactly the same as in the PluginProcess, I've decided to
refactor it in ConnectionUnix::createPlatformConnection(). This
can be reused later to create a cross-platform solution and remove
all the ifdefs (see bug 110978).

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
* Platform/CoreIPC/Connection.h:
* Platform/CoreIPC/unix/ConnectionUnix.cpp:
(CoreIPC::Connection::createPlatformConnection):
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::createWebProcessConnection):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
(WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensureNetworkProcessConnection):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: DataCloneError exception is not thrown when postMessage's second parameter is the source
port or the target port.

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

Patch by Michal Poteralski <m.poteralski@samsung.com> on 2013-12-09
Reviewed by Alexey Proskuryakov.

According to specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#dom-window-postmessage

If the method was invoked with a second argument transfer then if any of the objects in the
transfer are either the source port or the target port (if any), then a DataCloneError
exception should be thrown. Currently an InvalidStateError exception is thrown what is an
incorrect behaviour.

The proposed solution is change to the correct the exception value.

Tests: fast/dom/Window/postMessage-clone-port-error.html

* dom/MessagePort.cpp:
(WebCore::MessagePort::postMessage): Improve exception value

LayoutTests: DataCloneError exception is not thrown when postMessage's second parameter
is the source port or the target port.

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

Patch by Michal Poteralski <m.poteralski@samsung.com> on 2013-12-09
Reviewed by Alexey Proskuryakov.

Added layout test to check correctness of value thrown by postMessage:

* fast/dom/Window/postMessage-clone-port-error-expected.txt: Added.
* fast/dom/Window/postMessage-clone-port-error.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][Soup] Use didReceiveBuffer instead of didReceiveData
https://bugs.webkit.org/show_bug.cgi?id=118598

Reviewed by Gustavo Noronha Silva.

Original patch by Kwang Yul Seo  <skyul@company100.net> and Csaba OsztrogonÃ¡c  <ossy@webkit.org>.

Switch from using didReceiveData to didReceiveBuffer for the Soup backend and
let SharedBuffer wrap a SoupBuffer. This is necessary because the NetworkProcess
only supports getting data via SharedBuffer.

Source/WebCore:

* GNUmakefile.list.am: Add the new SharedBufferSoup.cpp file to the list.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformNix.cmake:
* platform/SharedBuffer.cpp: We no longer used the no-op version of the platformFoo methods.
* platform/SharedBuffer.h: Ditto.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:  Use didReceiveBuffer instead of didReceiveData.
* platform/network/ResourceHandleInternal.h: Have only a m_soupBuffer member instead of three to manage the buffer.
* platform/network/soup/GOwnPtrSoup.cpp: Add support for SoupBuffer.
* platform/network/soup/GOwnPtrSoup.h: Ditto.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::WebCoreSynchronousLoader::didReceiveData): ASSERT_NOT_REACHED here, since it should never be
called now.
(WebCore::WebCoreSynchronousLoader::didReceiveBuffer): Handle this call properly.
(WebCore::ResourceHandle::ensureReadBuffer): Now we package up our buffer into a SoupBuffer.
(WebCore::redirectSkipCallback): Use the new m_soupBuffer member.
(WebCore::cleanupSoupRequestOperation): Ditto.
(WebCore::nextMultipartResponsePartCallback): Ditto.
(WebCore::sendRequestCallback): Ditto.
(WebCore::readCallback):
* platform/soup/SharedBufferSoup.cpp: Added.

Source/WebKit/gtk:

* webkit/webkitdownload.cpp:
(DownloadClient::didReceiveData): Replace with ASSERT_NOT_REACHED.
(DownloadClient::didReceiveBuffer): Use this to process incoming data.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: WebKit ignores @alt on IMG elements with role="text"
https://bugs.webkit.org/show_bug.cgi?id=125363

Reviewed by Mario Sanchez Prada.

Source/WebCore:

If an <img> element has a different role, the alt attribute should still be used in the
name calculation if present.

Test: accessibility/alt-tag-on-image-with-nonimage-role.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::usesAltTagForTextComputation):
(WebCore::AccessibilityNodeObject::alternativeText):
(WebCore::AccessibilityNodeObject::accessibilityDescription):
(WebCore::AccessibilityNodeObject::text):
* accessibility/AccessibilityNodeObject.h:

LayoutTests:

* accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Added.
* accessibility/alt-tag-on-image-with-nonimage-role.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] Memory leak due to incorrect use of gst_tag_list_merge in TextCombinerGStreamer
https://bugs.webkit.org/show_bug.cgi?id=125452

Patch by Brendan Long <b.long@cablelabs.com> on 2013-12-09
Reviewed by Philippe Normand.

No new tests because this fixes a memory leak.

* platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
(webkitTextCombinerPadEvent): Use gst_tag_list_insert instead of gst_tag_list_merge, since we don't want to create a new list.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening

Add failure test expectations and rebaselines for failing tests.

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:
* platform/efl-wk1/fast/forms/validation-message-appearance-expected.png: Rebaseline after r159915.
* platform/efl-wk2/fast/forms/validation-message-appearance-expected.png: Ditto.
* platform/efl/fast/forms/validation-message-appearance-expected.txt: Ditto.
* platform/efl/fast/parser/entity-comment-in-textarea-expected.png: Rebaseline after r159192.
* platform/efl/fast/parser/entity-comment-in-textarea-expected.txt: Ditto.

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