WebKit-https.git
5 years ago[UNIX] Simplify the file descriptor handling in SharedMemory
carlosgc@webkit.org [Thu, 23 Apr 2015 07:28:48 +0000 (07:28 +0000)]
[UNIX] Simplify the file descriptor handling in SharedMemory
https://bugs.webkit.org/show_bug.cgi?id=144046

Reviewed by Darin Adler.

Simplify the file descriptor handling and clarify its ownership by
using IPC::Attachment in SharedMemory::Handle instead of fd and
size members. SharedMemory::Handle::adoptFromAttachment() has been
renamed as SharedMemory::Handle::adoptAttachment() and receives an
IPC::Attachment. And SharedMemory::Handle::releaseToAttachment()
has been renamed as SharedMemory::Handle::releaseAttachment().

* Platform/IPC/Attachment.h: Add move constructor and move assigned operator.
* Platform/IPC/Connection.h:
(IPC::Connection::identifierIsNull): A file descriptor is null
when it's -1 no 0.
* Platform/IPC/unix/AttachmentUnix.cpp:
(IPC::Attachment::Attachment):
(IPC::Attachment::operator=):
(IPC::Attachment::dispose): Reset the file descriptor after
closing it.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::processMessage): Use
SharedMemory::Handle::adoptAttachment() that receives an
IPC::Attachment now.
(IPC::Connection::sendOutgoingMessage): Use
SharedMemory::Handle::releaseAttachment().
* Platform/SharedMemory.h:
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::Handle::Handle): Remove initializers for
file descriptor and size members.
(WebKit::SharedMemory::Handle::clear): Dispose the attachment.
(WebKit::SharedMemory::Handle::isNull): Handle is null if the
attachment file descriptor is -1.
(WebKit::SharedMemory::Handle::encode): Use releaseAttachment().
(WebKit::SharedMemory::Handle::decode): Use adoptAttachment().
(WebKit::SharedMemory::Handle::releaseAttachment): Implement it
using move.
(WebKit::SharedMemory::Handle::adoptAttachment): Ditto.
(WebKit::SharedMemory::map): Use
IPC::Attachment::releaseFileDescriptor() instead of manually
changing the member.
(WebKit::SharedMemory::createHandle): Initialize the handle
attachment with the duplicated file descriptor and size.

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

5 years agoUse a typedef for TileGrid tile validation policy flags
simon.fraser@apple.com [Thu, 23 Apr 2015 07:24:57 +0000 (07:24 +0000)]
Use a typedef for TileGrid tile validation policy flags
https://bugs.webkit.org/show_bug.cgi?id=144085

Reviewed by Tim Horton.

Replace 'unsigned' with a typedef for the bitmask of TileValidationPolicyFlags.

* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::tileRevalidationTimerFired):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::revalidateTiles):
* platform/graphics/ca/TileGrid.h:

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

5 years agoSlap Node's reference counting functions with ALWAYS_INLINE stick.
akling@apple.com [Thu, 23 Apr 2015 07:21:35 +0000 (07:21 +0000)]
Slap Node's reference counting functions with ALWAYS_INLINE stick.

Speculative fix for weird ~3% regression on Speedometer seen after TreeShared
was merged into Node. Since the memory layout didn't change, failure to inline
seems like a possible source of regression.

* dom/Node.h:
(WebCore::Node::ref):
(WebCore::Node::deref):
(WebCore::Node::hasOneRef):
(WebCore::Node::refCount):

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

5 years ago[iOS] Move computeCoverageRect code from FrameView into TileController
simon.fraser@apple.com [Thu, 23 Apr 2015 06:03:22 +0000 (06:03 +0000)]
[iOS] Move computeCoverageRect code from FrameView into TileController
https://bugs.webkit.org/show_bug.cgi?id=144087

Reviewed by Benjamin Poulain.

There is code in four different places that adjusts tiling coverage rect:
1. LegacyTileCache. This will remain unchanged.
2. FrameView::computeTileCoverageRect(). This was added to do velocity-based
page tiled coverage expansion for iOS WK2.
3. TileController::computeTileCoverageRect(): this is used for the page tiles
on Mac.
4. GraphicsLayerCA::adjustTiledLayerVisibleRect(). This is used by non-page
tiled layers on both iOS and Mac.

This patch reduced this list to 3, coalescing FrameView::computeTileCoverageRect()
and TileController::computeTileCoverageRect(). It removes the rect inflation that
affects the visibleRect passed into rootLayer->flushCompositingState() for iOS,
but the page tiles now do an identical coverage inflation. The visible rect
change does affect visible rect computations for non-page tiled backings, but
a future patch will restore that.

* page/FrameView.cpp:
(WebCore::FrameView::setScrollVelocity):
(WebCore::FrameView::computeCoverageRect): Deleted.
* page/FrameView.h:
* platform/graphics/TiledBacking.h:
(WebCore::VelocityData::VelocityData):
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setVelocity):
(WebCore::TileController::computeTileCoverageRect):
* platform/graphics/ca/TileController.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):

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

5 years agoRemove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
darin@apple.com [Thu, 23 Apr 2015 06:02:14 +0000 (06:02 +0000)]
Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
https://bugs.webkit.org/show_bug.cgi?id=143943

Reviewed by Anders Carlsson.

Source/WebCore:

* editing/Editor.cpp:
(WebCore::Editor::insertDictationPhrases): Changed this iOS-only
function to take a Vector<Vector<String>>&& and not involve PassOwnPtr.
(WebCore::Editor::setDictationPhrasesAsChildOfElement): Changed this iOS-only
function to take a Vector<Vector<String>> and not involve PassOwnPtr. Also made
it take a reference rather than a pointer to the element and simplify the code
a bit using modern for loops and auto.
* editing/Editor.h: Ditto.

* editing/ios/DictationCommandIOS.cpp:
(WebCore::DictationCommandIOS::DictationCommandIOS): Take
a Vector<Vector<String>>&& instead of a PassOwnPtr.
(WebCore::DictationCommandIOS::~DictationCommandIOS): Deleted. No need to
explicitly define this.
(WebCore::DictationCommandIOS::doApply): Updated to use modern for loop and
work with a Vector<Vector<String>> instead of an OwnPtr.
* editing/ios/DictationCommandIOS.h: Updated to not use PassOwnPtr and OwnPtr.
Also modernized a bit by using override.

* platform/network/ios/QuickLook.h: Return an NSURLRequest * instead of a
PassOwnPtr<ResourceRequest> from this iOS-specific function.
* platform/network/ios/QuickLook.mm:
(WebCore::registerQLPreviewConverterIfNeeded): Ditto.

Source/WebKit/cf:

* WebCoreSupport/WebInspectorClientCF.cpp: Removed unneeded include.

Source/WebKit/mac:

* Plugins/Hosted/ProxyInstance.h: Removed unneeded include.
* Plugins/WebBaseNetscapePluginView.h: Ditto.

* Plugins/WebNetscapePluginEventHandler.h: Use unique_ptr instead of
PassOwnPtr for the create function. Also tweaked formatting and removed
unneeded forward declaration of CGRect.
* Plugins/WebNetscapePluginEventHandler.mm:
(WebNetscapePluginEventHandler::create): Changed to use unique_ptr and
make_unique.

* Plugins/WebNetscapePluginView.h: Use unique_ptr instead of OwnPtr for
the _eventHandler field.
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView destroyPlugin]): Changed code to work with unique_ptr.

* WebCoreSupport/WebUserMediaClient.mm: Removed unneeded include.

* WebView/WebDeviceOrientationProviderMock.mm: Changed to use make_unique.
* WebView/WebDeviceOrientationProviderMockInternal.h: Changed to use unique_ptr.

* WebView/WebFrame.mm:
(vectorForDictationPhrasesArray): Changed to return Vector<Vector<String>> and
not a PassOwnPtr. Also rewrote to be much simpler, although there is still a
pre-existing problem here where this could put empty vectors into the result,
and I'm pretty sure the client never expects any of the Vector<String> to be empty.
(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
Rewrote logic to involve WebCore types a bit less; old code was round tripping
things through WebCore::URL for no obvious reason.

* WebView/WebFrameInternal.h: Changed vectorForDictationPhrasesArray to return
a Vector<Vector<String>> and not a PassOwnPtr.

* WebView/WebFullScreenController.h: Removed unneeded include.

* WebView/WebViewData.h: Changed m_alternativeTextUIController to be a
m_alternativeTextUIController.
* WebView/WebViewData.mm:
(-[WebViewPrivate init]): Use make_unique to initialize m_alternativeTextUIController.

Source/WebKit2:

* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
Removed unneeded include.

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

5 years agoConvert OwnPtr to std::unique_ptr in GraphicsContextCairo.cpp
jinwoo7.song@samsung.com [Thu, 23 Apr 2015 05:26:29 +0000 (05:26 +0000)]
Convert OwnPtr to std::unique_ptr in GraphicsContextCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=144033

Reviewed by Darin Adler.

Use unique_ptr for creating a copy of cairo_path_t and use lambda function
for custom deleter, cairo_path_destroy().

* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::drawPathShadow): Use std::unique_ptr instead of OwnPtr.
(WebCore::GraphicsContext::clip): Call cairo_path_destroy() immediately.
* platform/graphics/cairo/OwnPtrCairo.cpp:
(WTF::deleteOwnedPtr<cairo_path_t>): Deleted. Remove unnecessary deleter anymore.
* platform/graphics/cairo/OwnPtrCairo.h: Ditto.

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

5 years agoEliminate remaining uses of OwnPtr and PassOwnPtr in WebCore outside the editing...
darin@apple.com [Thu, 23 Apr 2015 05:20:23 +0000 (05:20 +0000)]
Eliminate remaining uses of OwnPtr and PassOwnPtr in WebCore outside the editing and platform directories
https://bugs.webkit.org/show_bug.cgi?id=143949

Reviewed by Andreas Kling.

Source/WebCore:

* dom/ContainerNode.h: Removed unneeded includes and forward declarations.
* dom/Document.h: Ditto.

* dom/DocumentParser.h: Fixed comment to not mention PassOwnPtr.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::create): Return a Ref instead of a PassRefPtr.
(WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation): Pass a reference
rather than a pointer to TextTrackRepresentation::create.
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): Return a
RefPtr instead of a PassRefPtr.

* html/shadow/MediaControlElements.h: Use unique_ptr for m_textTrackRepresentation.
Also fix a couple uses of PassRefPtr.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::DocumentLoader): Use make_unique.
(WebCore::DocumentLoader::addAllArchiveResources): Ditto.
(WebCore::DocumentLoader::addArchiveResource): Ditto.
(WebCore::DocumentLoader::clearArchiveResources): Set to nullptr instead of calling clear.
(WebCore::DocumentLoader::startLoadingMainResource): Use make_unique.
* loader/DocumentLoader.h: Made m_archiveResourceCollection and
m_applicationCacheHost use unique_ptr.

* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData): Use delete here instead
of using OwnPtr to do the deletion. Matches the other code nearby.

* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Handle case where the host is
null; this happens during the DocumentLoader destruction process since unique_ptr sets itself
to null before it destroys the object it points to and OwnPtr does not.

* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation): Use delete instead of adoptPtr
to delete a raw pointer.
(WebCore::DiskCacheMonitor::DiskCacheMonitor): Use unique_ptr instead of OwnPtr.

* page/DragController.h: Removed some unneeded forward declarations and changed the
create function to return unique_ptr.

* platform/LayoutUnit.h: Removed wtf_ceil workaround hack here. Not sure why we ever did it
this way!

* platform/graphics/FontCascade.cpp:
(WTF::deleteOwnedPtr<WebCore::TextLayout>): Deleted.
(WebCore::FontCascade::createLayout): Changed to return a unique_ptr.
(WebCore::FontCascade::deleteLayout): Deleted.
* platform/graphics/FontCascade.h: Made the above changes.

* platform/graphics/ImageBuffer.h: Changed copyImage to return a RefPtr instead of a PassRefPtr.

* platform/graphics/TextTrackRepresentation.cpp:
(WebCore::TextTrackRepresentation::create): Use make_unique and return a unique_ptr.
* platform/graphics/TextTrackRepresentation.h: Removed unneeded includes and forward declarations
and made create return a unique_ptr.
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::copyImage): Changed to return a RefPtr.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::copyImage): Changed to return a RefPtr.

* platform/graphics/ios/TextTrackRepresentationIOS.h: Use reference instead of pointer,
made more things private.
* platform/graphics/ios/TextTrackRepresentationIOS.mm:
(TextTrackRepresentation::create): Use make_unique.
(TextTrackRepresentationIOS::TextTrackRepresentationIOS): Take a reference.

* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::FontCascade::createLayout): Return a unique_ptr with a custom destruction function.
The custom destruction function eliminates the need to put TextLayout in a visible header.
(WebCore::FontCascade::deleteLayout): Deleted. Use a lambda instead.
(WebCore::roundCGFloat): Deleted. Old fashioned way to deal with multiple floating point sizes.
Just use std::round instead.
(WebCore::ceilCGFloat): Deleted. Same as above. Just use std::ceil instead.
(WebCore::ComplexTextController::adjustGlyphsAndAdvances): Use std::round and std::ceil.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderTextInfo::RenderTextInfo): Deleted. Can compile constructor and destructor
now thanks to use of unique_ptr with a custom deleter.
(WebCore::RenderTextInfo::~RenderTextInfo): Deleted. Ditto.
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): Updated for RenderTextInfo data member
name change.

* rendering/RenderView.h: Removed unneeded include.

* rendering/line/BreakingContext.h: Removed unneeded include.
(WebCore::BreakingContext::handleOutOfFlowPositioned): Updated for RenderTextInfo data member
name change.
(WebCore::BreakingContext::handleFloat): Ditto.
(WebCore::BreakingContext::handleReplaced): Ditto.
(WebCore::BreakingContext::handleText): Ditto.
(WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Ditto.

* rendering/line/LineBreaker.h: Made the RenderTextInfo struct more like a struct by taking
off all the m_ prefixes from the data member names. Initialized all the values in the struct
to defaults so we don't need an explicit constructor. We also don't need an explicit destructor
any more due to use of a unique_ptr with a deleter.

Source/WTF:

* wtf/MathExtras.h:
(wtf_ceil): Deleted. This was a workaround for a bug that was introduced in Leopard and
fixed in Snow Leopard <rdar://problem/6286405>, so we don't need the workaround any more.

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

5 years agoVolume slider appears/doesn't appear at the wrong times.
roger_fong@apple.com [Thu, 23 Apr 2015 04:38:11 +0000 (04:38 +0000)]
Volume slider appears/doesn't appear at the wrong times.
https://bugs.webkit.org/show_bug.cgi?id=144072.
<rdar://problem/20576145>

Reviewed by Dean Jackson.

Set background divs to match volume box dimensions.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-volume-slider-container-background):
(audio::-webkit-media-controls-volume-slider-container-tint):

Draw the volume slider immediately on mousing over the mute box.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls):
(Controller.prototype.handleMuteBoxOver):

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

5 years ago[Mac][MediaSource] Crash when SourceBuffer::provideMediaData() is called re-entrantly.
jer.noble@apple.com [Thu, 23 Apr 2015 04:31:45 +0000 (04:31 +0000)]
[Mac][MediaSource] Crash when SourceBuffer::provideMediaData() is called re-entrantly.
https://bugs.webkit.org/show_bug.cgi?id=144023

Reviewed by Darin Adler.

Partially revert r183097 (as it was not sufficient to protect against re-entrancy). Instead,
protect against re-entrancy in provideMediaData() directly by removing the first sample
from the TrackBuffer's decodeQueue at a time. If provideMediaData() is called re-entrantly,
or if any other method which modifies the decodeQueue is called from inside
provideMediaData, no iterators will be invalidated.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::provideMediaData):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):

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

5 years agoUnreviewed, fix debug build.
fpizlo@apple.com [Thu, 23 Apr 2015 02:40:24 +0000 (02:40 +0000)]
Unreviewed, fix debug build.

* dfg/DFGGraph.h:
(JSC::DFG::Graph::performSubstitutionForEdge):

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

5 years agoNodes should have an optional epoch field
fpizlo@apple.com [Thu, 23 Apr 2015 02:36:08 +0000 (02:36 +0000)]
Nodes should have an optional epoch field
https://bugs.webkit.org/show_bug.cgi?id=144084

Reviewed by Ryosuke Niwa and Mark Lam.

This makes it easier to do epoch-based analyses on nodes. I plan to do just that in
https://bugs.webkit.org/show_bug.cgi?id=143735. Currently the epoch field is not yet
used.

* dfg/DFGCPSRethreadingPhase.cpp:
(JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocalFor):
* dfg/DFGCSEPhase.cpp:
* dfg/DFGEpoch.h:
(JSC::DFG::Epoch::fromUnsigned):
(JSC::DFG::Epoch::toUnsigned):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::clearReplacements):
(JSC::DFG::Graph::clearEpochs):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::performSubstitutionForEdge):
* dfg/DFGNode.h:
(JSC::DFG::Node::Node):
(JSC::DFG::Node::replaceWith):
(JSC::DFG::Node::replacement):
(JSC::DFG::Node::setReplacement):
(JSC::DFG::Node::epoch):
(JSC::DFG::Node::setEpoch):
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):

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

5 years agoFix assertion failure and race condition in Options::dumpSourceAtDFGTime().
mark.lam@apple.com [Thu, 23 Apr 2015 02:29:14 +0000 (02:29 +0000)]
Fix assertion failure and race condition in Options::dumpSourceAtDFGTime().
https://bugs.webkit.org/show_bug.cgi?id=143898

Reviewed by Filip Pizlo.

CodeBlock::dumpSource() will access SourceCode strings in a way that requires
ref'ing of the underlying StringImpls. This is unsafe to do from arbitrary
compilation threads because StringImpls are not thread safe. As a result, we get
an assertion failure when we run with JSC_dumpSourceAtDFGTime=true on a debug
build.

This patch fixes the issue by only collecting the CodeBlock (and associated info)
into a DeferredSourceDump record while compiling, and stashing it away in a
deferredSourceDump list in the DeferredCompilationCallback object to be dumped
later.

When compilation is done, the callback object will be notified that
compilationDidComplete().  We will dump the SourceCode strings from there.
Since compilationDidComplete() is guaranteed to only be called on the thread
doing JS execution, it is safe to access the SourceCode strings there and ref
their underlying StringImpls as needed.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/DeferredCompilationCallback.cpp:
(JSC::DeferredCompilationCallback::compilationDidComplete):
(JSC::DeferredCompilationCallback::sourceDumpInfo):
(JSC::DeferredCompilationCallback::dumpCompiledSources):
* bytecode/DeferredCompilationCallback.h:
* bytecode/DeferredSourceDump.cpp: Added.
(JSC::DeferredSourceDump::DeferredSourceDump):
(JSC::DeferredSourceDump::dump):
* bytecode/DeferredSourceDump.h: Added.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseCodeBlock):
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):

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

5 years agoCreate RenderRubyText for <rt> only when the parent renderer is a RenderRuby.
zalan@apple.com [Thu, 23 Apr 2015 02:16:52 +0000 (02:16 +0000)]
Create RenderRubyText for <rt> only when the parent renderer is a RenderRuby.
https://bugs.webkit.org/show_bug.cgi?id=144035
rdar://problem/20604467

Reviewed by Darin Adler.

This patch extends HTMLElement::createElementRenderer()
with the render tree insertion point so that we can create different type
of renderers based on the render tree context.

Source/WebCore:

Test: fast/ruby/ruby-rt-with-region-crash.html

* CMakeLists.txt:
* Modules/plugins/PluginReplacement.h:
* Modules/plugins/QuickTimePluginReplacement.h:
* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::QuickTimePluginReplacement::createElementRenderer):
* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::YouTubePluginReplacement::createElementRenderer):
* Modules/plugins/YouTubePluginReplacement.h:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/Element.cpp:
(WebCore::Element::createElementRenderer):
* dom/Element.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::createElementRenderer):
* html/HTMLAppletElement.h:
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::createElementRenderer):
* html/HTMLAttachmentElement.h:
* html/HTMLBRElement.cpp:
(WebCore::HTMLBRElement::createElementRenderer):
* html/HTMLBRElement.h:
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::createElementRenderer):
* html/HTMLButtonElement.h:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createElementRenderer):
* html/HTMLCanvasElement.h:
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::createElementRenderer):
* html/HTMLDetailsElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createElementRenderer):
* html/HTMLElement.h:
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::createElementRenderer):
* html/HTMLFieldSetElement.h:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::createElementRenderer):
* html/HTMLFrameElement.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::createElementRenderer):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::createElementRenderer):
* html/HTMLIFrameElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::createElementRenderer):
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::createElementRenderer):
* html/HTMLInputElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::createElementRenderer):
* html/HTMLMeterElement.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::createElementRenderer):
* html/HTMLPlugInElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::createElementRenderer):
* html/HTMLPlugInImageElement.h:
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::createElementRenderer):
* html/HTMLProgressElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::createElementRenderer):
* html/HTMLSelectElement.h:
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::createElementRenderer):
* html/HTMLSummaryElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::createElementRenderer):
* html/HTMLTextAreaElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::createElementRenderer):
* html/HTMLVideoElement.h:
* html/HTMLWBRElement.cpp:
(WebCore::HTMLWBRElement::createElementRenderer):
* html/HTMLWBRElement.h:
* html/RubyElement.cpp:
(WebCore::RubyElement::createElementRenderer):
* html/RubyElement.h:
* html/RubyTextElement.cpp:
(WebCore::RubyTextElement::createElementRenderer):
* html/RubyTextElement.h:
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::createElementRenderer):
* html/shadow/DetailsMarkerControl.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineContainerElement::createElementRenderer):
(WebCore::MediaControlVolumeSliderContainerElement::createElementRenderer):
(WebCore::MediaControlTextTrackContainerElement::createElementRenderer):
* html/shadow/MediaControlElements.h:
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterInnerElement::createElementRenderer):
* html/shadow/MeterShadowElement.h:
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressInnerElement::createElementRenderer):
* html/shadow/ProgressShadowElement.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::createElementRenderer):
(WebCore::SliderContainerElement::createElementRenderer):
* html/shadow/SliderThumbElement.h:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerContainer::createElementRenderer):
(WebCore::TextControlInnerTextElement::createElementRenderer):
* html/shadow/TextControlInnerElements.h:
* html/shadow/mac/ImageControlsButtonElementMac.cpp:
(WebCore::ImageControlsButtonElementMac::createElementRenderer):
* html/shadow/mac/ImageControlsButtonElementMac.h:
* html/shadow/mac/ImageControlsRootElementMac.cpp:
(WebCore::ImageControlsRootElementMac::createElementRenderer):
* html/shadow/mac/ImageControlsRootElementMac.h:
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::createElementRenderer):
* html/track/VTTCue.h:
* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::createElementRenderer):
* mathml/MathMLInlineContainerElement.h:
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::createElementRenderer):
* mathml/MathMLMathElement.h:
* mathml/MathMLMencloseElement.cpp:
(WebCore::MathMLMencloseElement::createElementRenderer):
* mathml/MathMLMencloseElement.h:
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::createElementRenderer):
* mathml/MathMLSelectElement.h:
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::createElementRenderer):
* mathml/MathMLTextElement.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::clone):
* rendering/RenderElement.cpp:
* rendering/RenderRuby.h:
(WebCore::isRuby):
* style/RenderTreePosition.cpp: Added.
(WebCore::RenderTreePosition::computeNextSibling):
(WebCore::RenderTreePosition::invalidateNextSibling):
(WebCore::RenderTreePosition::previousSiblingRenderer):
(WebCore::RenderTreePosition::nextSiblingRenderer):
(WebCore::RenderTreePosition::isRendererReparented):
* style/RenderTreePosition.h: Added.
(WebCore::RenderTreePosition::RenderTreePosition):
(WebCore::RenderTreePosition::parent):
(WebCore::RenderTreePosition::canInsert):
(WebCore::RenderTreePosition::insert):
* style/StyleResolveTree.cpp:
(WebCore::Style::createRendererIfNeeded):
(WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
(WebCore::Style::textRendererIsNeeded):
(WebCore::Style::RenderTreePosition::parent): Deleted.
(WebCore::Style::isRendererReparented): Deleted.
(WebCore::Style::nextSiblingRenderer): Deleted.
(WebCore::Style::RenderTreePosition::RenderTreePosition): Deleted.
(WebCore::Style::RenderTreePosition::canInsert): Deleted.
(WebCore::Style::RenderTreePosition::insert): Deleted.
(WebCore::Style::RenderTreePosition::computeNextSibling): Deleted.
(WebCore::Style::RenderTreePosition::invalidateNextSibling): Deleted.
(WebCore::Style::previousSiblingRenderer): Deleted.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::createElementRenderer):
* svg/SVGAElement.h:
* svg/SVGAltGlyphElement.cpp:
(WebCore::SVGAltGlyphElement::createElementRenderer):
* svg/SVGAltGlyphElement.h:
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::createElementRenderer):
* svg/SVGCircleElement.h:
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::createElementRenderer):
* svg/SVGClipPathElement.h:
* svg/SVGDefsElement.cpp:
(WebCore::SVGDefsElement::createElementRenderer):
* svg/SVGDefsElement.h:
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::createElementRenderer):
* svg/SVGEllipseElement.h:
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::createElementRenderer):
* svg/SVGFilterElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::createElementRenderer):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::createElementRenderer):
* svg/SVGForeignObjectElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::createElementRenderer):
* svg/SVGGElement.h:
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::createElementRenderer):
* svg/SVGGraphicsElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::createElementRenderer):
* svg/SVGImageElement.h:
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::createElementRenderer):
* svg/SVGLinearGradientElement.h:
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::createElementRenderer):
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::createElementRenderer):
* svg/SVGMaskElement.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::createElementRenderer):
* svg/SVGPathElement.h:
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::createElementRenderer):
* svg/SVGPatternElement.h:
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::createElementRenderer):
* svg/SVGRadialGradientElement.h:
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::createElementRenderer):
* svg/SVGRectElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::createElementRenderer):
* svg/SVGSVGElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::createElementRenderer):
* svg/SVGStopElement.h:
* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::createElementRenderer):
* svg/SVGSwitchElement.h:
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::createElementRenderer):
* svg/SVGSymbolElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::createElementRenderer):
* svg/SVGTRefElement.h:
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::createElementRenderer):
* svg/SVGTSpanElement.h:
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::createElementRenderer):
* svg/SVGTextElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::createElementRenderer):
* svg/SVGTextPathElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::createElementRenderer):
* svg/SVGUseElement.h:

LayoutTests:

* fast/ruby/ruby-rt-with-region-crash-expected.txt: Added.
* fast/ruby/ruby-rt-with-region-crash.html: Added.

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

5 years ago[CMake] Clean up JSC JIT options
mcatanzaro@igalia.com [Thu, 23 Apr 2015 02:15:02 +0000 (02:15 +0000)]
[CMake] Clean up JSC JIT options
https://bugs.webkit.org/show_bug.cgi?id=143998

Reviewed by Filip Pizlo.

.:

* Source/cmake/OptionsEfl.cmake: Remove handling of ENABLE_LLINT_C_LOOP and preprocessor
  define for ENABLE_FTL_NATIVE_CALL_INLINING.
* Source/cmake/OptionsMac.cmake: Remove override of ENABLE_LLINT_C_LOOP
* Source/cmake/WebKitFeatures.cmake: Remove ENABLE_LLINT_C_LOOP. Add ENABLE_DFG_JIT and
  ENABLE_FTL_NATIVE_CALL_INLINING. Specify proper dependencies for these features.
* Source/cmakeconfig.h.cmake: Remove ENABLE_LLINT_C_LOOP and add ENABLE_DFG_JIT.

Tools:

* Scripts/build-jsc: Do not use -ENABLE_LLINT_C_LOOP on CMake ports.
* Scripts/webkitperl/FeatureList.pm: Remove ENABLE_LLINT_C_LOOP.

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

5 years agoVisibleSelection should only accept Range by reference
bfulgham@apple.com [Thu, 23 Apr 2015 02:14:45 +0000 (02:14 +0000)]
VisibleSelection should only accept Range by reference
https://bugs.webkit.org/show_bug.cgi?id=144047

Reviewed by Tim Horton.

Source/WebCore:

Update VisibleSelection to expect a Range reference argument, rather than a
Range*. Also update all uses of VisibleSelection to pass a reference instead
of a pointer.

No change in behavior, so new tests.

* editing/Editor.cpp:
(WebCore::Editor::selectionForCommand):
(WebCore::Editor::advanceToNextMisspelling):
(WebCore::Editor::markMisspellingsAfterTypingToWord):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::transpose):
(WebCore::Editor::findString):
(WebCore::Editor::rangeOfString):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelectedRange):
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::VisibleSelection):
* editing/VisibleSelection.h:
* editing/mac/EditorMac.mm:
(WebCore::Editor::replaceNodeFromPasteboard):
* page/DragController.cpp:
(WebCore::selectElement):
* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithRange):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):
* rendering/SelectionSubtreeRoot.cpp:
(WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):

Source/WebKit/mac:

Update all uses of VisibleSelection to pass a Range reference instead
of a Range pointer.

* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::imageForCurrentSharingServicePickerItem):
* WebView/WebFrame.mm:
(-[WebFrame _selectNSRange:]):

Source/WebKit2:

Update all uses of VisibleSelection to pass a Range reference instead
of a Range pointer.

* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::renderedImage):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::getImageForFindMatch):
(WebKit::FindController::selectFindMatch):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::insertTextAsync):
(WebKit::WebPage::setCompositionAsync):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::insertDictatedTextAsync):

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

5 years agoAudio controls should render with a black background.
roger_fong@apple.com [Thu, 23 Apr 2015 02:12:44 +0000 (02:12 +0000)]
Audio controls should render with a black background.
https://bugs.webkit.org/show_bug.cgi?id=144074.
<rdar://problem/20596939>

Reviewed by Darin Adler.

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel-background-container):
(audio::-webkit-media-controls-panel .volume-box):

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

5 years agoInline media control icons scale down when video is too small.
roger_fong@apple.com [Thu, 23 Apr 2015 02:11:34 +0000 (02:11 +0000)]
Inline media control icons scale down when video is too small.
https://bugs.webkit.org/show_bug.cgi?id=144073.
<rdar://problem/20659451>

Reviewed by Darin Adler.

Just make sure the buttons use min-width.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-rewind-button):
(audio::-webkit-media-controls-play-button):
(audio::-webkit-media-controls-panel .mute-box):
(video::-webkit-media-controls-volume-max-button):
(audio::-webkit-media-controls-wireless-playback-picker-button):
(audio::-webkit-media-controls-toggle-closed-captions-button):
(audio::-webkit-media-controls-fullscreen-button):

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

5 years agoAdd new optimized fullscreen delegate methods
jer.noble@apple.com [Wed, 22 Apr 2015 23:28:48 +0000 (23:28 +0000)]
Add new optimized fullscreen delegate methods
https://bugs.webkit.org/show_bug.cgi?id=144071

Reviewed by Eric Carlson.

AVPlayerViewController requires three new delegate methods to be implemented by WebKit which
notify the delegates exactly when the owning view will enter and leave fullscreen mode. One
of the delegate methods (-enterOptimizedFullScreenModeRedirectingVideoToLayer:) gives the
delegate an opportunity to move the video sublayer into a new CALayer. The matching delegate
(-leaveOptimizedFullScreenMode), allows us to return our sublayer back to its original parent.
The third delegate (-isOptimizedFullscreenPossible) is required so the AVPlayerViewController
knows whether to allow a standard -> optimized fullscreen transition.

Drive-by fix: initialize ivars at declaration time.

* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController isOptimizedFullscreenPossible]):
(-[WebAVVideoLayer enterOptimizedFullScreenModeRedirectingVideoToLayer:]):
(-[WebAVVideoLayer leaveOptimizedFullScreenMode]):
(WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit):
(WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal):
(+[WebAVPlayerController keyPathsForValuesAffectingPlayingOnExternalScreen]): Deleted.

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

5 years agoContext menu doesn't account for selection semantics
bfulgham@apple.com [Wed, 22 Apr 2015 23:23:14 +0000 (23:23 +0000)]
Context menu doesn't account for selection semantics

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

5 years ago[iOS] Caret does not line up with text when using the system font
mmaxfield@apple.com [Wed, 22 Apr 2015 23:22:50 +0000 (23:22 +0000)]
[iOS] Caret does not line up with text when using the system font
https://bugs.webkit.org/show_bug.cgi?id=144076
<rdar://problem/20578301>

Reviewed by Enrica Casucci.

Determining caret locations often uses the complex text codepath, which means
the complex text codepath must know about custom tracking.

This regression is due to r182512.

Note that this patch is a short-term solution until I can solve the bigger issue of
having two CTFontRefs and using each in their proper place.

No new tests because there is no way to robustly test the system font.

* platform/graphics/Font.h:
(WebCore::Font::hasCustomTracking):
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::canUseFastGlyphAdvanceGetter):
(WebCore::Font::platformWidthForGlyph):
(WebCore::hasCustomTracking): Deleted.
* platform/graphics/mac/SimpleFontDataCoreText.cpp:
(WebCore::Font::getCFStringAttributes):

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

5 years agoAdd WK_ARRAY and WK_SET annotations
andersca@apple.com [Wed, 22 Apr 2015 23:19:22 +0000 (23:19 +0000)]
Add WK_ARRAY and WK_SET annotations
https://bugs.webkit.org/show_bug.cgi?id=144075
rdar://problem/19417770

Reviewed by Dan Bernstein.

* Shared/API/Cocoa/WKFoundation.h:
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* mac/postprocess-framework-headers.sh:

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

5 years agoUnreviewed test fix after r183138.
bfulgham@apple.com [Wed, 22 Apr 2015 23:02:20 +0000 (23:02 +0000)]
Unreviewed test fix after r183138.

* editing/selection/context-menu-text-selection-lookup-expected.txt: The wrong
expectations were committed.

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

5 years agoUpdate results for two CSS tests affected by new fonts in OS X 10.10.3.
ap@apple.com [Wed, 22 Apr 2015 22:59:40 +0000 (22:59 +0000)]
Update results for two CSS tests affected by new fonts in OS X 10.10.3.

* platform/mac-mavericks/css2.1: Added.
* platform/mac-mavericks/css2.1/t1202-counter-04-b-expected.png: Copied from LayoutTests/platform/mac/css2.1/t1202-counter-04-b-expected.png.
* platform/mac-mavericks/css2.1/t1202-counter-04-b-expected.txt: Copied from LayoutTests/platform/mac/css2.1/t1202-counter-04-b-expected.txt.
* platform/mac-mavericks/css2.1/t1202-counters-04-b-expected.png: Copied from LayoutTests/platform/mac/css2.1/t1202-counters-04-b-expected.png.
* platform/mac-mavericks/css2.1/t1202-counters-04-b-expected.txt: Copied from LayoutTests/platform/mac/css2.1/t1202-counters-04-b-expected.txt.
* platform/mac/TestExpectations:
* platform/mac/css2.1/t1202-counter-04-b-expected.png:
* platform/mac/css2.1/t1202-counter-04-b-expected.txt:
* platform/mac/css2.1/t1202-counters-04-b-expected.png:
* platform/mac/css2.1/t1202-counters-04-b-expected.txt:

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

5 years agofast/text/emoji.html passes on OS X 10.10.3 and higher.
ap@apple.com [Wed, 22 Apr 2015 22:46:13 +0000 (22:46 +0000)]
fast/text/emoji.html passes on OS X 10.10.3 and higher.

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

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

5 years ago[Mac] Device picker menu is positioned incorrectly in WK1
eric.carlson@apple.com [Wed, 22 Apr 2015 22:43:41 +0000 (22:43 +0000)]
[Mac] Device picker menu is positioned incorrectly in WK1
https://bugs.webkit.org/show_bug.cgi?id=144049
<rdar://problem/20493101>

Reviewed by Dean Jackson.

* WebView/WebView.mm:
(-[WebView _showPlaybackTargetPicker:location:hasVideo:]): Mouse location is already in
    window coordinates so don't call convertRect:toView:nil.

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

5 years agoImplement String.codePointAt()
benjamin@webkit.org [Wed, 22 Apr 2015 22:25:27 +0000 (22:25 +0000)]
Implement String.codePointAt()
https://bugs.webkit.org/show_bug.cgi?id=143934

Reviewed by Darin Adler.

Source/JavaScriptCore:

This patch adds String.codePointAt() as defined by ES6.
I opted for a C++ implementation for now.

* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
(JSC::codePointAt):
(JSC::stringProtoFuncCodePointAt):

LayoutTests:

* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/string-code-point-at.js: Added.
(objectWithCustomToString.toString):
(objectThrowingOnToString.toString):
(objectCountingToString.toString):
(testLeadSurrogateOutOfBounds):
(testLeadSurrogateAsLastCharacter):
(testTrailSurrogateOutOfbounds):
(testAccessNullInString):
(testNormalCombinationOfSurrogates):
* js/string-code-point-at-expected.txt: Added.
* js/string-code-point-at.html: Added.

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

5 years agoUnreviewed build fix after r183136.
bfulgham@apple.com [Wed, 22 Apr 2015 22:17:49 +0000 (22:17 +0000)]
Unreviewed build fix after r183136.

* WebProcess/WebPage/mac/WebPageMac.mm: Correct capitalization of
'HTMLPluginImageElement.h' -> 'HTMLPlugInImageElement.h'

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

5 years agoContext menu doesn't account for selection semantics
bfulgham@apple.com [Wed, 22 Apr 2015 22:10:29 +0000 (22:10 +0000)]
Context menu doesn't account for selection semantics
https://bugs.webkit.org/show_bug.cgi?id=143958
<rdar://problem/19735706>

Reviewed by Tim Horton.

Source/WebCore:

Before using the default word-only selection for context menus, check with the
lookup service to see if we can get a semantically appropriate selection.

* editing/EditingBehavior.h:
(WebCore::EditingBehavior::shouldSelectBasedOnDictionaryLookup): Added, so that we can
behavior correctly when using non-Mac editing behavior.
* editing/mac/DictionaryLookup.mm:
(WebCore::rangeForDictionaryLookupAtHitTestResult): Modified to honor standard WebKit
behavior when hit testing at end-of-line/end-of-paragraph, etc.
* page/EventHandler.cpp:
(WebCore::EventHandler::shouldAppendTrailingWhitespace): New helper function to share code.
(WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup): Added.
(WebCore::EventHandler::selectClosestContextualWordFromMouseEvent): Added.
(WebCore::EventHandler::selectClosestContextualWordOrLinkFromMouseEvent): Renamed from selectClosestWordOrLinkFromMouseEvent.
Have this call the new 'selectClosestContextualWordFromMouseEvent' instead of the vanilla 'selectClosestWordFromMouseEvent'.
* page/EventHandler.h:
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup): Added.

LayoutTests:

* editing/selection/context-menu-text-selection-lookup-expected.txt: Added.
* editing/selection/context-menu-text-selection-lookup.html: Added.

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

5 years agoSource/WebCore:
bfulgham@apple.com [Wed, 22 Apr 2015 21:23:54 +0000 (21:23 +0000)]
Source/WebCore:
[Mac] Extend action menus to support PDF
https://bugs.webkit.org/show_bug.cgi?id=143895
<rdar://problem/19003333>

Reviewed by Tim Horton.

Tested by TestWebKitAPI ActionMenus.mm.

Add a new dictionary lookup method to support PDF Selections. This code replicates the
DOM Range-based logic used for HTML documents, but does so using the PDFKit API and
its support types.

* Configurations/Base.xcconfig: Add PDFKit include path for build.
* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::expandSelectionByCharacters): Helper function for PDF support.
(WebCore::dictionaryLookupForPDFSelection): Added.

Source/WebKit/mac:
Extend action menus to support PDF
https://bugs.webkit.org/show_bug.cgi?id=143895
<rdar://problem/19003333>

Reviewed by Tim Horton.

Prevent a crash when someone attempts to invoke an action menu on a PDF hosted
in a WK1 view.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController performHitTestAtPoint:]): Handle WebPDFView as well as
the WebHTMLView case.
* WebView/WebDocument.h:
* WebView/WebHTMLView.h:
* WebView/WebHTMLView.mm:
(-[WebHTMLView _frame]):
* WebView/WebHTMLViewInternal.h:
* WebView/WebPDFView.h:
* WebView/WebPDFView.mm:
(-[WebPDFView _frame]): Added.

Source/WebKit2:
Extend action menus to support PDF
https://bugs.webkit.org/show_bug.cgi?id=143895
<rdar://problem/19003333>

Reviewed by Tim Horton.

If the mouse pointer is over a PDF, try to provide a relevant action menu for whatever
content is under the mouse. For now, we only support copying text and handling URLs.

If no text is selected, use the dictionary lookup service to find a semantically appropriate
selection underneath the mouse. This is consistent with how normal text is treated in pure HTML
views. If some text is already selected, and the mouse is over the existing selection, continue
using the selected text. Otherwise, discard the old selection and select the most appropriate
region under the mouse pointer.

* Shared/API/c/WKActionMenuTypes.h: Add PDF menu option.
* Shared/WebMouseEvent.cpp: Recognize mouse force events as valid mouse events.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForPDF]): Add simply copy text option.
(-[WKActionMenuController _defaultMenuItems]): Recognize PDFs and add relevant action
menu entries.
* WebProcess/Plugins/Netscape/NetscapePlugin.h: Provide stub for new method.
* WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Expose 'rectsForSelectionInLayerSpace',
'rectsForAnnotationInLayoutSpace', 'layout', and 'currentPage'.
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::getSelectionForWordAtPoint): Added.
(WebKit::PDFPlugin::existingSelectionContainsPoint): Added.
(WebKit::PDFPlugin::lookupTextAtLocation): Added.
* WebProcess/Plugins/Plugin.h: Add declaration for new 'getSelectionForWordAtPoint' method.
* WebProcess/Plugins/PluginProxy.h: Provide stub for new method.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::getSelectionForWordAtPoint): Added.
(WebKit::PluginView::existingSelectionContainsPoint): Added.
(WebKit::PluginView::lookupTextAtLocation): Added.
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation): Update to support PDF documents and retrieve
relevant content to support later action menu handling.

Tools:
[Mac] Extend action menus to support PDF
https://bugs.webkit.org/show_bug.cgi?id=143895
<rdar://problem/19003333>

Reviewed by Tim Horton.

Reactivate the action menu tests, and add a new PDF-based test to make sure that selection
of PDF content works.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new 'test.pdf' resource to bundle.
* TestWebKitAPI/Tests/WebKit2/action-menu-targets.html: Update with a new PDF pane.
* TestWebKitAPI/Tests/WebKit2/test.pdf: Added.
* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm:
(-[ActionMenusTestWKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]):
Update to support PDF tests.
(TestWebKitAPI::windowPointForTarget): Add new target for PDF test.
(TestWebKitAPI::waitForPDFToLoad): New helper function to avoid starting test before the PDF is available.

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

5 years agoWeb Inspector: clicking Timelines tree view nodes should not change the current conte...
commit-queue@webkit.org [Wed, 22 Apr 2015 21:12:40 +0000 (21:12 +0000)]
Web Inspector: clicking Timelines tree view nodes should not change the current content view
https://bugs.webkit.org/show_bug.cgi?id=132202

Patch by Matt Baker <mattbaker@apple.com> on 2015-04-22
Reviewed by Brian Burg.

TimelineSidebarPanel now prevents timeline views from switching to another content view while the content
browser is showing the TimelineRecordingContentView. Code responsible for creating and updating the tree
element close button, which was duplicated in multiple derived TimelineView classes, has been moved to the
TimelineView base class.

* UserInterface/Views/LayoutTimelineView.js:
Updated name of location column, which was broken in a recent patch.
(WebInspector.LayoutTimelineView.prototype.treeElementDeselected):
(WebInspector.LayoutTimelineView.prototype.treeElementSelected):
Added overrides of new base class methods to handle view-specific highlight logic.
(WebInspector.LayoutTimelineView.prototype._treeElementDeselected): Deleted.
(WebInspector.LayoutTimelineView.prototype._treeElementSelected): Deleted.
(WebInspector.LayoutTimelineView.prototype._updateTreeElementWithCloseButton): Deleted.
(WebInspector.LayoutTimelineView.prototype._closeStatusButtonClicked): Deleted.
Removed tree element close button logic.

* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView.prototype.showContentViewForTreeElement):
(WebInspector.NetworkTimelineView.prototype.treeElementSelected):
Added overrides of new base class methods.
(WebInspector.NetworkTimelineView.prototype._treeElementDeselected): Deleted.
(WebInspector.NetworkTimelineView.prototype._treeElementSelected): Deleted.
Removed tree element close button logic.

* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView.prototype.showContentViewForTreeElement):
(WebInspector.RenderingFrameTimelineView.prototype.treeElementSelected):
Added overrides of new base class methods.

* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.get data):
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
Removed unused Name column and added "go to" button to the Domain column to show the selected resource.

* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
(WebInspector.ScriptTimelineView.prototype.showContentViewForTreeElement):
(WebInspector.ScriptTimelineView.prototype.treeElementSelected):
Added overrides of new base class methods.
(WebInspector.ScriptTimelineView.prototype._dataGridNodeSelected):
(WebInspector.ScriptTimelineView.prototype._treeElementDeselected): Deleted.
(WebInspector.ScriptTimelineView.prototype._treeElementSelected): Deleted.
(WebInspector.ScriptTimelineView.prototype._updateTreeElementWithCloseButton): Deleted.
(WebInspector.ScriptTimelineView.prototype._closeStatusButtonClicked): Deleted.
Removed tree element close button logic.

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.showTimelineViewForTimeline.this._timelineTreeElementMap.get select):
Prevent navigating to a different content view when showing the TimelineRecordingContentView.

* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype.showContentViewForTreeElement):
(WebInspector.TimelineView.prototype.treeElementDeselected):
(WebInspector.TimelineView.prototype.treeElementSelected):
Tree element selection handlers are now protected methods, which derived classes may override as needed.
(WebInspector.TimelineView.prototype.needsLayout):
(WebInspector.TimelineView.prototype._closeStatusButtonClicked):
(WebInspector.TimelineView.prototype._updateTreeElementWithCloseButton):
Encapsulated logic related to close button creation and behavior.

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

5 years agoExpect failure on windows for treeitem-child-exposed test.
jeremyj-wk@apple.com [Wed, 22 Apr 2015 21:01:18 +0000 (21:01 +0000)]
Expect failure on windows for treeitem-child-exposed test.
https://bugs.webkit.org/show_bug.cgi?id=144070

Unreviewed.

Mark accessibility/treeitem-child-exposed.html as failing on windows.

* platform/win/TestExpectations:

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

5 years agoMove render ruby initialization logic from RenderElement::createFor() to *::createEle...
zalan@apple.com [Wed, 22 Apr 2015 20:52:47 +0000 (20:52 +0000)]
Move render ruby initialization logic from RenderElement::createFor() to *::createElementRenderer()
https://bugs.webkit.org/show_bug.cgi?id=144058

Reviewed by Darin Adler.

No change in functionality.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLTagNames.in:
* html/RubyElement.cpp: Added.
(WebCore::RubyElement::RubyElement):
(WebCore::RubyElement::create):
(WebCore::RubyElement::createElementRenderer):
* html/RubyElement.h: Added.
* html/RubyTextElement.cpp: Added.
(WebCore::RubyTextElement::RubyTextElement):
(WebCore::RubyTextElement::create):
(WebCore::RubyTextElement::createElementRenderer):
* html/RubyTextElement.h: Added.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):

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

5 years agoSparseArrayEntry's write barrier owner should be the SparseArrayValueMap.
mark.lam@apple.com [Wed, 22 Apr 2015 20:44:32 +0000 (20:44 +0000)]
SparseArrayEntry's write barrier owner should be the SparseArrayValueMap.
https://bugs.webkit.org/show_bug.cgi?id=144067

Reviewed by Michael Saboff.

Currently, there are a few places where the JSObject that owns the
SparseArrayValueMap is designated as the owner of the SparseArrayEntry
write barrier.  This is a bug and can result in the GC collecting the
SparseArrayEntry even though it is being referenced by the
SparseArrayValueMap.  This patch fixes the bug.

* runtime/JSObject.cpp:
(JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists):
(JSC::JSObject::putIndexedDescriptor):
* tests/stress/sparse-array-entry-update-144067.js: Added.
(useMemoryToTriggerGCs):
(foo):

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

5 years agoShow correct wireless play placard on iOS.
roger_fong@apple.com [Wed, 22 Apr 2015 20:39:46 +0000 (20:39 +0000)]
Show correct wireless play placard on iOS.
<rdar://problem/20656596>

Copy wireless player placard code from r182631 to iOS.
* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-wireless-playback-status):
(audio::-webkit-media-controls-wireless-playback-text):
(audio::-webkit-media-controls-wireless-playback-text-top):
(audio::-webkit-media-controls-wireless-playback-text-bottom):
(audio::-webkit-media-controls-wireless-playback-status.small):
(audio::-webkit-media-controls-wireless-playback-text-top.small):
(audio::-webkit-media-controls-wireless-playback-text-bottom.small):
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.createControls):
(ControllerIOS.prototype.configureInlineControls):

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

5 years ago[Mac] In nightlies and local builds, WebKit services can get terminated under memory...
ap@apple.com [Wed, 22 Apr 2015 20:37:05 +0000 (20:37 +0000)]
[Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
https://bugs.webkit.org/show_bug.cgi?id=144052
rdar://problem/19754404

Build fix. Landing a forward declaration that should have been part of the original patch.

* wtf/spi/darwin/XPCSPI.h:

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

5 years agoGive the heap object iterators the ability to return early.
mark.lam@apple.com [Wed, 22 Apr 2015 20:05:06 +0000 (20:05 +0000)]
Give the heap object iterators the ability to return early.
https://bugs.webkit.org/show_bug.cgi?id=144011

Reviewed by Michael Saboff.

JSDollarVMPrototype::isValidCell() uses a heap object iterator to validate
candidate cell pointers, and, when in use, is called a lot more often than
the normal way those iterators are used.  As a result, I see my instrumented
VM killed with a SIGXCPU (CPU time limit exceeded).  This patch gives the
callback functor the ability to tell the iterators to return early when the
functor no longer needs to continue iterating.  With this, my instrumented
VM is useful again for debugging.

Since heap iteration is not something that we do in a typical fast path,
I don't expect this to have any noticeable impact on performance.

I also renamed ObjectAddressCheckFunctor to CellAddressCheckFunctor since
it checks JSCell addresses, not just JSObjects.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* debugger/Debugger.cpp:
* heap/GCLogging.cpp:
(JSC::LoggingFunctor::operator()):
* heap/Heap.cpp:
(JSC::Zombify::visit):
(JSC::Zombify::operator()):
* heap/HeapStatistics.cpp:
(JSC::StorageStatistics::visit):
(JSC::StorageStatistics::operator()):
* heap/HeapVerifier.cpp:
(JSC::GatherLiveObjFunctor::visit):
(JSC::GatherLiveObjFunctor::operator()):
* heap/MarkedBlock.cpp:
(JSC::SetNewlyAllocatedFunctor::operator()):
* heap/MarkedBlock.h:
(JSC::MarkedBlock::forEachCell):
(JSC::MarkedBlock::forEachLiveCell):
(JSC::MarkedBlock::forEachDeadCell):
* heap/MarkedSpace.h:
(JSC::MarkedSpace::forEachLiveCell):
(JSC::MarkedSpace::forEachDeadCell):
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::TypeRecompiler::visit):
(Inspector::TypeRecompiler::operator()):
* runtime/IterationStatus.h: Added.
* runtime/JSGlobalObject.cpp:
* runtime/VM.cpp:
(JSC::StackPreservingRecompiler::visit):
(JSC::StackPreservingRecompiler::operator()):
* tools/JSDollarVMPrototype.cpp:
(JSC::CellAddressCheckFunctor::CellAddressCheckFunctor):
(JSC::CellAddressCheckFunctor::operator()):
(JSC::JSDollarVMPrototype::isValidCell):
(JSC::ObjectAddressCheckFunctor::ObjectAddressCheckFunctor): Deleted.
(JSC::ObjectAddressCheckFunctor::operator()): Deleted.

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

5 years agoUpdate AirPlay sandbox rules
eric.carlson@apple.com [Wed, 22 Apr 2015 19:33:52 +0000 (19:33 +0000)]
Update AirPlay sandbox rules
https://bugs.webkit.org/show_bug.cgi?id=144062
<rdar://problem/19869448>

Reviewed by Alexey Proskuryakov.

* WebProcess/com.apple.WebProcess.sb.in: Remove obsolete rules.

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

5 years agoWeb Inspector: Remove an unused index argument from Sidebar.removeSidebarPanel
timothy@apple.com [Wed, 22 Apr 2015 19:02:57 +0000 (19:02 +0000)]
Web Inspector: Remove an unused index argument from Sidebar.removeSidebarPanel
https://bugs.webkit.org/show_bug.cgi?id=144054

Reviewed by Darin Adler.

* UserInterface/Views/Sidebar.js:

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

5 years ago[Mac] In nightlies and local builds, WebKit services can get terminated under memory...
ap@apple.com [Wed, 22 Apr 2015 19:02:06 +0000 (19:02 +0000)]
[Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
https://bugs.webkit.org/show_bug.cgi?id=144052
rdar://problem/19754404

Reviewed by Darin Adler.

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
(main): Make XPC transaction tracking work again after a re-exec.

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

5 years ago[CMake] Use lowercase for local variables in macros
mcatanzaro@igalia.com [Wed, 22 Apr 2015 19:01:37 +0000 (19:01 +0000)]
[CMake] Use lowercase for local variables in macros
https://bugs.webkit.org/show_bug.cgi?id=144059

Reviewed by Martin Robinson.

Convert some variable names to lowercase.

* Source/cmake/WebKitFeatures.cmake:

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

5 years agoWeb Inspector: Fix an exception preventing switching timelines
timothy@apple.com [Wed, 22 Apr 2015 19:00:50 +0000 (19:00 +0000)]
Web Inspector: Fix an exception preventing switching timelines
https://bugs.webkit.org/show_bug.cgi?id=144053

Reviewed by Darin Adler.

* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeElement.prototype.select): Store treeOutline in a local so
we have a reference to it when we go to reset processingSelectionChange.
The calls to onselect was removing the tree element from the outline, causing
"delete this.treeOutline.processingSelectionChange" to throw an exception.
This patch changes the delete to a set to false for good measure too.

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

5 years agoUnreviewed, rolling out r183116.
mcatanzaro@igalia.com [Wed, 22 Apr 2015 19:00:20 +0000 (19:00 +0000)]
Unreviewed, rolling out r183116.
https://bugs.webkit.org/show_bug.cgi?id=144060

Inadvertently deleted a file... (Requested by mcatanzaro on
#webkit).

Reverted changeset:

"[CMake] Use lowercase for local variables in macros"
https://bugs.webkit.org/show_bug.cgi?id=144059
http://trac.webkit.org/changeset/183116

Patch by Commit Queue <commit-queue@webkit.org> on 2015-04-22

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

5 years ago[[Set]] should be properly executed in JS builtins
utatane.tea@gmail.com [Wed, 22 Apr 2015 18:58:29 +0000 (18:58 +0000)]
[[Set]] should be properly executed in JS builtins
https://bugs.webkit.org/show_bug.cgi?id=143996

Reviewed by Geoffrey Garen.

Currently, all assignments in builtins JS code is compiled into put_by_val_direct.
However,

1. Some functions (like Array.from) needs [[Set]]. (but it is now compiled into put_by_val_direct, [[DefineOwnProperty]]).
2. It's different from the default JS behavior.

In this patch, we implement the bytecode intrinsic emitting put_by_val_direct and use it explicitly.
And dropping the current hack for builtins.

* builtins/Array.prototype.js:
(filter):
(map):
(find):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitPutByVal):
* tests/stress/array-fill-put-by-val.js: Added.
(shouldThrow):
(.set get array):
* tests/stress/array-filter-put-by-val-direct.js: Added.
(shouldBe):
(.set get var):
* tests/stress/array-find-does-not-lookup-twice.js: Added.
(shouldBe):
(shouldThrow):
(.get shouldBe):
* tests/stress/array-from-put-by-val-direct.js: Added.
(shouldBe):
(.set get var):
* tests/stress/array-from-set-length.js: Added.
(shouldBe):
(ArrayLike):
(ArrayLike.prototype.set length):
(ArrayLike.prototype.get length):
* tests/stress/array-map-put-by-val-direct.js: Added.
(shouldBe):
(.set get var):

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

5 years ago[CMake] Use lowercase for local variables in macros
mcatanzaro@igalia.com [Wed, 22 Apr 2015 18:52:11 +0000 (18:52 +0000)]
[CMake] Use lowercase for local variables in macros
https://bugs.webkit.org/show_bug.cgi?id=144059

Reviewed by Martin Robinson.

Convert some variable names to lowercase.

* Source/cmake/WebKitFeatures.cmake:

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

5 years agoRollout part of r182263 that broke inline media controls on iOS.
roger_fong@apple.com [Wed, 22 Apr 2015 18:33:10 +0000 (18:33 +0000)]
Rollout part of r182263 that broke inline media controls on iOS.
<rdar://problem/20654260>

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handlePanelTransitionEnd):
(Controller.prototype.setPlaying):
(Controller.prototype.showControls):
(Controller.prototype.hideControls):

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

5 years agoUnreviewed post-review clean up after r183096.
eric.carlson@apple.com [Wed, 22 Apr 2015 17:41:34 +0000 (17:41 +0000)]
Unreviewed post-review clean up after r183096.

Source/WebCore:

* Modules/mediasession/WebMediaSessionManagerClient.h:
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:

Source/WebKit/mac:

* WebView/WebMediaPlaybackTargetPicker.h:

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

5 years agoDon't de-allocate FunctionRareData
commit-queue@webkit.org [Wed, 22 Apr 2015 17:39:44 +0000 (17:39 +0000)]
Don't de-allocate FunctionRareData
https://bugs.webkit.org/show_bug.cgi?id=144000

Patch by Basile Clement <basile_clement@apple.com> on 2015-04-22
Reviewed by Michael Saboff.

A function rare data (containing most notably its allocation profile) is currently
freed and re-allocated each time the function's prototype is cleared.
This is not optimal as it means we are invalidating the watchpoint and recompiling the
scope each time the prototype is cleared.

This makes it so that a single rare data is reused, clearing the underlying
ObjectAllocationProfile instead of throwing away the whole rare data on
.prototype updates.

* runtime/FunctionRareData.cpp:
(JSC::FunctionRareData::create):
(JSC::FunctionRareData::finishCreation):
* runtime/FunctionRareData.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::allocateAndInitializeRareData):
(JSC::JSFunction::initializeRareData):

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

5 years agoUnreviewed. Do not run GTK+ user media unit tests when ENABLE_MEDIA_STREAM is disabled.
carlosgc@webkit.org [Wed, 22 Apr 2015 17:39:38 +0000 (17:39 +0000)]
Unreviewed. Do not run GTK+ user media unit tests when ENABLE_MEDIA_STREAM is disabled.

* TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:
(beforeAll):
(testWebViewAudioOnlyUserMediaPermissionRequests):

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

5 years agoAX: WebKit does not expose text fields inside tree views.
commit-queue@webkit.org [Wed, 22 Apr 2015 17:36:44 +0000 (17:36 +0000)]
AX: WebKit does not expose text fields inside tree views.
https://bugs.webkit.org/show_bug.cgi?id=142196

Patch by Nan Wang <nanwang1101@yahoo.com> on 2015-04-22
Reviewed by Chris Fleizach.

Source/WebCore:

The problem is that any object in a tree which is not a static text
or treeitem will be ignored. Fixed it by exposing the children of treeitem.

Test: accessibility/treeitem-child-exposed.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isAllowedChildOfTree):

LayoutTests:

Tests for treeitem’s children’s accessibility.
Also fixed the search predicate test for treeitem,
the static text is the second child of treeitem and
list marker is the first child.

* accessibility/treeitem-child-exposed-expected.txt: Added.
* accessibility/treeitem-child-exposed.html: Added.
* platform/mac/accessibility/search-predicate-expected.txt:
* platform/mac/accessibility/search-predicate.html:

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

5 years ago[CMake] Features list should print dots every other row
mcatanzaro@igalia.com [Wed, 22 Apr 2015 16:40:26 +0000 (16:40 +0000)]
[CMake] Features list should print dots every other row
https://bugs.webkit.org/show_bug.cgi?id=143832

Reviewed by Martin Robinson.

Discount private options when determining whether to print dots on a given row of the
features list. Also, simplify the logic by using only one for loop, and fix a couple errors
(inverted use of SHOULD_PRINT_DOTS, one use of the renamed variable SHOULD_PRINT_POINTS that
wasn't noticed because it only affects the first line, and use of the variable name as a
string in a conditional.)

* Source/cmake/WebKitFeatures.cmake:

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

5 years ago[Streams API] Implement ReadableStreamController
youenn.fablet@crf.canon.fr [Wed, 22 Apr 2015 15:55:20 +0000 (15:55 +0000)]
[Streams API] Implement ReadableStreamController
https://bugs.webkit.org/show_bug.cgi?id=143608

Reviewed by Benjamin Poulain.

Source/WebCore:

Introducing ReadableStreamController, an abstraction to manage JS source stream queues.
This new interface is not exposed to JS scripts as specified, using NoInterfaceObject.

A controller is created at the time a ReadableJSStream is started and it is owned by it.
The controller may outlive the stream but as its reference will be reset, the calls to
its methods would result in exceptions.

The constructor is not implemented yet.

Change covered by existing tests and rebased expectations.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make: Added ReadableStreamController.idl related files.
* Modules/streams/ReadableStreamController.h: Added.
* Modules/streams/ReadableStreamController.idl: Added.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp: Added ReadableStreamController.idl related files.
* bindings/js/JSReadableStreamControllerCustom.cpp: Added.
* bindings/js/ReadableStreamJSSource.cpp:
* bindings/js/ReadableStreamJSSource.h: Removed custom controller implementation.

LayoutTests:

Updated expectations as more tests are passed.
ReadableStreamController constructor tests fail due to the custom constructor being not implemented yet.
Added a test to ensure that calling a controller method when its stream is collected is throwing an error.

* streams/readable-stream.html:
* streams/readable-stream-expected.txt:
* streams/reference-implementation/bad-underlying-sources-expected.txt:
* streams/reference-implementation/brand-checks-expected.txt:
* streams/reference-implementation/count-queuing-strategy-expected.txt:
* streams/reference-implementation/readable-stream-expected.txt:

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

5 years ago[WK2] Have API::Array creation methods return Ref<>
zandobersek@gmail.com [Wed, 22 Apr 2015 15:28:16 +0000 (15:28 +0000)]
[WK2] Have API::Array creation methods return Ref<>
https://bugs.webkit.org/show_bug.cgi?id=143933

Reviewed by Darin Adler.

API::Array::create() and API::Array::createStringArray() should return Ref<> objects
as the return values are never null. It's up to the caller to implicitly convert the
returned objects to RefPtr<> if so required. All the call-sites have been updated to
reflect that.

* Shared/API/APIArray.cpp:
(API::Array::create):
(API::Array::createStringArray):
(API::Array::copy):
* Shared/API/APIArray.h:
* Shared/API/APIDictionary.cpp:
(API::Dictionary::keys):
* Shared/API/APIDictionary.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(ensureObjectStream):
* Shared/API/c/WKArray.cpp:
(WKArrayCreate):
(WKArrayCreateAdoptingValues):
* Shared/API/c/WKContextMenuItem.cpp:
(WKContextMenuCopySubmenuItems):
* Shared/API/c/WKDictionary.cpp:
(WKDictionaryCopyKeys):
* Shared/API/c/WKMutableArray.cpp:
(WKMutableArrayCreate):
* Shared/Cocoa/WKNSDictionary.mm:
(-[WKNSDictionary keyEnumerator]):
* Shared/SecurityOriginData.cpp:
(WebKit::performAPICallbackWithSecurityOriginDataVector):
* Shared/WebContextMenuItem.cpp:
(WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
* Shared/WebContextMenuItem.h:
* Shared/WebOpenPanelParameters.cpp:
(WebKit::WebOpenPanelParameters::acceptMIMETypes):
(WebKit::WebOpenPanelParameters::selectedFileNames):
* Shared/WebOpenPanelParameters.h:
* UIProcess/API/C/WKBackForwardListRef.cpp:
(WKBackForwardListCopyBackListWithLimit):
(WKBackForwardListCopyForwardListWithLimit):
* UIProcess/API/C/WKGrammarDetail.cpp:
(WKGrammarDetailCopyGuesses):
* UIProcess/API/C/WKOpenPanelParameters.cpp:
(WKOpenPanelParametersCopyAcceptedMIMETypes):
(WKOpenPanelParametersCopySelectedFileNames):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageContextMenuClient):
(WKPageCopyRelatedPages):
* UIProcess/API/Cocoa/WKBackForwardList.mm:
(-[WKBackForwardList backList]):
(-[WKBackForwardList forwardList]):
* UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
(createWKArray):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
* UIProcess/API/gtk/WebKitBackForwardList.cpp:
(webkit_back_forward_list_get_back_list_with_limit):
(webkit_back_forward_list_get_forward_list_with_limit):
* UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
(webkit_file_chooser_request_get_mime_types):
(webkit_file_chooser_request_get_mime_types_filter):
(webkit_file_chooser_request_select_files):
* UIProcess/API/gtk/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::notificationCloseCallback):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
* UIProcess/Notifications/WebNotificationProvider.cpp:
(WebKit::WebNotificationProvider::clearNotifications):
* UIProcess/Plugins/WebPluginSiteDataManager.cpp:
(WebKit::WebPluginSiteDataManager::didGetSitesWithData):
* UIProcess/StatisticsRequest.cpp:
(WebKit::StatisticsRequest::completedRequest):
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::backList):
(WebKit::WebBackForwardList::forwardList):
(WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
(WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
* UIProcess/WebBackForwardList.h:
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
* UIProcess/WebGrammarDetail.cpp:
(WebKit::WebGrammarDetail::guesses):
* UIProcess/WebGrammarDetail.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
* UIProcess/WebMediaCacheManagerProxy.cpp:
(WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::didGetOrigins):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFindStringMatches):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
(-[WKFileUploadPanel presentWithParameters:resultListener:]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame childFrames]):
* WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
(WKBundleBackForwardListItemCopyChildren):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameCopyChildFrames):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCopyTrackedRepaintRects):
* WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
(WebKit::InjectedBundleBackForwardListItem::children):
* WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
(WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::findLargestFrameInFrameSet):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::childFrames):
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::trackedRepaintRects):
* WebProcess/WebPage/WebPage.h:

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

5 years ago[CMake] Require specifying visibility of WebKit options
mcatanzaro@igalia.com [Wed, 22 Apr 2015 15:25:37 +0000 (15:25 +0000)]
[CMake] Require specifying visibility of WebKit options
https://bugs.webkit.org/show_bug.cgi?id=143831

Reviewed by Alex Christensen.

* Source/cmake/OptionsEfl.cmake: Specify all options as PUBLIC
* Source/cmake/OptionsGTK.cmake: Specify all options as PUBLIC
* Source/cmake/OptionsMac.cmake: Specify all options as PRIVATE
* Source/cmake/OptionsWindows.cmake: Specify all options as PUBLIC
* Source/cmake/WebKitFeatures.cmake: Require specifying options as PUBLIC or PRIVATE.
  Remove WEBKIT_OPTION_DEFINE_PUBLIC and WEBKIT_OPTION_PRIVATE_PORT_VALUE. Specify all
  cross-platform options as PRIVATE.

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

5 years agoAdd myself to watchlist
mcatanzaro@igalia.com [Wed, 22 Apr 2015 15:05:51 +0000 (15:05 +0000)]
Add myself to watchlist
https://bugs.webkit.org/show_bug.cgi?id=144041

Reviewed by Alex Christensen.

Add myself watching CMake, GtkWebKit2PublicAPI, SoupNetwork, and WebKitGTKTranslations.

* Scripts/webkitpy/common/config/watchlist:

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

5 years ago[GTK] Gardening 21st April.
commit-queue@webkit.org [Wed, 22 Apr 2015 12:18:41 +0000 (12:18 +0000)]
[GTK] Gardening 21st April.
https://bugs.webkit.org/show_bug.cgi?id=143982.

Unreviewed.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-04-22

* platform/gtk/TestExpectations:

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

5 years ago[GTK] MiniBrowser should use NetworkProcess by default
carlosgc@webkit.org [Wed, 22 Apr 2015 12:13:22 +0000 (12:13 +0000)]
[GTK] MiniBrowser should use NetworkProcess by default
https://bugs.webkit.org/show_bug.cgi?id=143948

Reviewed by Sergio Villar Senin.

Use WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES by default
unless MINIBROWSER_SINGLEPROCESS environment variable is present.

* MiniBrowser/gtk/main.c:
(main):

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

5 years agoRename hasOverride{Height,Width}() to hasOverrideLogicalContent{Height,Width}()
rego@igalia.com [Wed, 22 Apr 2015 10:31:24 +0000 (10:31 +0000)]
Rename hasOverride{Height,Width}() to hasOverrideLogicalContent{Height,Width}()
https://bugs.webkit.org/show_bug.cgi?id=143984

Reviewed by Darin Adler.

This patch is renaming these LayoutBox methods, because of their names
don't match with the getters and setters, which is confusing. Specially
now that we also have hasOverrideContainingBlockLogical{Height,Width}().

No new tests (this is just a refactoring).

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::updateRubyForJustifiedText):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::hasOverrideLogicalContentHeight):
(WebCore::RenderBox::hasOverrideLogicalContentWidth):
(WebCore::RenderBox::overrideLogicalContentWidth):
(WebCore::RenderBox::overrideLogicalContentHeight):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::availableLogicalHeightUsing):
* rendering/RenderBox.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::contentWidthForChild):
(WebCore::contentHeightForChild):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::adjustInlineDirectionLineBounds):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):

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

5 years agoVersioning.
bshafiei@apple.com [Wed, 22 Apr 2015 06:46:04 +0000 (06:46 +0000)]
Versioning.

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

5 years ago[Mac][MediaSource] Crash when SourceBuffer::provideMediaData() is called re-entrantly.
jer.noble@apple.com [Wed, 22 Apr 2015 05:10:39 +0000 (05:10 +0000)]
[Mac][MediaSource] Crash when SourceBuffer::provideMediaData() is called re-entrantly.
https://bugs.webkit.org/show_bug.cgi?id=144023

Reviewed by Eric Carlson.

Fixes non-deterministic crash in media/media-source/media-source-stalled-holds-sleep-assertion.html.

Platform changes have introduced a re-entrancy to provideMediaData().  Calling
SourceBufferPrivate::enqueueSample() can result in a re-entrant call back into
SourceBuffer::provideMediaData(). To protect against this, wrap the client call
from SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples() to
SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples() in a dispatch_async() to the
main thread. This gives the original provideMediaData() a chance to finish before the next
one begins.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):

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

5 years ago[Mac] Use one playback target for all web processes
eric.carlson@apple.com [Wed, 22 Apr 2015 04:06:57 +0000 (04:06 +0000)]
[Mac] Use one playback target for all web processes
https://bugs.webkit.org/show_bug.cgi?id=144009

Reviewed by Tim Horton.

Source/WebCore:

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updateWirelessPlaybackStatus): Drive-by fix to show controls when
    we show the placeholder image.

Instead of having each Page/Document pair manage access to the playback target for the videos
in a web process, put all of the logic into a new class - WebMediaSessionManager. A singleton
instance talks to the target picker and manages video element access for all web processes.
All playback target logic was removed from Document, Page, and MediaSessionManager.

* Modules/mediasession: Added.
* Modules/mediasession/WebMediaSessionManager.cpp: Added.
(WebCore::ClientState::ClientState):
(WebCore::flagsAreSet):
(WebCore::WebMediaSessionManager::WebMediaSessionManager):
(WebCore::WebMediaSessionManager::~WebMediaSessionManager):
(WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient):
(WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient):
(WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients):
(WebCore::WebMediaSessionManager::showPlaybackTargetPicker):
(WebCore::WebMediaSessionManager::clientStateDidChange):
(WebCore::WebMediaSessionManager::setPlaybackTarget):
(WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange):
(WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring):
(WebCore::WebMediaSessionManager::taskTimerFired):
(WebCore::WebMediaSessionManager::find):
(WebCore::WebMediaSessionManager::forEachClient):
* Modules/mediasession/WebMediaSessionManager.h: Added.
* Modules/mediasession/WebMediaSessionManagerClient.h: Added.
(WebCore::WebMediaSessionManagerClient::~WebMediaSessionManagerClient):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::mediaState): Replaces isPlayingAudio.
(WebCore::AudioContext::isPlayingAudio): Deleted.
* Modules/webaudio/AudioContext.h:
* WebCore.xcodeproj/project.pbxproj: Added new files.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::addAudioProducer): Take a MediaProducer instead of an AudioProducer.
(WebCore::Document::removeAudioProducer):
(WebCore::Document::updateIsPlayingMedia):
(WebCore::nextPlaybackTargetClientContextId):
(WebCore::Document::addPlaybackTargetPickerClient):
(WebCore::Document::removePlaybackTargetPickerClient):
(WebCore::Document::showPlaybackTargetPicker):
(WebCore::Document::playbackTargetPickerClientStateDidChange):
(WebCore::Document::playbackTargetAvailabilityDidChange):
(WebCore::Document::setPlaybackTarget):
(WebCore::Document::setShouldPlayToPlaybackTarget):
(WebCore::Document::configurePlaybackTargetMonitoring): Deleted.
(WebCore::Document::requiresPlaybackTargetRouteMonitoring): Deleted.
(WebCore::Document::didChoosePlaybackTarget): Deleted.
* dom/Document.h:
(WebCore::Document::mediaState):
(WebCore::Document::isPlayingAudio): Deleted.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::registerWithDocument):
(WebCore::HTMLMediaElement::setMuted):
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::registerWithDocument):
(WebCore::HTMLMediaSession::unregisterWithDocument):
(WebCore::HTMLMediaSession::showPlaybackTargetPicker):
(WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
(WebCore::HTMLMediaSession::setPlaybackTarget):
(WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange):
(WebCore::HTMLMediaSession::setShouldPlayToPlaybackTarget):
(WebCore::HTMLMediaSession::mediaStateDidChange):
(WebCore::HTMLMediaSession::didChoosePlaybackTarget): Deleted.
(WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Deleted.
(WebCore::HTMLMediaSession::startPlayingToPlaybackTarget): Deleted.
(WebCore::HTMLMediaSession::stopPlayingToPlaybackTarget): Deleted.
* html/HTMLMediaSession.h:
* page/AudioProducer.h: Removed.
* page/ChromeClient.h:
* page/MediaProducer.h: Copied from Source/WebCore/page/AudioProducer.h.
(WebCore::MediaProducer::~MediaProducer):
(WebCore::AudioProducer::~AudioProducer): Deleted.
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::updateIsPlayingMedia):
(WebCore::Page::addPlaybackTargetPickerClient):
(WebCore::Page::removePlaybackTargetPickerClient):
(WebCore::Page::showPlaybackTargetPicker):
(WebCore::Page::playbackTargetPickerClientStateDidChange):
(WebCore::Page::setPlaybackTarget):
(WebCore::Page::playbackTargetAvailabilityDidChange):
(WebCore::Page::setShouldPlayToPlaybackTarget):
(WebCore::Page::playbackTarget): Deleted.
(WebCore::Page::didChoosePlaybackTarget): Deleted.
(WebCore::Page::configurePlaybackTargetMonitoring): Deleted.
* page/Page.h:
(WebCore::Page::mediaState):
(WebCore::Page::isPlayingAudio): Deleted.
(WebCore::Page::hasWirelessPlaybackTarget): Deleted.
* platform/audio/MediaSession.h:
(WebCore::MediaSession::isPlayingToWirelessPlaybackTarget):
(WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
(WebCore::MediaSessionClient::setShouldPlayToPlaybackTarget):
(WebCore::MediaSession::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaSession::stopPlayingToPlaybackTarget): Deleted.
(WebCore::MediaSessionClient::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaSessionClient::stopPlayingToPlaybackTarget): Deleted.
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::sessionWillBeginPlayback):
(WebCore::MediaSessionManager::sessionCanLoadMedia):
(WebCore::MediaSessionManager::sessionShouldBeginPlayingToWirelessPlaybackTarget): Deleted.
* platform/audio/MediaSessionManager.h:
* platform/graphics/MediaPlaybackTargetClient.h: Copied from Source/WebCore/platform/graphics/MediaPlaybackTargetPickerClient.h.
(WebCore::MediaPlaybackTargetClient::~MediaPlaybackTargetClient):
(WebCore::MediaPlaybackTargetPickerClient::~MediaPlaybackTargetPickerClient): Deleted.
* platform/graphics/MediaPlaybackTargetPicker.cpp:
(WebCore::MediaPlaybackTargetPicker::showPlaybackTargetPicker):
(WebCore::MediaPlaybackTargetPicker::startingMonitoringPlaybackTargets):
(WebCore::MediaPlaybackTargetPicker::stopMonitoringPlaybackTargets):
* platform/graphics/MediaPlaybackTargetPicker.h:
* platform/graphics/MediaPlaybackTargetPickerClient.h: Removed.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayer::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayer::stopPlayingToPlaybackTarget): Deleted.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayerPrivateInterface::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayerPrivateInterface::stopPlayingToPlaybackTarget): Deleted.
* platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp: Added.
(WebCore::WebMediaSessionManagerMac::singleton):
(WebCore::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
(WebCore::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
(WebCore::WebMediaSessionManagerMac::targetPicker):
* platform/graphics/avfoundation/WebMediaSessionManagerMac.h: Added.
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayerPrivateAVFoundationObjC::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayerPrivateAVFoundationObjC::stopPlayingToPlaybackTarget): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::togglePlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::stopPlayingToPlaybackTarget): Deleted.
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayerPrivateQTKit::togglePlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayerPrivateQTKit::startPlayingToPlaybackTarget): Deleted.
(WebCore::MediaPlayerPrivateQTKit::stopPlayingToPlaybackTarget): Deleted.
* testing/Internals.cpp:
(WebCore::Internals::isPagePlayingAudio):

Source/WebKit/mac:

Update to use WebMediaSessionManager for playback target management.

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::addPlaybackTargetPickerClient):
(WebChromeClient::removePlaybackTargetPickerClient):
(WebChromeClient::showPlaybackTargetPicker):
(WebChromeClient::playbackTargetPickerClientStateDidChange):
(WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
(WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
* WebView/WebMediaPlaybackTargetPicker.h:
* WebView/WebMediaPlaybackTargetPicker.mm:
(WebMediaPlaybackTargetPicker::addPlaybackTargetPickerClient):
(WebMediaPlaybackTargetPicker::removePlaybackTargetPickerClient):
(WebMediaPlaybackTargetPicker::showPlaybackTargetPicker):
(WebMediaPlaybackTargetPicker::playbackTargetPickerClientStateDidChange):
(WebMediaPlaybackTargetPicker::setPlaybackTarget):
(WebMediaPlaybackTargetPicker::externalOutputDeviceAvailableDidChange):
(WebMediaPlaybackTargetPicker::setShouldPlayToPlaybackTarget):
(WebMediaPlaybackTargetPicker::invalidate):
(WebMediaPlaybackTargetPicker::startingMonitoringPlaybackTargets): Deleted.
(WebMediaPlaybackTargetPicker::stopMonitoringPlaybackTargets): Deleted.
(WebMediaPlaybackTargetPicker::didChoosePlaybackTarget): Deleted.
(WebMediaPlaybackTargetPicker::targetPicker): Deleted.
* WebView/WebView.mm:
(-[WebView _addPlaybackTargetPickerClient:]):
(-[WebView _removePlaybackTargetPickerClient:]):
(-[WebView _showPlaybackTargetPicker:location:hasVideo:]):
(-[WebView _playbackTargetPickerClientStateDidChange:state:]):
(-[WebView _showPlaybackTargetPicker:hasVideo:]): Deleted.
(-[WebView _startingMonitoringPlaybackTargets]): Deleted.
(-[WebView _stopMonitoringPlaybackTargets]): Deleted.
* WebView/WebViewInternal.h:

Source/WebKit2:

Every WebPageProxy uses the WebMediaSessionManager singleton to talk to the playback target
picker.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::isPlayingMediaDidChange):
(WebKit::WebPageProxy::addPlaybackTargetPickerClient):
(WebKit::WebPageProxy::removePlaybackTargetPickerClient):
(WebKit::WebPageProxy::showPlaybackTargetPicker):
(WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
(WebKit::WebPageProxy::setPlaybackTarget):
(WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
(WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
(WebKit::WebPageProxy::devicePickerProxy): Deleted.
(WebKit::WebPageProxy::startingMonitoringPlaybackTargets): Deleted.
(WebKit::WebPageProxy::stopMonitoringPlaybackTargets): Deleted.
(WebKit::WebPageProxy::didChoosePlaybackTarget): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isPlayingAudio):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::mediaSessionManager):
(WebKit::PageClientImpl::createPlaybackTargetPicker): Deleted.
* UIProcess/mac/WebMediaSessionManagerMac.cpp: Added.
(WebKit::WebMediaSessionManagerMac::singleton):
(WebKit::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
(WebKit::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
(WebKit::WebMediaSessionManagerMac::targetPicker):
* UIProcess/mac/WebMediaSessionManagerMac.h: Added.
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::isPlayingMediaDidChange):
(WebKit::WebChromeClient::addPlaybackTargetPickerClient):
(WebKit::WebChromeClient::removePlaybackTargetPickerClient):
(WebKit::WebChromeClient::showPlaybackTargetPicker):
(WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
(WebKit::WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
(WebKit::WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected):
(WebKit::WebPage::playbackTargetAvailabilityDidChange):
(WebKit::WebPage::setShouldPlayToPlaybackTarget):

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

5 years agoUnreviewed, fix 32-bit. Forgot to make this simple change to 32_64 as well.
fpizlo@apple.com [Wed, 22 Apr 2015 03:50:41 +0000 (03:50 +0000)]
Unreviewed, fix 32-bit. Forgot to make this simple change to 32_64 as well.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

5 years agoDFG should allow Phantoms after terminals
fpizlo@apple.com [Wed, 22 Apr 2015 03:38:17 +0000 (03:38 +0000)]
DFG should allow Phantoms after terminals
https://bugs.webkit.org/show_bug.cgi?id=126778

Reviewed by Mark Lam.

It's important for us to be able to place liveness-marking nodes after nodes that do
things. These liveness-marking nodes are nops. Previously, we disallowed such nodes after
terminals. That made things awkward, especially for Switch and Branch, which may do
things that necessitate liveness markers (for example they might want to use a converted
version of a value rather than the value that was MovHinted). We previously made this
work by disallowing certain optimizations on Switch and Branch, which was probably a bad
thing.

This changes our IR to allow for the terminal to not be the last node in a block. Asking
for the terminal involves a search. DFG::validate() checks that the nodes after the
terminal are liveness markers that have no effects or checks.

This is perf-neutral but will allow more optimizations in the future. It will also make
it cleaner to fix https://bugs.webkit.org/show_bug.cgi?id=143735.

* dfg/DFGBasicBlock.cpp:
(JSC::DFG::BasicBlock::replaceTerminal):
* dfg/DFGBasicBlock.h:
(JSC::DFG::BasicBlock::findTerminal):
(JSC::DFG::BasicBlock::terminal):
(JSC::DFG::BasicBlock::insertBeforeTerminal):
(JSC::DFG::BasicBlock::numSuccessors):
(JSC::DFG::BasicBlock::successor):
(JSC::DFG::BasicBlock::successorForCondition):
(JSC::DFG::BasicBlock::successors):
(JSC::DFG::BasicBlock::last): Deleted.
(JSC::DFG::BasicBlock::takeLast): Deleted.
(JSC::DFG::BasicBlock::insertBeforeLast): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::SuccessorsIterable): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::iterator::iterator): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::iterator::operator*): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::iterator::operator++): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::iterator::operator==): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::iterator::operator!=): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::begin): Deleted.
(JSC::DFG::BasicBlock::SuccessorsIterable::end): Deleted.
* dfg/DFGBasicBlockInlines.h:
(JSC::DFG::BasicBlock::appendNonTerminal):
(JSC::DFG::BasicBlock::replaceTerminal):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::linkBlock):
(JSC::DFG::ByteCodeParser::parseCodeBlock):
* dfg/DFGCFGSimplificationPhase.cpp:
(JSC::DFG::CFGSimplificationPhase::run):
(JSC::DFG::CFGSimplificationPhase::convertToJump):
(JSC::DFG::CFGSimplificationPhase::mergeBlocks):
* dfg/DFGCPSRethreadingPhase.cpp:
(JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock):
* dfg/DFGCommon.h:
(JSC::DFG::NodeAndIndex::NodeAndIndex):
(JSC::DFG::NodeAndIndex::operator!):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupBlock):
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::injectTypeConversionsInBlock):
(JSC::DFG::FixupPhase::clearPhantomsAtEnd): Deleted.
* dfg/DFGForAllKills.h:
(JSC::DFG::forAllLiveNodesAtTail):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::terminalsAreValid):
(JSC::DFG::Graph::dumpBlockHeader):
* dfg/DFGGraph.h:
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::mergeToSuccessors):
* dfg/DFGLICMPhase.cpp:
(JSC::DFG::LICMPhase::run):
(JSC::DFG::LICMPhase::attemptHoist):
* dfg/DFGMovHintRemovalPhase.cpp:
* dfg/DFGNode.h:
(JSC::DFG::Node::SuccessorsIterable::SuccessorsIterable):
(JSC::DFG::Node::SuccessorsIterable::iterator::iterator):
(JSC::DFG::Node::SuccessorsIterable::iterator::operator*):
(JSC::DFG::Node::SuccessorsIterable::iterator::operator++):
(JSC::DFG::Node::SuccessorsIterable::iterator::operator==):
(JSC::DFG::Node::SuccessorsIterable::iterator::operator!=):
(JSC::DFG::Node::SuccessorsIterable::begin):
(JSC::DFG::Node::SuccessorsIterable::end):
(JSC::DFG::Node::successors):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::determineMaterializationPoints):
(JSC::DFG::ObjectAllocationSinkingPhase::placeMaterializationPoints):
(JSC::DFG::ObjectAllocationSinkingPhase::promoteSunkenFields):
* dfg/DFGPhantomRemovalPhase.cpp:
(JSC::DFG::PhantomRemovalPhase::run):
* dfg/DFGPutStackSinkingPhase.cpp:
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStaticExecutionCountEstimationPhase.cpp:
(JSC::DFG::StaticExecutionCountEstimationPhase::run):
* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
* tests/stress/closure-call-exit.js: Added.
(foo):

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

5 years agoWKWebsiteDataStore doesn't track and remove IndexedDB databases
andersca@apple.com [Wed, 22 Apr 2015 02:46:45 +0000 (02:46 +0000)]
WKWebsiteDataStore doesn't track and remove IndexedDB databases
https://bugs.webkit.org/show_bug.cgi?id=144032
rdar://problem/20242856

Reviewed by Tim Horton.

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::fetchWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseProcess.messages.in:
* Shared/WebsiteData/WebsiteDataTypes.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::generateCallbackID):
(WebKit::DatabaseProcessProxy::~DatabaseProcessProxy):
(WebKit::DatabaseProcessProxy::fetchWebsiteData):
(WebKit::DatabaseProcessProxy::deleteWebsiteData):
(WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
(WebKit::DatabaseProcessProxy::didClose):
(WebKit::DatabaseProcessProxy::didFetchWebsiteData):
(WebKit::DatabaseProcessProxy::didDeleteWebsiteData):
(WebKit::DatabaseProcessProxy::didDeleteWebsiteDataForOrigins):
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Databases/DatabaseProcessProxy.messages.in:
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):

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

5 years agoWeb Inspector: Use String.prototype.startsWith in more places
commit-queue@webkit.org [Wed, 22 Apr 2015 02:37:07 +0000 (02:37 +0000)]
Web Inspector: Use String.prototype.startsWith in more places
https://bugs.webkit.org/show_bug.cgi?id=144025

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-21
Reviewed by Timothy Hatcher.

* UserInterface/Models/Gradient.js:
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):

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

5 years agoAdd JetStream to PerformanceTests
rniwa@webkit.org [Wed, 22 Apr 2015 02:30:22 +0000 (02:30 +0000)]
Add JetStream to PerformanceTests
https://bugs.webkit.org/show_bug.cgi?id=144024

Rubber-stamped by Filip Pizlo.

* JetStream: Added.
* JetStream/JetStream-Logo.png: Added.
* JetStream/JetStream-Logo@2x.png: Added.
* JetStream/JetStream.css: Added.
* JetStream/JetStreamDriver.js: Added.
* JetStream/LICENSE.txt: Added.
* JetStream/LLVM-test-suite-LICENSE.txt: Added.
* JetStream/Octane: Added.
* JetStream/Octane/base.js: Added.
* JetStream/Octane/code-load.js: Added.
* JetStream/Octane2: Added.
* JetStream/Octane2/base.js: Added.
* JetStream/Octane2/box2d.js: Added.
* JetStream/Octane2/code-load.js: Added.
* JetStream/Octane2/crypto.js: Added.
* JetStream/Octane2/deltablue.js: Added.
* JetStream/Octane2/earley-boyer.js: Added.
* JetStream/Octane2/gbemu-part1.js: Added.
* JetStream/Octane2/gbemu-part2.js: Added.
* JetStream/Octane2/mandreel.js: Added.
* JetStream/Octane2/navier-stokes.js: Added.
* JetStream/Octane2/pdfjs.js: Added.
* JetStream/Octane2/raytrace.js: Added.
* JetStream/Octane2/regexp.js: Added.
* JetStream/Octane2/richards.js: Added.
* JetStream/Octane2/run.js: Added.
* JetStream/Octane2/splay.js: Added.
* JetStream/Octane2/typescript-compiler.js: Added.
* JetStream/Octane2/typescript-input.js: Added.
* JetStream/Octane2/typescript.js: Added.
* JetStream/Octane2/zlib-data.js: Added.
* JetStream/Octane2/zlib.js: Added.
* JetStream/Octane2Setup.js: Added.
* JetStream/OctaneSetup.js: Added.
* JetStream/README: Added.
* JetStream/Reference.js: Added.
* JetStream/SimpleSetup.js: Added.
* JetStream/SunSpiderSetup.js: Added.
* JetStream/Swoosh.png: Added.
* JetStream/Swoosh@2x.png: Added.
* JetStream/TestingSetup.js: Added.
* JetStream/create.rb: Added.
* JetStream/docs: Added.
* JetStream/docs/JetStreamBlogPost.html: Added.
* JetStream/in-depth-TEMPLATE.html: Added.
* JetStream/index-TEMPLATE.html: Added.
* JetStream/simple: Added.
* JetStream/simple/bigfib.cpp: Added.
* JetStream/simple/bigfib.cpp.js: Added.
* JetStream/simple/container.cpp: Added.
* JetStream/simple/container.cpp.js: Added.
* JetStream/simple/dry.c: Added.
* JetStream/simple/dry.c.js: Added.
* JetStream/simple/float-mm.c: Added.
* JetStream/simple/float-mm.c.js: Added.
* JetStream/simple/gcc-loops.cpp: Added.
* JetStream/simple/gcc-loops.cpp.js: Added.
* JetStream/simple/hash-map.js: Added.
* JetStream/simple/n-body.c: Added.
* JetStream/simple/n-body.c.js: Added.
* JetStream/simple/quicksort.c: Added.
* JetStream/simple/quicksort.c.js: Added.
* JetStream/simple/towers.c: Added.
* JetStream/simple/towers.c.js: Added.
* JetStream/sunspider: Added.
* JetStream/sunspider/3d-cube.js: Added.
* JetStream/sunspider/3d-raytrace.js: Added.
* JetStream/sunspider/base64.js: Added.
* JetStream/sunspider/cordic.js: Added.
* JetStream/sunspider/crypto-aes.js: Added.
* JetStream/sunspider/crypto-md5.js: Added.
* JetStream/sunspider/crypto-sha1.js: Added.
* JetStream/sunspider/date-format-tofte.js: Added.
* JetStream/sunspider/date-format-xparb.js: Added.
* JetStream/sunspider/n-body.js: Added.
* JetStream/sunspider/regex-dna.js: Added.
* JetStream/sunspider/tagcloud.js: Added.

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

5 years agoAdd module maps for WebKit
andersca@apple.com [Wed, 22 Apr 2015 01:17:08 +0000 (01:17 +0000)]
Add module maps for WebKit
https://bugs.webkit.org/show_bug.cgi?id=144026
rdar://problem/19665428

Reviewed by Dan Bernstein.

* Configurations/WebKit.xcconfig:
* Modules/OSX.modulemap: Added.
* Modules/iOS.modulemap: Added.

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

5 years ago[iOS] When computing visible rects for tiling, stop searching at UIWindows
mmaxfield@apple.com [Wed, 22 Apr 2015 00:51:07 +0000 (00:51 +0000)]
[iOS] When computing visible rects for tiling, stop searching at UIWindows
https://bugs.webkit.org/show_bug.cgi?id=144022
<rdar://problem/18327227>

Reviewed by Simon Fraser.

[WAKWindow _visibleRectRespectingMasksToBounds:] computes a visible rect which we use
to determine which tiles to create. We do this by finding the frame of the _hostLayer,
and then walking up the CALayer hierarchy converting each rect into its parent's
coordinate system (all the while clipping to bounds if necessary). This walk up the
layer hierarchy should stop at a layer associated with a UIWindow.

* platform/ios/wak/WAKWindow.mm:
(-[WAKWindow _visibleRectRespectingMasksToBounds:]):

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

5 years ago[Cairo] Implement Path::addPath
jinwoo7.song@samsung.com [Wed, 22 Apr 2015 00:38:04 +0000 (00:38 +0000)]
[Cairo] Implement Path::addPath
https://bugs.webkit.org/show_bug.cgi?id=130580

Reviewed by Dirk Schulze.

Source/WebCore:

Add support for addPath method for ports using cairo.
This patch is originally authored by Jae Hyun Park <jaepark@webkit.org>.

Test: fast/canvas/canvas-path-addPath.html

* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::addPath): Implement addPath for cairo.

LayoutTests:

Enable addPath testcase in EFL port.

* platform/efl/TestExpectations:

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

5 years agoFix the iOS build.
timothy_horton@apple.com [Wed, 22 Apr 2015 00:24:18 +0000 (00:24 +0000)]
Fix the iOS build.

* platform/spi/cg/CoreGraphicsSPI.h:

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

5 years agoSVGAnimateElementBase::calculateAnimatedValue() asserts when reinserting an SVG anima...
commit-queue@webkit.org [Wed, 22 Apr 2015 00:13:54 +0000 (00:13 +0000)]
SVGAnimateElementBase::calculateAnimatedValue() asserts when reinserting an SVG animating element within the same animation limits
https://bugs.webkit.org/show_bug.cgi?id=143994

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-04-21
Reviewed by Simon Fraser.

Source/WebCore:

Make sure the SVG animation variables are reset cleanly such that if the
animation restarts it can rebuild its limit values reliably and correctly.

Tests: svg/animations/crash-reinsert-animate-length-same-limits.svg
       svg/animations/crash-reinsert-animate-transform-same-limits.svg

* svg/SVGAnimateElementBase.h:
* svg/SVGAnimateElementBase.cpp:
(WebCore::SVGAnimateElementBase::resetAnimatedPropertyType):
Call the base class resetAnimatedPropertyType() from the derived class.

* svg/SVGAnimationElement.h:
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::resetAnimatedPropertyType):
Make resetAnimatedPropertyType() virtual. The implementation of the base
class of this function resets the values of the animation limits. When
updateAnimation() is called, it will be forced to recalculate the animation
limits by calling calculateFromAndToValues() even if the limits have not
changed.

LayoutTests:

* svg/animations/crash-reinsert-animate-length-same-limits-expected.txt: Added.
* svg/animations/crash-reinsert-animate-length-same-limits.svg: Added.
* svg/animations/crash-reinsert-animate-transform-same-limits-expected.txt: Added.
* svg/animations/crash-reinsert-animate-transform-same-limits.svg: Added.
Make sure when removing an SVG animating element and reinserting it back
within the same animation length or transform limits, we do not crash.

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

5 years ago[EFL] Unreviewed gardening
jinwoo7.song@samsung.com [Wed, 22 Apr 2015 00:04:51 +0000 (00:04 +0000)]
[EFL] Unreviewed gardening

Update test expectations for failing tests.

* platform/efl/fast/multicol/span/span-as-immediate-columns-child-expected.png: Rebaseline after r177774.
* platform/efl/fast/multicol/span/span-as-immediate-columns-child-expected.txt: Ditto.
* platform/efl/fast/repaint/selection-ruby-rl-expected.txt: Added. Ditto.
* platform/efl/fast/text/decorations-with-text-combine-expected.png:
* platform/efl/fast/text/decorations-with-text-combine-expected.txt:
* platform/efl/mathml/opentype/horizontal-expected.txt: Rebaseline after r174540.
* platform/efl/svg/text/textPathBoundsBug-expected.png: Rebaselined after r177774.
* platform/efl/svg/text/textPathBoundsBug-expected.txt: Added. Ditto.

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

5 years agoLong pause under _takeViewSnapshot when screen updates are disabled
timothy_horton@apple.com [Tue, 21 Apr 2015 23:25:00 +0000 (23:25 +0000)]
Long pause under _takeViewSnapshot when screen updates are disabled
https://bugs.webkit.org/show_bug.cgi?id=144017
<rdar://problem/20548397>

Reviewed by Simon Fraser.

* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Use CGSHWCaptureWindowList, for snapshotting that doesn't block on
the next commit, and can succeed while screen updates are disabled
without blocking.

* platform/spi/cg/CoreGraphicsSPI.h:
Add some SPI.

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

5 years agoUnreviewed, rolling out r183077.
commit-queue@webkit.org [Tue, 21 Apr 2015 23:23:55 +0000 (23:23 +0000)]
Unreviewed, rolling out r183077.
https://bugs.webkit.org/show_bug.cgi?id=144021

broke a bunch of tests, bfulgham is going to try again
(Requested by thorton on #webkit).

Reverted changeset:

"Context menu doesn't account for selection semantics"
https://bugs.webkit.org/show_bug.cgi?id=143958
http://trac.webkit.org/changeset/183077

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

5 years ago[WK2][NetworkCache] Better account of resource revalidations in efficacy logging
cdumez@apple.com [Tue, 21 Apr 2015 23:20:32 +0000 (23:20 +0000)]
[WK2][NetworkCache] Better account of resource revalidations in efficacy logging
https://bugs.webkit.org/show_bug.cgi?id=144014

Reviewed by Antti Koivisto.

Source/WebCore:

Add additional diagnostic logging key for network cache efficacy
logging.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::needsRevalidationKey):
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Better account of resource revalidations in efficacy logging.
Prevously, resources that were in the cache but needed revalidation
were counted as retrieval successes, which is not entirely accurate.

We now distinguish "is in the cache and is directly usable" from
"is in the cache but needs revalidation". We also log how many of these
revalidations are successful.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::update):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
(WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
* NetworkProcess/cache/NetworkCacheStatistics.h:

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

5 years ago[Cocoa] Framework header postprocessing should respect additional definitions
mitz@apple.com [Tue, 21 Apr 2015 23:07:59 +0000 (23:07 +0000)]
[Cocoa] Framework header postprocessing should respect additional definitions
https://bugs.webkit.org/show_bug.cgi?id=144018

Reviewed by Anders Carlsson.

* mac/postprocess-framework-headers.sh: Read definitons from
/usr/local/include/WebKitAdditions/Scripts/postprocess-framework-headers-definitions, and
have them take precedence over OSX_VERSION and IOS_VERSION and supply additional options to
sed.

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

5 years agoPhantomNewObject should be marked NodeMustGenerate
commit-queue@webkit.org [Tue, 21 Apr 2015 22:29:16 +0000 (22:29 +0000)]
PhantomNewObject should be marked NodeMustGenerate
https://bugs.webkit.org/show_bug.cgi?id=143974

Patch by Basile Clement <basile_clement@apple.com> on 2015-04-21
Reviewed by Filip Pizlo.

* dfg/DFGNode.h:
(JSC::DFG::Node::convertToPhantomNewObject):
Was not properly marking NodeMustGenerate when converting.

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

5 years agoContext menu doesn't account for selection semantics
bfulgham@apple.com [Tue, 21 Apr 2015 22:01:52 +0000 (22:01 +0000)]
Context menu doesn't account for selection semantics
https://bugs.webkit.org/show_bug.cgi?id=143958
<rdar://problem/19735706>

Reviewed by Tim Horton.

Before using the default word-only selection, check with the
lookup service to see if we can get a semantically appropriate
selection.

* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):
(WebCore::EventHandler::selectClosestWordFromHitTestResult):
* page/EventHandler.h:
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):

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

5 years agoDFG Call/ConstructForwardVarargs fails to restore the stack pointer
fpizlo@apple.com [Tue, 21 Apr 2015 20:55:45 +0000 (20:55 +0000)]
DFG Call/ConstructForwardVarargs fails to restore the stack pointer
https://bugs.webkit.org/show_bug.cgi?id=144007

Reviewed by Mark Lam.

We were conditioning the stack pointer restoration on isVarargs, but we also need to do it
if isForwardVarargs.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* tests/stress/varargs-then-slow-call.js: Added.
(foo):
(bar):
(fuzz):
(baz):

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

5 years ago[EFL] Unreviewed gardening on 22th April
gyuyoung.kim@webkit.org [Tue, 21 Apr 2015 20:37:58 +0000 (20:37 +0000)]
[EFL] Unreviewed gardening on 22th April

Mark 3 compositing tests to image only failure. Additionally move
wrong categorized 2 tests to a correct place.

* platform/efl/TestExpectations:

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

5 years agoGet rid of an unneeded function from LoaderNSURLExtras.mm
andersca@apple.com [Tue, 21 Apr 2015 20:32:34 +0000 (20:32 +0000)]
Get rid of an unneeded function from LoaderNSURLExtras.mm
https://bugs.webkit.org/show_bug.cgi?id=144003

Reviewed by Chris Dumez.

Just use Vector::contains instead of vectorContainsString.

* loader/mac/LoaderNSURLExtras.mm:
(suggestedFilenameWithMIMEType):
(vectorContainsString): Deleted.

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

5 years agoRemove AllocationProfileWatchpoint node
commit-queue@webkit.org [Tue, 21 Apr 2015 20:23:50 +0000 (20:23 +0000)]
Remove AllocationProfileWatchpoint node
https://bugs.webkit.org/show_bug.cgi?id=143999

Patch by Basile Clement <basile_clement@apple.com> on 2015-04-21
Reviewed by Filip Pizlo.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGHeapLocation.h:
* dfg/DFGNode.h:
(JSC::DFG::Node::hasCellOperand):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGWatchpointCollectionPhase.cpp:
(JSC::DFG::WatchpointCollectionPhase::handle):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
* runtime/JSFunction.h:
(JSC::JSFunction::rareData):
(JSC::JSFunction::allocationProfileWatchpointSet): Deleted.

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

5 years agoMovHint should be a strong use
fpizlo@apple.com [Tue, 21 Apr 2015 20:16:18 +0000 (20:16 +0000)]
MovHint should be a strong use
https://bugs.webkit.org/show_bug.cgi?id=143734

Reviewed by Geoffrey Garen.

This disables any DCE that assumes equivalence between DFG IR uses and bytecode uses. Doing
so is a major step towards allowing more fancy DFG transformations and also probably fixing
some bugs.

Just making MovHint a strong use would also completely disable DCE. So we mitigate this by
introducing a MovHint removal phase that runs in FTL.

This is a slight slowdown on Octane/gbemu, but it's basically neutral on suite averages.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeOrigin.cpp:
(JSC::InlineCallFrame::dumpInContext):
* dfg/DFGDCEPhase.cpp:
(JSC::DFG::DCEPhase::fixupBlock):
* dfg/DFGDisassembler.cpp:
(JSC::DFG::Disassembler::createDumpList):
* dfg/DFGEpoch.cpp: Added.
(JSC::DFG::Epoch::dump):
* dfg/DFGEpoch.h: Added.
(JSC::DFG::Epoch::Epoch):
(JSC::DFG::Epoch::first):
(JSC::DFG::Epoch::operator!):
(JSC::DFG::Epoch::next):
(JSC::DFG::Epoch::bump):
(JSC::DFG::Epoch::operator==):
(JSC::DFG::Epoch::operator!=):
* dfg/DFGMayExit.cpp:
(JSC::DFG::mayExit):
* dfg/DFGMovHintRemovalPhase.cpp: Added.
(JSC::DFG::performMovHintRemoval):
* dfg/DFGMovHintRemovalPhase.h: Added.
* dfg/DFGNodeType.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* runtime/Options.h:

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

5 years agoUse grep instead of any in prepare-ChangeLog, to avoid Windows compatibility issues.
matthew_hanson@apple.com [Tue, 21 Apr 2015 20:06:17 +0000 (20:06 +0000)]
Use grep instead of any in prepare-ChangeLog, to avoid Windows compatibility issues.

Unreviewed build fix.

* Scripts/prepare-ChangeLog:
(get_function_line_ranges_for_cpp):
Use grep instead of any to determine if a string is an element of an array.

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

5 years agoFix block signatures
andersca@apple.com [Tue, 21 Apr 2015 19:30:33 +0000 (19:30 +0000)]
Fix block signatures
https://bugs.webkit.org/show_bug.cgi?id=144002

Reviewed by Andreas Kling.

Source/WebKit2:

* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
(-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
(-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):

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

5 years agoREGRESSION (r182899): icloud.com crashes
commit-queue@webkit.org [Tue, 21 Apr 2015 18:50:16 +0000 (18:50 +0000)]
REGRESSION (r182899): icloud.com crashes
https://bugs.webkit.org/show_bug.cgi?id=143960

Patch by Basile Clement <basile_clement@apple.com> on 2015-04-21
Reviewed by Filip Pizlo.

* runtime/JSFunction.h:
(JSC::JSFunction::allocationStructure):
* tests/stress/dfg-rare-data.js: Added.
(F): Regression test

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

5 years agoPDFs still don't snapshot properly in iOS Safari
timothy_horton@apple.com [Tue, 21 Apr 2015 18:01:15 +0000 (18:01 +0000)]
PDFs still don't snapshot properly in iOS Safari
https://bugs.webkit.org/show_bug.cgi?id=143976
<rdar://problem/18283459>

Reviewed by Anders Carlsson.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didLayoutForCustomContentProvider):
* UIProcess/WebPageProxy.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
Inform the client that we've passed all reasonable layout milestones
as soon as the custom content provider has been handed its data.
WKPDFView, the only custom content provider, synchronously lays out
its subviews upon initial receipt of data, so this works fine for it.
This ensures that clients that normally depend on layout milestones firing
won't break when a custom content view is installed.

(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
Fall back to renderInContext: if the custom content view is not parented
when a snapshot is requested.

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

5 years agoCrash in JSC::Interpreter::execute
msaboff@apple.com [Tue, 21 Apr 2015 17:57:15 +0000 (17:57 +0000)]
Crash in JSC::Interpreter::execute
https://bugs.webkit.org/show_bug.cgi?id=142625

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

We need to keep the FunctionExecutables in the code block for the eval flavor of
Interpreter::execute() in order to create the scope used to eval.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::jettisonFunctionDeclsAndExprs): Deleted.
* bytecode/CodeBlock.h:
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::registerFrozenValues):

LayoutTests:

New regression test.

* js/regress-142625-expected.txt: Added.
* js/regress-142625.html: Added.
* js/script-tests/regress-142625.js: Added.

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

5 years agoMerged WKBackForwardListItem’s Internal category into the class extension in WKBackFo...
mitz@apple.com [Tue, 21 Apr 2015 17:11:44 +0000 (17:11 +0000)]
Merged WKBackForwardListItem’s Internal category into the class extension in WKBackForwardListItemInternal.h.

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKBackForwardListItem.mm:
(-[WKBackForwardListItem _item]):
(-[WKBackForwardListItem _apiObject]):
* UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:

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

5 years agoMake Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor...
cdumez@apple.com [Tue, 21 Apr 2015 16:18:22 +0000 (16:18 +0000)]
Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
https://bugs.webkit.org/show_bug.cgi?id=143970

Reviewed by Darin Adler.

Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
constructor explicit as it copies the vector and it is easy to call it
by mistake.

Source/JavaScriptCore:

* bytecode/UnlinkedInstructionStream.cpp:
(JSC::UnlinkedInstructionStream::UnlinkedInstructionStream):
* bytecode/UnlinkedInstructionStream.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::lower):

Source/WebCore:

* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::setIndexKeys):
(WebCore::IDBDatabaseBackend::setIndexesReady):
* Modules/indexeddb/IDBDatabaseBackend.h:
* Modules/indexeddb/IDBServerConnection.h:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::minimumRegisterRequirements):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasClasses):
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::push):
(WebCore::StackAllocator::pop):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::nextGridItem):
(WebCore::RenderGrid::GridIterator::isEmptyAreaEnough):
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::paintTypesForPaintOrder):
* rendering/style/SVGRenderStyle.h:
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::fillStrokeMarkers):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paint):
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::appendLigatureGlyphs):
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):

Source/WebKit2:

* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::setIndexKeys):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:

Source/WTF:

* wtf/RefCountedArray.h:
(WTF::RefCountedArray::RefCountedArray):
* wtf/Vector.h:

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

5 years agoUse ASSERT_WITH_SECURITY_IMPLICATION() for NoEventDispatchAssertion
cdumez@apple.com [Tue, 21 Apr 2015 16:16:21 +0000 (16:16 +0000)]
Use ASSERT_WITH_SECURITY_IMPLICATION() for NoEventDispatchAssertion
https://bugs.webkit.org/show_bug.cgi?id=143971

Reviewed by Darin Adler.

Use ASSERT_WITH_SECURITY_IMPLICATION() for NoEventDispatchAssertion as
firing JS events can cause arbitrary JS execution which often leads to
security bugs when event firing is forbidden. For e.g. firing events
from ActiveDOMObject::suspend() means JS can construct or destroy
ActiveDOMObjects while we are iterating over them.

* dom/ContainerNode.cpp:
(WebCore::dispatchChildInsertionEvents):
(WebCore::dispatchChildRemovalEvents):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildNodeInsertionNotifier::notify):
* dom/Document.cpp:
(WebCore::Document::dispatchWindowEvent):
(WebCore::Document::dispatchWindowLoadEvent):
* dom/Element.cpp:
(WebCore::Element::dispatchFocusInEvent):
(WebCore::Element::dispatchFocusOutEvent):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent):
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners):
* dom/Node.cpp:
(WebCore::Node::dispatchSubtreeModifiedEvent):
(WebCore::Node::dispatchDOMActivateEvent):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForPageCache):
(WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
(WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
(WebCore::ScriptExecutionContext::stopActiveDOMObjects):
(WebCore::ScriptExecutionContext::willDestroyActiveDOMObject):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::dispatchRegionOversetChangeEvent):

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

5 years agoRemove some stray uses of OwnPtr and PassOwnPtr in WTF (outside of the template defin...
darin@apple.com [Tue, 21 Apr 2015 15:51:05 +0000 (15:51 +0000)]
Remove some stray uses of OwnPtr and PassOwnPtr in WTF (outside of the template definitions and traits)
https://bugs.webkit.org/show_bug.cgi?id=143944

Reviewed by Andreas Kling.

Source/WebCore:

* editing/ios/DictationCommandIOS.h: Added now-needed include of PassOwnPtr.h.

Source/WTF:

* wtf/FilePrintStream.h: Removed unneeded include.
* wtf/HashTable.h: Fixed class template name in comment.
* wtf/HashTraits.h: Removed unneeded forward declaration.
* wtf/ListHashSet.h: Removed unneeded includes.
* wtf/ThreadingWin.cpp: Removed unneeded includes.
(WTF::wtfThreadEntryPoint): Changed code to use unique_ptr.
(WTF::createThreadInternal): Changed code to use make_unique and release.
* wtf/efl/RunLoopEfl.cpp: Removed unneeded includes.

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

5 years agoWeb Inspector: Make formatted nodes more consistent with formatted objects
nvasilyev@apple.com [Tue, 21 Apr 2015 13:01:18 +0000 (13:01 +0000)]
Web Inspector: Make formatted nodes more consistent with formatted objects
https://bugs.webkit.org/show_bug.cgi?id=142159

Reviewed by Timothy Hatcher.

* UserInterface/Views/DOMTreeOutline.css:
(.dom-tree-outline ol):
Keep indentation exactly two spaces of Menlo.

(.dom-tree-outline li):
(.dom-tree-outline li.parent):
(.dom-tree-outline li .html-tag.close):
(.dom-tree-outline li.parent::before):
(.dom-tree-outline:focus li.parent.selected::before):
(.dom-tree-outline li.parent.expanded::before):
(.dom-tree-outline:focus li.parent.expanded.selected::before):
* UserInterface/Views/FormattedValue.css:
(.formatted-node > .dom-tree-outline ol):
Keep indentation exactly two spaces of Menlo.

* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property > .disclosure-button):
Disclosure triangle is 13 by 13 pixels. Having it in the middle of 16 by 16
pixels block makes it look bloory on non-retina screen, because:
(16 - 13) / 2 = 1.5px. Replacing 16 with 15 fixes the problem.

* UserInterface/Views/ObjectTreeView.css:
(.object-tree:not(.lossless-preview) > :matches(.title, .object-preview)):

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

5 years ago[GTK] jhbuild should not use a branch for openwebrtc
commit-queue@webkit.org [Tue, 21 Apr 2015 09:57:38 +0000 (09:57 +0000)]
[GTK] jhbuild should not use a branch for openwebrtc
https://bugs.webkit.org/show_bug.cgi?id=143981

Patch by Philippe Normand <pnormand@igalia.com> on 2015-04-21
Reviewed by Carlos Garcia Campos.

* gtk/jhbuild.modules:

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

5 years agoREGRESSION (r177494): -webkit-mask-image: with data URI fails on non-local files
simon.fraser@apple.com [Tue, 21 Apr 2015 06:47:13 +0000 (06:47 +0000)]
REGRESSION (r177494): -webkit-mask-image: with data URI fails on non-local files
https://bugs.webkit.org/show_bug.cgi?id=141857

Reviewed by Dirk Schulze.

Source/WebCore:

r177494 regressed loading of data URIs in masks with remote content, triggering
a cross-domain error which occurs because the mask loading happened via a separate
SVGDocument.

Fix by checking for data URIs at parsing time, which is what we used to do.

Test: http/tests/css/data-uri-mask.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseMaskImage):
* svg/SVGURIReference.h:
(WebCore::SVGURIReference::isExternalURIReference):

LayoutTests:

Ref test with a masked green square. Has to be an http test to trigger the
origin checking.

* http/tests/css/data-uri-mask-expected.html: Added.
* http/tests/css/data-uri-mask.html: Added.

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

5 years agoCrash when showing Web Inspector on page with 'multipart/x-mixed-replace' main resource
cdumez@apple.com [Tue, 21 Apr 2015 06:22:57 +0000 (06:22 +0000)]
Crash when showing Web Inspector on page with 'multipart/x-mixed-replace' main resource
https://bugs.webkit.org/show_bug.cgi?id=143979
<rdar://problem/20594948>

Reviewed by Timothy Hatcher.

InspectorDOMAgent::m_document was updated only once per load, from
FrameLoader::dispatchDidCommitLoad(). However, dispatchDidCommitLoad()
is not called for follow-up multipart replacing loads. You can see this
from the following check in DocumentLoader::commitData():
    if (!isMultipartReplacingLoad())
        frameLoader()->receivedFirstData();

As a result, in the case of a 'multipart/x-mixed-replace' main resource
InspectorDOMAgent::m_document would quickly get outdated as we create
a new Document for each replacing load. This would lead to Web Inspector
code using a Document without frame and causing crashes.

This patch calls InspectorInstrumentation::frameDocumentUpdated() from
Frame::setDocument() so that InspectorDOMAgent::m_document is always up
to date.

No new tests, not easily testable as the main resource needs to be
'multipart/x-mixed-replace'.

* dom/Document.cpp:
(WebCore::Document::applyXSLTransform):
Stop calling InspectorInstrumentation::frameDocumentUpdated() here as
XSLTProcessor::createDocumentFromSource() will call Frame::setDocument()
and frameDocumentUpdated() will be called there.

* page/Frame.cpp:
(WebCore::Frame::setDocument):
Call InspectorInstrumentation::frameDocumentUpdated() to make sure
InspectorDOMAgent::m_document gets updated.

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

5 years agoWeb Inspector: Unify PrettyPrinting Tool and UserInterface resources
commit-queue@webkit.org [Tue, 21 Apr 2015 04:35:43 +0000 (04:35 +0000)]
Web Inspector: Unify PrettyPrinting Tool and UserInterface resources
https://bugs.webkit.org/show_bug.cgi?id=143969

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-20
Reviewed by Timothy Hatcher.

Have the PrettyPrinting tool just use the CodeMirror and WebInspector
resources from the relative UserInterface directory. This avoids
having duplicate resources in the tree which offered few advantages.

* Scripts/update-pretty-printer.rb: Removed.
* Tools/PrettyPrinting/CodeMirrorFormatters.js: Removed.
* Tools/PrettyPrinting/Formatter.js: Removed.
* Tools/PrettyPrinting/FormatterContentBuilder.js: Removed.
* Tools/PrettyPrinting/codemirror.css: Removed.
* Tools/PrettyPrinting/codemirror.js: Removed.
* Tools/PrettyPrinting/css.js: Removed.
* Tools/PrettyPrinting/index.html:
* Tools/PrettyPrinting/javascript.js: Removed.

* UserInterface/Views/CodeMirrorFormatters.js:
Fix style issues.

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

5 years ago[EFL] Unreviewed, update test expectations and rebaseline failing tests.
jinwoo7.song@samsung.com [Tue, 21 Apr 2015 03:48:02 +0000 (03:48 +0000)]
[EFL] Unreviewed, update test expectations and rebaseline failing tests.

Remove some expected failures from tests that are passing.
Also rebaselined failing tests.

* platform/efl/TestExpectations:
* platform/efl/fast/dom/Element/getClientRects-expected.txt: Added. Rebaselined after r177774.
* platform/efl/fast/dom/Range/getClientRects-expected.txt: Ditto.
* platform/efl/fast/line-grid/line-align-right-edges-expected.png: Rebaselined after r177128.
* platform/efl/fast/line-grid/line-align-right-edges-expected.txt: Ditto.
* platform/efl/fast/table/022-expected.png: Rebaselined after r177774.
* platform/efl/fast/table/022-expected.txt: Added. Ditto.
* platform/efl/fast/text/wbr-pre-expected.png: Rebaselined after r177774.
* platform/efl/fast/text/wbr-pre-expected.txt: Added. Ditto.

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

5 years agoPerf dashboard should have UI to set status on analysis tasks
rniwa@webkit.org [Tue, 21 Apr 2015 02:48:22 +0000 (02:48 +0000)]
Perf dashboard should have UI to set status on analysis tasks
https://bugs.webkit.org/show_bug.cgi?id=143977

Reviewed by Chris Dumez.

Added the UI to set the result of an analysis task to 'progression', 'regression', 'unchanged', and 'inconclusive'
as well as a boolean indicating whether creating the analysis task was the right thing to do or not.
The latter will be a useful metric once we start automatically creating analysis tasks.

* init-database.sql: Added two columns to analysis_tasks table.
* public/api/analysis-tasks.php: Include the added columns in the JSON.
* public/include/db.php:
(Database::to_database_boolean): Added.
* public/include/json-header.php:
(require_match_one_of_values): Added.
* public/privileged-api/update-analysis-task.php: Added. Updates 'result' and 'needed' values of an analysis task.
(main):
* public/v2/analysis.js:
(App.AnalysisTask.result): Added.
(App.AnalysisTask.needed): Added. We don't use DS.attr('boolean') here since that would coerce null into false
and we want to differentiate null from false in order to differentiate the null-ness of the value.
(App.AnalysisTask.saveStatus): Added.
(App.AnalysisTask.statusLabel): Use 'result' as the label if it's set and all build requests have been processed.
* public/v2/app.css:
* public/v2/app.js:
(App.AnalysisTaskController.analysisResultOptions): Added.
(App.AnalysisTaskController.shouldNotHaveBeenCreated): Added.
(App.AnalysisTaskController.needsFeedback): Added. Show the checkbox to indicate the analysis task should not have
been created if 'no change' is selected.
(App.AnalysisTaskController._updateChosenAnalysisResult): Added.
(App.AnalysisTaskController.actions.saveStatus): Added.
* public/v2/index.html: Extracted a partial template for updating the bug numbers. Also added the UI to update
'result' and 'needed' values of the analysis task.

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

5 years agoPhantomNewObject should be marked NodeMustGenerate
commit-queue@webkit.org [Tue, 21 Apr 2015 02:37:40 +0000 (02:37 +0000)]
PhantomNewObject should be marked NodeMustGenerate
https://bugs.webkit.org/show_bug.cgi?id=143974

Patch by Basile Clement <basile_clement@apple.com> on 2015-04-20
Reviewed by Filip Pizlo.

* dfg/DFGNodeType.h: Mark PhantomNewObject as NodeMustGenerate

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

5 years agoFix compilation error for prepare-ChangeLog running with Perl version < v5.18.2.
matthew_hanson@apple.com [Tue, 21 Apr 2015 01:48:18 +0000 (01:48 +0000)]
Fix compilation error for prepare-ChangeLog running with Perl version < v5.18.2.

Unreviewed build fix.

The any function was added to List::Utils between Perl v5.16.2 and Perl v5.18.2.
However, it has been exposed by List::MoreUtils since its inception. This patch uses
the any function exposed by List::MoreUtils for greater compatibility.

* Scripts/prepare-ChangeLog:
Use any from List::MoreUtils instead of List::Utils, as List::MoreUtils exposes
the any function in all of versions of Perl used by our infrastructure.

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