msaboff@apple.com [Fri, 27 Oct 2017 00:31:50 +0000 (00:31 +0000)]
REGRESSION(r222601): We fail to properly backtrack into a sub pattern of a parenthesis with non-zero minimum
https://bugs.webkit.org/show_bug.cgi?id=178890
Reviewed by Keith Miller.
JSTests:
New regression test.
* stress/regress-178890.js: Added.
Source/JavaScriptCore:
We need to let a contained subpattern backtrack before declaring that the containing
parenthesis doesn't match. If the subpattern fails to match backtracking, then we
can check to see if we trying to backtrack below the minimum match count.
* yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::backtrackParentheses):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224072
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Thu, 26 Oct 2017 23:59:59 +0000 (23:59 +0000)]
Move WKWebViewConfiguration validation to WKWebView construction
https://bugs.webkit.org/show_bug.cgi?id=178840
Reviewed by Tim Horton.
Source/WebKit:
I'm trying to remove WKWebViewConfigurationInternal methods so I can make WKWebViewConfiguration
a wrapper around an APIObject like all the other API objects. A small step towards making this easier
is to remove the unnecessary method _validate and move its logic to its one callsite. I added an API test
that ensures no change in behavior.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _validate]): Deleted.
* UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
Tools:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm: Added.
(TEST):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224071
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 26 Oct 2017 23:50:35 +0000 (23:50 +0000)]
importScripts in service worker should use ServiceWorkersMode::None
https://bugs.webkit.org/show_bug.cgi?id=178888
Patch by Youenn Fablet <youenn@apple.com> on 2017-10-26
Reviewed by Chris Dumez.
Source/WebCore:
Test: http/tests/workers/service/service-worker-importScript.html
Made sure ServiceWorkersMode::None is used for loading scripts in service workers as we do not support foreign fetch.
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously):
LayoutTests:
* http/tests/workers/service/resources/service-worker-importScript-worker.js: Added.
* http/tests/workers/service/resources/service-worker-importScript.js: Added.
* http/tests/workers/service/service-worker-importScript-expected.txt: Added.
* http/tests/workers/service/service-worker-importScript.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224070
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 26 Oct 2017 23:44:27 +0000 (23:44 +0000)]
Unreviewed, cleanup changelogs.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224069
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
megan_gardner@apple.com [Thu, 26 Oct 2017 23:42:37 +0000 (23:42 +0000)]
Remove unneeded block selection calculation code
https://bugs.webkit.org/show_bug.cgi?id=178889
Reviewed by Tim Horton.
Removing more block selection code. Much of this should have been removed
before, as the only things that were using these functions were removed in the
last patch. Also remove the code decided if you should move to block mode or not,
as the answer now is always NO.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateSelectionWithTouches):
(WebKit::WebPage::rangeForBlockAtPoint): Deleted.
(WebKit::distanceBetweenRectsForPosition): Deleted.
(WebKit::rectsEssentiallyTheSame): Deleted.
(WebKit::unionDOMRanges): Deleted.
(WebKit::computeEdgeCenter): Deleted.
(WebKit::WebPage::expandedRangeFromHandle): Deleted.
(WebKit::WebPage::contractedRangeFromHandle): Deleted.
(WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle): Deleted.
(WebKit::WebPage::switchToBlockSelectionAtPoint): Deleted.
(WebKit::WebPage::shouldSwitchToBlockModeForHandle): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224068
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
webkit@devinrousso.com [Thu, 26 Oct 2017 23:41:23 +0000 (23:41 +0000)]
Web Inspector: Canvas Tab: canvases overview should support navigation via keyboard
https://bugs.webkit.org/show_bug.cgi?id=178800
<rdar://problem/
35175856>
Reviewed by Brian Burg.
Create a KeyboardShorcut for each of the following:
- Up: selects the previous canvas in the selected column
- Down: selects the next canvas in the selected column
- Right: selects the next canvas in the selected row
- Left: selects the previous canvas in the selected row
- Space: toggle recording of the selected canvas
- Shift+Space: toggle single-frame recording of the selected canvas
The calculation for selected row/colum is based on the `offsetWidth` of the parent element
and the selected item's content view element. Since this view uses a flexbox, all of the
items are expected to have the same dimensions, meaning that this value is uniform. The
intended functionality is that of a spreadsheet, where pressing pressing left/right will
never change the selected row and up/down will never change the selected column.
* UserInterface/Views/CanvasOverviewContentView.css:
(.content-view.canvas-overview):
(.content-view.canvas-overview .content-view.canvas):
Move margin value to a CSS variable so that it can be easily retrieved via JavaScript.
* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView):
(WI.CanvasOverviewContentView.prototype.contentViewAdded):
(WI.CanvasOverviewContentView.prototype.contentViewRemoved):
(WI.CanvasOverviewContentView.prototype.attached):
(WI.CanvasOverviewContentView.prototype.detached):
(WI.CanvasOverviewContentView.prototype.get _itemMargin):
(WI.CanvasOverviewContentView.prototype._changeSelectedItemVertically):
(WI.CanvasOverviewContentView.prototype._changeSelectedItemHorizontally):
(WI.CanvasOverviewContentView.prototype._updateNavigationItems):
(WI.CanvasOverviewContentView.prototype._handleUp):
(WI.CanvasOverviewContentView.prototype._handleRight):
(WI.CanvasOverviewContentView.prototype._handleDown):
(WI.CanvasOverviewContentView.prototype._handleLeft):
(WI.CanvasOverviewContentView.prototype._handleSpace):
(WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange):
Drive-by: call `_updateNavigationItems` whenever an item is added/removed so that if there
are no items the navigation items cannot be clicked.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224067
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 26 Oct 2017 23:37:32 +0000 (23:37 +0000)]
Implement ServiceWorkerContainer getRegistration
https://bugs.webkit.org/show_bug.cgi?id=178882
Unreviewed.
Patch by Youenn Fablet <youenn@apple.com> on 2017-10-26
* TestExpectations: Skipping service worker tests until they can produce results.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224066
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mmaxfield@apple.com [Thu, 26 Oct 2017 23:32:10 +0000 (23:32 +0000)]
Demonstrate a possible structure of the WebGPU API
https://bugs.webkit.org/show_bug.cgi?id=178874
Reviewed by Dean Jackson.
Over the past few weeks, we've been putting together an example showing that a WebGPU API
which has implicit barriers can work on all three low-level graphics APIs. We've implemented
it on top of Vulkan first, because this is the API which has the strictest requirements and
is most difficult to use.
With this API, this is a valid WebGPU snippet:
auto device = WebGPU::Device::create(hInstance, hWnd);
auto& commandQueue = device->getCommandQueue();
auto& renderState = device->getRenderState(vertexShader, "main", fragmentShader, "main", { }, { }, { }, nullptr);
… later, in the draw() function …
auto renderPass = commandQueue->createRenderPass(nullptr);
renderPass->setRenderState(renderState);
renderPass->setViewport(0, 0, width, height);
renderPass->setScissorRect(0, 0, width, height);
renderPass->draw(3);
commandQueue->commitRenderPass(std::move(renderPass));
commandQueue->present();
This snippet doesn’t hook up any vertex attributes or resources, which means the vertex
shader has to say something like ({vec4(…), vec4(…), vec4(…)})[gl_VertexIndex]. It also
passes in “nullptr” when creating the render pass, which means “render to the screen, rather
than to a frame buffer.” You can also see that it doesn’t attach any resources to the draw
call.
In Direct3D 12 and Vulkan, resources are bound in sets, rather than individually. For
example, a set might contain two uniform buffers, a texture, and another uniform buffer. At
draw time, you swap in whole sets of resources with a single call. A shader invocation can
access a collection of sets. Because all shader resource accesses are indirected through
these sets, the shape of these sets needs to be supplied at the time you compile the render
state. Here is a snippet which bounds a single set which contains a uniform buffer and a
texture:
auto buffer = device->getBuffer(bufferInitialContents);
auto texture = device->getTexture(buffer width, height, WebGPU::PixelFormat::RGBA8, textureInitialContents);
// One resource set, which holds a single uniform buffer object and a single texture
auto& renderState = device->getRenderState(vertexShader, "main", fragmentShader, "main", { }, { }, { { WebGPU::ResourceType::UniformBufferObject, WebGPU::ResourceType::Texture } }, nullptr);
… later, in the draw() function …
auto renderPass = commandQueue->createRenderPass(nullptr);
renderPass->setRenderState(renderState);
renderPass->setResources(0, { WebGPU::UniformBufferObjectReference(buffer.get()), WebGPU::TextureReference(texture.get()) });
…
renderPass->draw(3);
commandQueue->commitRenderPass(std::move(renderPass));
commandQueue->present();
The first argument to the setResources() call identifies which set to populate with the supplied resources.
One tenant of the low-level graphics APIs is that, if you’ve enabled double buffering (or
triple buffering), the GPU is executing one frame at the same time you are recording the
next frame. This often means that you need duplicate resources so the CPU and GPU don’t step
on each other’s toes. However, platforms have platform-specific requirements about whether
or not they can be double / triple buffered, and we don’t want to expose this to the Web for
fear of badly-authored programs.
To solve this, resources are reference counted, and the return type of getBuffer() is an
RAII type called BufferHolder which increments and decrements the reference count
automatically. The reference count is also incremented and decremented when the GPU is using
the resource in a Pass. When the reference count reaches 0, the resource isn’t destroyed;
instead, it’s simply moved to a “free list” which getBuffer() may pull from. Therefore,
applications don’t need to know whether the frame buffer is double buffered or triple
buffered; they can just getBuffer() each frame, and the correct number of buffers will be
created and recycled.
{
auto buffer = device->getBuffer(bufferSize); // These get recycled
… populate the buffer …
auto renderPass = commandQueue->createRenderPass(nullptr);
renderPass->setRenderState(renderState);
renderPass->setResources(0, { WebGPU::UniformBufferObjectReference(buffer.get()) });
…
renderPass->draw(…);
commandQueue->commitRenderPass(std::move(renderPass));
}
commandQueue->present();
In Direct3D and Vulkan, vertex buffers and index buffers are not part of the resource sets
mentioned above. Instead, you tell the render state about the shape of the vertex and index
buffers, and you swap them out independently in the draw loop. Metal and Vulkan have almost
identical API to specify this shape of the vertex buffers, so I’ve mostly copied it. In this
example, we have two vertex attributes, a vec2 and a vec3, which both come from the same
buffer:
// { Attribute format, offset within stride, buffer to pull from }
std::vector<WebGPU::RenderState::VertexAttribute> vertexAttributes = { {WebGPU::RenderState::VertexFormat::Float2, 0, 0}, {WebGPU::RenderState::VertexFormat::Float3, sizeof(float) * 2, 0} };
// A single vertex buffer, with a stride of 5 floats
auto& renderState = device->getRenderState(vertexShader, "main", fragmentShader, "main", { sizeof(float) * 5 }, vertexAttributes, resourceTypes, nullptr);
… later, in the draw() function …
auto renderPass = commandQueue->createRenderPass(nullptr);
renderPass->setRenderState(renderState);
renderPass->setVertexAttributeBuffers({ vertexBuffer.get() }); // The one vertex buffer which both attributes pull from
renderPass->setResources(…);
…
renderPass->draw(…);
commandQueue->commitRenderPass(std::move(renderPass));
commandQueue->present();
You can also tell the RenderState about how many render targets you have and their formats,
and then when you create the RenderPass, you specify the specific textures you want to
render into.
std::vector<WebGPU::PixelFormat> colorPixelFormats = { WebGPU::PixelFormat::RGBA8, WebGPU::PixelFormat::RGBA8 }; // Two render targets, with these formats
auto& renderState = device->getRenderState(vertexShader, "main", fragmentShader, "main", vertexBufferStrides, vertexAttributes, resourceTypes, &colorPixelFormats);
… later, in the draw() function …
std::vector<std::reference_wrapper<WebGPU::Texture>> destinationTextures = { texture1->get(), texture2->get() };
auto renderPass = commandQueue->createRenderPass(&destinationTextures);
renderPass->setRenderState(renderState);
…
renderPass->draw(…);
commandQueue->commitRenderPass(std::move(renderPass));
// Now, draw one of the textures to the screen. Note that no synchronization is necessary here!
auto renderPass = commandQueue->createRenderPass(nullptr);
renderPass->setRenderState(renderState2);
renderPass->setResources(0, { WebGPU:: TextureReference(texture1.get()) });
…
renderPass->draw(…);
commandQueue->commitRenderPass(std::move(renderPass));
commandQueue->present();
Just like how in Metal has Render Encoders and Compute Encoders, WebGPU has RenderPasses
and ComputePasses.
auto& computeState = device->getComputeState(computeShader, "main", resourceTypes);
…
auto computePass = commandQueue->createComputePass();
computePass->setComputeState(computeState);
computePass->setResources(0, resources);
computePass->dispatch(width, height, depth);
commandQueue->commitComputePass(std::move(computePass));
// Now, draw the resources we just computed. Note that no synchronization is necessary here!
auto renderPass = commandQueue->createRenderPass(nullptr);
renderPass->setRenderState(renderState);
renderPass->setResources(0, resources });
…
renderPass->draw(…);
commandQueue->commitRenderPass(std::move(renderPass));
commandQueue->present();
There are also two other types of passes: one that corresponds to a Metal blit encoder, and
one that allows the CPU to change the contents of GPU buffers and textures. This last kind
of pass is a little interesting: you can’t just change the contents of a buffer at any time
you feel like it, because that resource might be in use by the GPU. Therefore, we need to do
the same kind of synchronization that we already do at render pass boundaries.
In addition, both Vulkan and Direct3D have a concept of a memory heap. A resource might
exist inside a heap which is fast, but invisible from the CPU, or in a heap which is slow,
but visible by the CPU. Certain operations are not possible from some types of images (e.g.
non-tiled textures may not be able to be sampled from). The usual way to get around this
problem is to have two resources: a slow staging resource which the CPU can see, and a fast
resource which the CPU can’t see. Uploading data is a two-pass algorithm, where the CPU
memcpy()s into the slow staging resource, and then a blit command is enqueued on the GPU to
copy the contents of the staging resource to the real resource. This requires that the
upload have access to the commandQueue so it can possibly enqueue a blit between the staging
and real resources. Therefore, a pass is the right level of abstraction for these facilities.
std::queue<boost::unique_future<std::vector<uint8_t>>> futureQueue; // Promises for data downloads from the GPU
… later, in the draw() function …
// See if any of the previously-enqueued downloads are finished
while (!futureQueue.empty() && futureQueue.front(). has_value()) {
std::vector<uint8_t>& data = futureQueue.front().get();
// Use the downloaded data
futureQueue.pop();
}
…
auto hostAccessPass = commandQueue->createHostAccessPass();
hostAccessPass->overwriteBuffer(buffer->get(), bufferContents); // Upload data to a resource
futureQueue.emplace(hostAccessPass->getBufferContents(buffer->get()));
commandQueue->commitHostAccessPass(std::move(hostAccessPass));
You can also issue copy commands between resources entirely on the GPU:
auto blitPass = commandQueue->createBlitPass();
blitPass->copyTexture(source->get(), destination->get(), sourceX, sourceY, destinationX, destinationY, width, height);
commandQueue->commitBlitPass(std::move(blitPass));
* Scripts/webkitpy/style/checker.py:
* WebGPUAPIStructure/Example/Example.cpp: Added.
(readFile):
(drawWebGPU):
(wWinMain):
(MyRegisterClass):
(InitInstance):
(WndProc):
* WebGPUAPIStructure/Example/Example.h: Added.
* WebGPUAPIStructure/Example/Example.ico: Added.
* WebGPUAPIStructure/Example/Example.rc: Added.
* WebGPUAPIStructure/Example/Example.vcxproj: Added.
* WebGPUAPIStructure/Example/Example.vcxproj.filters: Added.
* WebGPUAPIStructure/Example/Example.vcxproj.user: Added.
* WebGPUAPIStructure/Example/resource.h: Added.
* WebGPUAPIStructure/Example/small.ico: Added.
* WebGPUAPIStructure/Example/stdafx.cpp: Added.
* WebGPUAPIStructure/Example/stdafx.h: Added.
* WebGPUAPIStructure/Example/targetver.h: Added.
* WebGPUAPIStructure/WebGPU-Common/WebGPU-Common.vcxproj: Added.
* WebGPUAPIStructure/WebGPU-Common/WebGPU-Common.vcxproj.filters: Added.
* WebGPUAPIStructure/WebGPU-Common/WebGPU.cpp: Added.
(WebGPU::BufferHolder::BufferHolder):
(WebGPU::BufferHolder::~BufferHolder):
(WebGPU::TextureHolder::TextureHolder):
(WebGPU::TextureHolder::~TextureHolder):
(WebGPU::SamplerHolder::SamplerHolder):
(WebGPU::SamplerHolder::~SamplerHolder):
* WebGPUAPIStructure/WebGPU-Common/WebGPU.h: Added.
(WebGPU::Queue::~Queue):
(WebGPU::RenderState::~RenderState):
(WebGPU::ComputeState::~ComputeState):
(WebGPU::Buffer::~Buffer):
(WebGPU::Texture::~Texture):
(WebGPU::Sampler::~Sampler):
(WebGPU::TextureReference::TextureReference):
(WebGPU::TextureReference::get const):
(WebGPU::SamplerReference::SamplerReference):
(WebGPU::SamplerReference::get const):
(WebGPU::UniformBufferObjectReference::UniformBufferObjectReference):
(WebGPU::UniformBufferObjectReference::get const):
(WebGPU::ShaderStorageBufferObjectReference::ShaderStorageBufferObjectReference):
(WebGPU::ShaderStorageBufferObjectReference::get const):
(WebGPU::RenderPass::~RenderPass):
(WebGPU::ComputePass::~ComputePass):
(WebGPU::BlitPass::~BlitPass):
(WebGPU::HostAccessPass::~HostAccessPass):
(WebGPU::BufferHolder::get):
(WebGPU::TextureHolder::get):
(WebGPU::SamplerHolder::get):
(WebGPU::Device::~Device):
* WebGPUAPIStructure/WebGPU-Vulkan/BlitPassImpl.cpp: Added.
(WebGPU::BlitPassImpl::BlitPassImpl):
(WebGPU::BlitPassImpl::copyTexture):
* WebGPUAPIStructure/WebGPU-Vulkan/BlitPassImpl.h: Added.
* WebGPUAPIStructure/WebGPU-Vulkan/BufferImpl.cpp: Added.
(WebGPU::BufferImpl::BufferImpl):
(WebGPU::BufferImpl::decrementReferenceCount):
* WebGPUAPIStructure/WebGPU-Vulkan/BufferImpl.h: Added.
(WebGPU::BufferImpl::getBuffer const):
(WebGPU::BufferImpl::getDeviceMemory const):
(WebGPU::BufferImpl::incrementReferenceCount):
(WebGPU::BufferImpl::getLength const):
* WebGPUAPIStructure/WebGPU-Vulkan/ComputePassImpl.cpp: Added.
(WebGPU::ComputePassImpl::ComputePassImpl):
(WebGPU::ComputePassImpl::setComputeState):
(WebGPU::ComputePassImpl::setResources):
(WebGPU::ComputePassImpl::dispatch):
* WebGPUAPIStructure/WebGPU-Vulkan/ComputePassImpl.h: Added.
* WebGPUAPIStructure/WebGPU-Vulkan/ComputeStateImpl.cpp: Added.
(WebGPU::ComputeStateImpl::ComputeStateImpl):
* WebGPUAPIStructure/WebGPU-Vulkan/ComputeStateImpl.h: Added.
(WebGPU::ComputeStateImpl::getPipeline const):
(WebGPU::ComputeStateImpl::getPipelineLayout const):
(WebGPU::ComputeStateImpl::getDescriptorSetLayouts const):
* WebGPUAPIStructure/WebGPU-Vulkan/DeviceImpl.cpp: Added.
(WebGPU::Device::create):
(WebGPU::convertPixelFormat):
(WebGPU::convertFormat):
(WebGPU::debugReport):
(WebGPU::DeviceImpl::DeviceImpl):
(WebGPU::DeviceImpl::getCommandQueue):
(WebGPU::DeviceImpl::prepareShader):
(WebGPU::DeviceImpl::createPipelineLayout):
(WebGPU::DeviceImpl::createCompatibleRenderPass):
(WebGPU::convertVertexFormat):
(WebGPU::DeviceImpl::getRenderState):
(WebGPU::DeviceImpl::getComputeState):
(WebGPU::DeviceImpl::getBuffer):
(WebGPU::DeviceImpl::returnBuffer):
(WebGPU::DeviceImpl::getTexture):
(WebGPU::DeviceImpl::returnTexture):
(WebGPU::DeviceImpl::getSampler):
(WebGPU::DeviceImpl::returnSampler):
(WebGPU::DeviceImpl::~DeviceImpl):
* WebGPUAPIStructure/WebGPU-Vulkan/DeviceImpl.h: Added.
(WebGPU::DeviceImpl::UniqueDebugReportCallbackEXT::UniqueDebugReportCallbackEXT):
(WebGPU::DeviceImpl::UniqueDebugReportCallbackEXT::operator=):
(WebGPU::DeviceImpl::UniqueDebugReportCallbackEXT::~UniqueDebugReportCallbackEXT):
(WebGPU::DeviceImpl::UniqueDebugReportCallbackEXT::destroy):
(WebGPU::DeviceImpl::TextureParameters::operator== const):
(WebGPU::DeviceImpl::TextureParametersHash::operator() const):
* WebGPUAPIStructure/WebGPU-Vulkan/HostAccessPassImpl.cpp: Added.
(WebGPU::HostAccessPassImpl::HostAccessPassImpl):
(WebGPU::HostAccessPassImpl::overwriteBuffer):
(WebGPU::HostAccessPassImpl::getBufferContents):
(WebGPU::HostAccessPassImpl::execute):
* WebGPUAPIStructure/WebGPU-Vulkan/HostAccessPassImpl.h: Added.
(WebGPU::HostAccessPassImpl::getFinishedEvent const):
* WebGPUAPIStructure/WebGPU-Vulkan/PassImpl.cpp: Added.
(WebGPU::PassImpl::PassImpl):
(WebGPU::ResourceVisitor::operator()):
(WebGPU::ResourceVisitor::getBindings const):
(WebGPU::ResourceVisitor::releaseWriteDescriptorSets):
(WebGPU::ResourceVisitor::getDescriptorImageInfos const):
(WebGPU::ResourceVisitor::getDescriptorBufferInfos const):
(WebGPU::ResourceVisitor::getBuffers const):
(WebGPU::ResourceVisitor::getTextures const):
(WebGPU::ResourceVisitor::getSamplers const):
(WebGPU::ResourceVisitor::getImageCount const):
(WebGPU::ResourceVisitor::getSamplerCount const):
(WebGPU::ResourceVisitor::getUniformBufferCount const):
(WebGPU::ResourceVisitor::getStorageBufferCount const):
(WebGPU::PassImpl::setResources):
(WebGPU::PassImpl::insertBuffer):
(WebGPU::PassImpl::insertTexture):
(WebGPU::PassImpl::insertSampler):
* WebGPUAPIStructure/WebGPU-Vulkan/PassImpl.h: Added.
(WebGPU::PassImpl::getCommandBuffer const):
(WebGPU::PassImpl::iterateBuffers):
(WebGPU::PassImpl::iterateTextures):
(WebGPU::PassImpl::ResourceReference::ResourceReference):
(WebGPU::PassImpl::ResourceReference::~ResourceReference):
(WebGPU::PassImpl::ResourceReference::operator=):
(WebGPU::PassImpl::ResourceReference::operator== const):
(WebGPU::PassImpl::ResourceReference::get const):
(WebGPU::PassImpl::ResourceReference::release):
(WebGPU::PassImpl::ResourceReferenceHash::operator() const):
* WebGPUAPIStructure/WebGPU-Vulkan/QueueImpl.cpp: Added.
(WebGPU::QueueImpl::QueueImpl):
(WebGPU::QueueImpl::prepareCurrentFrame):
(WebGPU::QueueImpl::createSpecificRenderPass):
(WebGPU::QueueImpl::createFramebuffer):
(WebGPU::QueueImpl::createRenderPass):
(WebGPU::QueueImpl::commitRenderPass):
(WebGPU::QueueImpl::createComputePass):
(WebGPU::QueueImpl::commitComputePass):
(WebGPU::QueueImpl::createBlitPass):
(WebGPU::QueueImpl::commitBlitPass):
(WebGPU::QueueImpl::createHostAccessPass):
(WebGPU::QueueImpl::commitHostAccessPass):
(WebGPU::QueueImpl::present):
(WebGPU::QueueImpl::commitPass):
(WebGPU::QueueImpl::synchronizeResources):
(WebGPU::QueueImpl::~QueueImpl):
* WebGPUAPIStructure/WebGPU-Vulkan/QueueImpl.h: Added.
* WebGPUAPIStructure/WebGPU-Vulkan/RenderPassImpl.cpp: Added.
(WebGPU::RenderPassImpl::RenderPassImpl):
(WebGPU::RenderPassImpl::setRenderState):
(WebGPU::RenderPassImpl::setVertexAttributeBuffers):
(WebGPU::RenderPassImpl::setResources):
(WebGPU::RenderPassImpl::setViewport):
(WebGPU::RenderPassImpl::setScissorRect):
(WebGPU::RenderPassImpl::draw):
* WebGPUAPIStructure/WebGPU-Vulkan/RenderPassImpl.h: Added.
* WebGPUAPIStructure/WebGPU-Vulkan/RenderStateImpl.cpp: Added.
(WebGPU::RenderStateImpl::RenderStateImpl):
* WebGPUAPIStructure/WebGPU-Vulkan/RenderStateImpl.h: Added.
(WebGPU::RenderStateImpl::getPipeline const):
(WebGPU::RenderStateImpl::getPipelineLayout const):
(WebGPU::RenderStateImpl::getDescriptorSetLayouts const):
* WebGPUAPIStructure/WebGPU-Vulkan/SamplerImpl.cpp: Added.
(WebGPU::SamplerImpl::SamplerImpl):
(WebGPU::SamplerImpl::decrementReferenceCount):
* WebGPUAPIStructure/WebGPU-Vulkan/SamplerImpl.h: Added.
(WebGPU::SamplerImpl::getSampler):
(WebGPU::SamplerImpl::incrementReferenceCount):
(WebGPU::SamplerImpl::getFilter):
(WebGPU::SamplerImpl::getMipmapMode):
(WebGPU::SamplerImpl::getAddressMode):
* WebGPUAPIStructure/WebGPU-Vulkan/TextureImpl.cpp: Added.
(WebGPU::TextureImpl::TextureImpl):
(WebGPU::TextureImpl::decrementReferenceCount):
* WebGPUAPIStructure/WebGPU-Vulkan/TextureImpl.h: Added.
(WebGPU::TextureImpl::getImage const):
(WebGPU::TextureImpl::getImageView const):
(WebGPU::TextureImpl::getFormat const):
(WebGPU::TextureImpl::incrementReferenceCount):
(WebGPU::TextureImpl::getWidth const):
(WebGPU::TextureImpl::getHeight const):
(WebGPU::TextureImpl::getTransferredToGPU const):
(WebGPU::TextureImpl::setTransferredToGPU):
* WebGPUAPIStructure/WebGPU-Vulkan/WebGPU-Vulkan.vcxproj: Added.
* WebGPUAPIStructure/WebGPU-Vulkan/WebGPU-Vulkan.vcxproj.filters: Added.
* WebGPUAPIStructure/WebGPU.sln: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224065
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
nvasilyev@apple.com [Thu, 26 Oct 2017 23:32:04 +0000 (23:32 +0000)]
Web Inspector: Styles Redesign: Make "Style Attribute" text darker and non-focusable
https://bugs.webkit.org/show_bug.cgi?id=178837
Reviewed by Brian Burg.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
(.spreadsheet-css-declaration .selector.style-attribute):
Use the same shade of gray as in the "Inherited from" sections.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
Only editable selectors should be focusable.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224064
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 26 Oct 2017 23:30:00 +0000 (23:30 +0000)]
Call setFullscreenClient on iOS.
https://bugs.webkit.org/show_bug.cgi?id=178089
Patch by Jeremy Jones <jeremyj@apple.com> on 2017-10-26
Reviewed by Simon Fraser.
This was only being set for MacOS.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224063
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 26 Oct 2017 23:28:31 +0000 (23:28 +0000)]
[Payment Request] Restrict API use to secure, same-origin frames
https://bugs.webkit.org/show_bug.cgi?id=178887
Patch by Andy Estes <aestes@apple.com> on 2017-10-26
Reviewed by Tim Horton.
Reuse the access checks from Apple Pay to restrict PaymentRequest API usage to secure frames
in the same origin as the main frame.
Progresses active-document-cross-origin.https.sub.html and
active-document-same-origin.https.html from web-platform-tests. Regresses basic.https.html
since the allowpaymentrequest <iframe> attribute is not yet implemented.
* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::create):
(WebCore::ApplePaySession::supportsVersion):
(WebCore::ApplePaySession::canMakePayments):
(WebCore::ApplePaySession::canMakePaymentsWithActiveCard):
(WebCore::ApplePaySession::openPaymentSetup):
(WebCore::isSecure): Deleted.
(WebCore::canCallApplePaySessionAPIs): Deleted.
* Modules/applepay/PaymentSession.cpp: Added.
(WebCore::isSecure):
(WebCore::PaymentSession::canCreateSession):
* Modules/applepay/PaymentSession.h:
* Modules/paymentrequest/PaymentHandler.cpp:
(WebCore::PaymentHandler::canCreateSession):
* Modules/paymentrequest/PaymentHandler.h:
* Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::create):
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224062
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aestes@apple.com [Thu, 26 Oct 2017 23:25:41 +0000 (23:25 +0000)]
[Payment Request] Restrict API use to secure, same-origin frames
https://bugs.webkit.org/show_bug.cgi?id=178887
Reviewed by Tim Horton.
LayoutTests/imported/w3c:
The allowpaymentrequest <iframe> attribute is not yet implemented, so the regression in basic.https.html is expected.
* web-platform-tests/payment-request/allowpaymentrequest/active-document-cross-origin.https.sub-expected.txt:
* web-platform-tests/payment-request/allowpaymentrequest/active-document-same-origin.https-expected.txt:
* web-platform-tests/payment-request/allowpaymentrequest/basic.https-expected.txt:
Source/WebCore:
Reuse the access checks from Apple Pay to restrict PaymentRequest API usage to secure frames
in the same origin as the main frame.
Progresses active-document-cross-origin.https.sub.html and
active-document-same-origin.https.html from web-platform-tests. Regresses basic.https.html
since the allowpaymentrequest <iframe> attribute is not yet implemented.
* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::create):
(WebCore::ApplePaySession::supportsVersion):
(WebCore::ApplePaySession::canMakePayments):
(WebCore::ApplePaySession::canMakePaymentsWithActiveCard):
(WebCore::ApplePaySession::openPaymentSetup):
(WebCore::isSecure): Deleted.
(WebCore::canCallApplePaySessionAPIs): Deleted.
* Modules/applepay/PaymentSession.cpp: Added.
(WebCore::isSecure):
(WebCore::PaymentSession::canCreateSession):
* Modules/applepay/PaymentSession.h:
* Modules/paymentrequest/PaymentHandler.cpp:
(WebCore::PaymentHandler::canCreateSession):
* Modules/paymentrequest/PaymentHandler.h:
* Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::create):
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224061
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 26 Oct 2017 22:57:29 +0000 (22:57 +0000)]
Add service worker handle fetch support for all subresource requests
https://bugs.webkit.org/show_bug.cgi?id=178769
Patch by Youenn Fablet <youenn@apple.com> on 2017-10-26
Reviewed by Chris Dumez.
Source/WebCore:
Test: http/tests/workers/service/image-fetch.html
Moving DocumentThreadableLoader logic to CachedResourceLoader to apply it for all resource loads.
Setting the selected service worker identifier for subresource only at the moment.
Testing is limited to images, future wpt tests should cover other subresource cases.
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::prepareFetch):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::setSelectedServiceWorkerIdentifierIfNeeded):
* loader/cache/CachedResourceRequest.h:
LayoutTests:
* http/tests/workers/service/image-fetch-expected.txt: Added.
* http/tests/workers/service/image-fetch.html: Added.
* http/tests/workers/service/resources/image-fetch-worker.js: Added.
(event.event.request.url.indexOf):
(event.event.request.url.endsWith):
* http/tests/workers/service/resources/image-fetch.js: Added.
(done):
(async.loadedImage):
(async.erroredImage):
(async.logStatus):
(async.test):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224059
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Thu, 26 Oct 2017 22:44:18 +0000 (22:44 +0000)]
NowPlayingInfo should contain a unique identifier
https://bugs.webkit.org/show_bug.cgi?id=178872
Reviewed by Jer Noble.
Source/WebCore:
Updated TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm.
* platform/audio/PlatformMediaSessionManager.h:
(WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingInfoUniqueIdentifier const): New.
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Ditto.
* platform/audio/mac/MediaSessionManagerMac.h:
* platform/audio/mac/MediaSessionManagerMac.mm:
(WebCore::MediaSessionManagerMac::updateNowPlayingInfo): Ditto. Don't leak CFString.
* platform/mac/MediaRemoteSoftLink.cpp: Softlink kMRMediaRemoteNowPlayingInfoUniqueIdentifier.
* platform/mac/MediaRemoteSoftLink.h:
Source/WebKit:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _requestActiveNowPlayingSessionInfo:]): Take a completion handler.
(-[WKWebView _requestActiveNowPlayingSessionInfo]): Deleted.
(-[WKWebView _handleActiveNowPlayingSessionInfoResponse:title:duration:elapsedTime:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestActiveNowPlayingSessionInfo): Ditto.
(WebKit::WebPageProxy::nowPlayingInfoCallback): Lookup and call completion handler.
(WebKit::WebPageProxy::handleActiveNowPlayingSessionInfoResponse const): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::handleActiveNowPlayingSessionInfoResponse): Deleted.
* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::handleActiveNowPlayingSessionInfoResponse): Deleted.
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::requestActiveNowPlayingSessionInfo): Take callback ID. Pass unique ID.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Tools:
* TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm:
(-[NowPlayingTestWebView hasActiveNowPlayingSession]): Use completion handler.
(TestWebKitAPI::TEST): Cleanup tests. Use new API.
(-[NowPlayingTestWebView waitForNowPlayingInfoToChange]): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224057
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 26 Oct 2017 22:42:41 +0000 (22:42 +0000)]
Unreviewed, iOS build fix.
* SourcesMac.txt:
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224056
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mark.lam@apple.com [Thu, 26 Oct 2017 22:36:04 +0000 (22:36 +0000)]
JSRopeString::RopeBuilder::append() should check for overflows.
https://bugs.webkit.org/show_bug.cgi?id=178385
<rdar://problem/
35027468>
Reviewed by Saam Barati.
JSTests:
* stress/regress-178385.js: Added.
Source/JavaScriptCore:
1. Made RopeString check for overflow like the Checked class does.
2. Added a missing overflow check in objectProtoFuncToString().
* runtime/JSString.cpp:
(JSC::JSRopeString::RopeBuilder<RecordOverflow>::expand):
(JSC::JSRopeString::RopeBuilder::expand): Deleted.
* runtime/JSString.h:
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncToString):
* runtime/Operations.h:
(JSC::jsStringFromRegisterArray):
(JSC::jsStringFromArguments):
Source/WTF:
* wtf/CheckedArithmetic.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224055
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 26 Oct 2017 22:25:06 +0000 (22:25 +0000)]
Move Mac specific files to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178883
Rubber-stamped by Tim Horton.
* SourcesCocoa.txt:
* SourcesMac.txt:
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224054
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Thu, 26 Oct 2017 22:02:38 +0000 (22:02 +0000)]
DidMoveToNewDocumentAssertionScope shouldn't be necessary
https://bugs.webkit.org/show_bug.cgi?id=178836
<rdar://problem/
35008876>
Reviewed by Antti Koivisto.
DidMoveToNewDocumentAssertionScope was introduced in r217972 to replace an existing assertion to make sure
Node::didMoveToNewDocument is always called by its overrides in Node's subclasses. However, we can ensure
better Node::didMoveToNewDocument is always called if we called it directly in Node::moveTreeToNewScope.
Because only subclasses of Element and ShadowRoot override Node::didMoveToNewDocument and we already have
a specialized code path to adopt a ShadowRoot to a new document, this refactoring eliminates the need for
having a virtual function on Node at all.
Hence this patch names Node::didMoveToNewDocument to Node::moveToNewDocument and makes it non-virtual,
splits ShadowRoot::didMoveToNewDocument into moveShadowRootToNewParentScope and moveShadowRootToNewDocument,
and removes DidMoveToNewDocumentAssertionScope completely.
No new tests since there should be no behavioral change.
* dom/Document.cpp:
(WebCore::Document::moveNodeIteratorsToNewDocumentSlowCase): Renamed from moveNodeIteratorsToNewDocument.
* dom/Document.h:
(WebCore::Document::moveNodeIteratorsToNewDocument): Inlined the check for emptiness of m_nodeIterators to
avoid keep calling moveNodeIteratorsToNewDocumentSlowCase on every single node getting moved.
* dom/Element.cpp:
(WebCore::Element::didMoveToNewDocument): Removed the call to Node::didMoveToNewDocument since this is the
base virtual function now.
* dom/Element.h:
* dom/Node.cpp:
(WebCore::DidMoveToNewDocumentAssertionScope::DidMoveToNewDocumentAssertionScope): Deleted.
(WebCore::DidMoveToNewDocumentAssertionScope::~DidMoveToNewDocumentAssertionScope): Deleted.
(WebCore::DidMoveToNewDocumentAssertionScope::didRecieveCall): Deleted.
(WebCore::moveNodeToNewDocument): Deleted.
(WebCore::Node::moveShadowTreeToNewDocument): Made this a member function of Node since it needs to call
moveNodeToNewDocument, which is private to Node.
(WebCore::Node::moveTreeToNewScope): Removed the release assert for the root node since the same check
exists inside traverseSubtreeToUpdateTreeScope. Also removed the release assertion for checking that
node's old document matches the old document since document() simply calls treeScope().documentScope()
and we're already release-asserting that the old scope of a node matches the old scope we know of.
We release-assert that the old tree scope's document didn't change after the traversal instead. Finally,
replaced a bunch of RELEASE_ASSERT with RELEASE_ASSERT_WITH_SECURITY_IMPLICATION.
(WebCore::Node::moveNodeToNewDocument): Renamed from didMoveToNewDocument. Moved the code related to
mutation observers inside hasRareData() check, and moved the the code to move event listeners inside
eventTargetData() check both for clarity, and avoid doing the work for every single node being moved.
Finally, call the old didMoveToNewDocument when "this" is an Element.
* dom/Node.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::moveShadowRootToNewParentScope): Added. Extracted from didMoveToNewDocument.
(WebCore::ShadowRoot::moveShadowRootToNewDocument): Renamed from didMoveToNewDocument. We now
release-assert that parent tree scope's document matches the new document if any.
* dom/ShadowRoot.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224053
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Thu, 26 Oct 2017 22:00:17 +0000 (22:00 +0000)]
LayoutTest http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=178828
Reviewed by Wenson Hsieh.
When the pasted content's iframe's body isn't available, wait for load event.
* http/tests/security/clipboard/resources/content-to-copy.html: Always wait for load event before notifying
the parent page that it had finish loading.
* http/tests/security/clipboard/resources/subdirectory/paste-html.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224052
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 26 Oct 2017 21:41:19 +0000 (21:41 +0000)]
Implement ServiceWorkerContainer getRegistration
https://bugs.webkit.org/show_bug.cgi?id=178882
Patch by Youenn Fablet <youenn@apple.com> on 2017-10-26
Reviewed by Chris Dumez.
Replace rejection promise by resolving the promise with a null value.
This helps in running WPT tests as WPT tests usually check for registered service workers before running tests.
For WTR, there should be no registered service worker anyway.
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::getRegistration):
* workers/service/ServiceWorkerContainer.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224051
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mmaxfield@apple.com [Thu, 26 Oct 2017 21:36:36 +0000 (21:36 +0000)]
[iOS] Update expected results for platform/ios/ios/fast/text/opticalFontWith*.html
https://bugs.webkit.org/show_bug.cgi?id=178885
Unreviewed.
* platform/ios/TestExpectations:
* platform/ios/platform/ios/ios/fast/text/opticalFontWithTextStyle-expected.txt:
* platform/ios/platform/ios/ios/fast/text/opticalFontWithWeight-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224050
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mmaxfield@apple.com [Thu, 26 Oct 2017 21:24:33 +0000 (21:24 +0000)]
[iOS] Update expected results for fast/text/international/complex-character-based-fallback.html
https://bugs.webkit.org/show_bug.cgi?id=178884
<rdar://problem/
33602192>
Unreviewed.
Test gardening.
* platform/ios/TestExpectations:
* platform/ios/fast/text/international/complex-character-based-fallback-expected.png: Added.
* platform/ios/fast/text/international/complex-character-based-fallback-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224049
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Thu, 26 Oct 2017 21:07:01 +0000 (21:07 +0000)]
Account for Mail’s WebMessageDocument class being renamed
https://bugs.webkit.org/show_bug.cgi?id=178881
Reviewed by Sam Weinig.
* editing/cocoa/HTMLConverter.mm:
(_WebMessageDocumentClass): Look up the class by its new name. No longer look it up by the
old old name, because TOT WebKit isn’t going to be used by versions of Mail that have that name.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224048
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aperez@igalia.com [Thu, 26 Oct 2017 20:57:08 +0000 (20:57 +0000)]
[WPE] Use proper shared object versioning for libWPEWebKit.so
https://bugs.webkit.org/show_bug.cgi?id=178878
Reviewed by Michael Catanzaro.
Move the CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE() to a new CMake include file,
and use it both for the GTK+ and WPE ports. Also add a SET_PROJECT_VERSION() macro to
unify setting the PROJECT_VERSION* family of variables.
* Source/cmake/OptionsGTK.cmake: Use the common macros imported from VersioningUtils.cmake.
* Source/cmake/OptionsWPE.cmake: Properly assign a shared object version to libWPEWebKit.so,
using the common macros from VersioningUtils.cmake.
* Source/cmake/VersioningUtils.cmake: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224047
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 26 Oct 2017 20:22:39 +0000 (20:22 +0000)]
Remove FrameView::serviceScriptedAnimations and Document::serviceScriptedAnimations
https://bugs.webkit.org/show_bug.cgi?id=178879
Patch by Antoine Quint <graouts@apple.com> on 2017-10-26
Reviewed by Dean Jackson.
There are no call sites for FrameView::serviceScriptedAnimations() and that method is the
only call site for Document::serviceScriptedAnimations(), so both can go.
* dom/Document.cpp:
(WebCore::Document::serviceScriptedAnimations): Deleted.
* dom/Document.h:
* page/FrameView.cpp:
(WebCore::FrameView::serviceScriptedAnimations): Deleted.
* page/FrameView.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224045
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 26 Oct 2017 20:22:13 +0000 (20:22 +0000)]
[MediaStream] Clear cached gUM prompt state
https://bugs.webkit.org/show_bug.cgi?id=178754
<rdar://problem/
32742356>
Unreviewed, fix a flakey test.
Patch by Eric Carlson <eric.carlson@apple.com> on 2017-10-26
* TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm:
(-[GetUserMediaRepromptTestView haveStream:]): New, check several times for expected state.
(TestWebKitAPI::TEST): Don't assume stream state changes in the page immediately.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224044
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aestes@apple.com [Thu, 26 Oct 2017 20:20:42 +0000 (20:20 +0000)]
[Payment Request] Enable Payment Request whenever Apple Pay is enabled
https://bugs.webkit.org/show_bug.cgi?id=178880
Reviewed by Tim Horton.
Source/WebKit:
* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPaymentRequestEnabled): Deleted.
(WKPreferencesGetPaymentRequestEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Tools:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224043
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 26 Oct 2017 20:17:36 +0000 (20:17 +0000)]
http/tests/workers/service/service-worker-cache-api.https.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=178877
Patch by Youenn Fablet <youenn@apple.com> on 2017-10-26
Reviewed by Alex Christensen.
Marking test as PASS/FAIL.
Changing test to finish after 10 seconds.
Beefing up logging to help identifiying flakiness reason.
* TestExpectations:
* http/tests/workers/service/resources/service-worker-cache-api-worker.js:
(event.event.respondWith.promise.then):
* http/tests/workers/service/resources/service-worker-cache-api.js:
(async.test):
* http/tests/workers/service/service-worker-cache-api.https-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224042
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Thu, 26 Oct 2017 20:14:40 +0000 (20:14 +0000)]
Bring back SWContextManager abstraction in WebCore
https://bugs.webkit.org/show_bug.cgi?id=178876
Reviewed by Geoffrey Garen.
Bring back SWContextManager abstraction in WebCore. It was killed in <https://trac.webkit.org/changeset/223718> but
is actually useful when the ServiceWorker wants to message the storage process.
Source/WebCore:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* workers/service/context/SWContextManager.cpp: Added.
(WebCore::SWContextManager::singleton):
(WebCore::SWContextManager::setConnection):
(WebCore::SWContextManager::connection const):
(WebCore::SWContextManager::registerServiceWorkerThread):
(WebCore::SWContextManager::serviceWorkerThreadProxy const):
(WebCore::SWContextManager::postMessageToServiceWorkerGlobalScope):
* workers/service/context/SWContextManager.h: Copied from Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.h.
(WebCore::SWContextManager::Connection::~Connection):
Source/WebKit:
* CMakeLists.txt:
* DerivedSources.make:
* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::startServiceWorkerContext):
(WebKit::WebSWServerConnection::startFetch):
(WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Storage/WebSWContextManagerConnection.cpp: Renamed from Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.cpp.
(WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
(WebKit::WebSWContextManagerConnection::updatePreferences):
(WebKit::WebSWContextManagerConnection::startServiceWorker):
(WebKit::WebSWContextManagerConnection::startFetch):
(WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerGlobalScope):
* WebProcess/Storage/WebSWContextManagerConnection.h: Renamed from Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.h.
* WebProcess/Storage/WebSWContextManagerConnection.messages.in: Renamed from Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.messages.in.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessage):
(WebKit::WebProcess::getWorkerContextConnection):
* WebProcess/WebProcess.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224041
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Thu, 26 Oct 2017 20:13:47 +0000 (20:13 +0000)]
Fix issues with WebView subframe painting
https://bugs.webkit.org/show_bug.cgi?id=178842
rdar://problem/
34072253
Reviewed by Daniel Bates.
WebHTMLView overrides some NSView internal methods to make sure that AppKit doesn't paint
subframes (WebKit controls subframe painting). The method signature of one of these changed in macOS
High Sierra, so match the new signature.
Also rename the 'rect' param to 'displayRect' to match AppKit code.
* WebView/WebHTMLView.mm:
(-[WebHTMLView _recursive:displayRectIgnoringOpacity:inGraphicsContext:shouldChangeFontReferenceColor:_recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]):
(-[WebHTMLView _recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:shouldChangeFontReferenceColor:_recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224040
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
joepeck@webkit.org [Thu, 26 Oct 2017 19:19:03 +0000 (19:19 +0000)]
Add and update some watchlists
https://bugs.webkit.org/show_bug.cgi?id=178304
Reviewed by Simon Fraser.
* Scripts/webkitpy/common/config/watchlist:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224038
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 26 Oct 2017 18:58:29 +0000 (18:58 +0000)]
[Curl] Rename CurlJobManager to CurlRequestScheduler
https://bugs.webkit.org/show_bug.cgi?id=178775
To match the meaning of the class.
It was originally meant to be more generic purpose, but as
other classes was introduced, the objective of the class is
now only to handle the life cycle of curl requests.
The delegate is also renamed to CurlRequestSchedulerClient.
Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2017-10-26
Reviewed by Alex Christensen.
* platform/Curl.cmake:
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::~CurlDownload):
(WebCore::CurlDownload::willSendRequest):
* platform/network/curl/CurlDownload.h:
* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::CurlRequest):
(WebCore::CurlRequest::start):
(WebCore::CurlRequest::startWithJobManager):
(WebCore::CurlRequest::cancel):
(WebCore::CurlRequest::callClient):
(WebCore::CurlRequest::didReceiveData):
(WebCore::CurlRequest::didCompleteTransfer):
(WebCore::CurlRequest::invokeDidReceiveResponseForFile):
(WebCore::CurlRequest::invokeDidReceiveResponse):
(WebCore::CurlRequest::completeDidReceiveResponse):
(WebCore::CurlRequest::pausedStatusChanged):
(WebCore::CurlRequest::callDelegate): Deleted.
* platform/network/curl/CurlRequest.h:
(WebCore::CurlRequest::create):
(WebCore::CurlRequest::setClient):
(WebCore::CurlRequest::setDelegate): Deleted.
* platform/network/curl/CurlRequestClient.h: Renamed from Source/WebCore/platform/network/curl/CurlRequestDelegate.h.
* platform/network/curl/CurlRequestScheduler.cpp: Renamed from Source/WebCore/platform/network/curl/CurlJobManager.cpp.
(WebCore::CurlJobList::startJobs):
(WebCore::CurlJobList::finishJobs):
(WebCore::CurlRequestScheduler::singleton):
(WebCore::CurlRequestScheduler::add):
(WebCore::CurlRequestScheduler::cancel):
(WebCore::CurlRequestScheduler::callOnWorkerThread):
(WebCore::CurlRequestScheduler::startThreadIfNeeded):
(WebCore::CurlRequestScheduler::stopThreadIfNoMoreJobRunning):
(WebCore::CurlRequestScheduler::stopThread):
(WebCore::CurlRequestScheduler::updateJobList):
(WebCore::CurlRequestScheduler::workerThread):
* platform/network/curl/CurlRequestScheduler.h: Renamed from Source/WebCore/platform/network/curl/CurlJobManager.h.
(WebCore::CurlRequestScheduler::~CurlRequestScheduler):
* platform/network/curl/CurlRequestSchedulerClient.h: Added.
(WebCore::CurlRequestSchedulerClient::~CurlRequestSchedulerClient):
* platform/network/curl/ResourceHandleCurlDelegate.cpp:
(WebCore::ResourceHandleCurlDelegate::~ResourceHandleCurlDelegate):
(WebCore::ResourceHandleCurlDelegate::setAuthentication):
(WebCore::ResourceHandleCurlDelegate::continueAfterWillSendRequest):
* platform/network/curl/ResourceHandleCurlDelegate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224037
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jlewis3@apple.com [Thu, 26 Oct 2017 18:56:55 +0000 (18:56 +0000)]
Marked webrtc/video-mute.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=177501
Unreviewed test gardening.
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224036
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@apple.com [Thu, 26 Oct 2017 18:54:46 +0000 (18:54 +0000)]
Remove deprecated WebKit symbols
https://bugs.webkit.org/show_bug.cgi?id=178875
rdar://problem/
31139070
Reviewed by Dan Bernstein.
* PlatformMac.cmake:
* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKContextSetProcessModel):
(WKPageGroupCopyIdentifier): Deleted.
(WKPageGroupAddUserContentFilter): Deleted.
(WKPageGroupRemoveUserContentFilter): Deleted.
* UIProcess/API/C/WKPageGroup.h:
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm: Removed.
* UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
* WebKit.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224035
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Thu, 26 Oct 2017 18:51:33 +0000 (18:51 +0000)]
Remove unnecessary whitespace invalidation logic from RenderTreeUpdater
https://bugs.webkit.org/show_bug.cgi?id=178786
Reviewed by Zalan Bujtas.
RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded is a somewhat complex
and confusing function for figuring out if some whitespace-only text node might need to have its
rendering status recomputed. However actually computing if a text renderer is needed is not expensive.
We can simply do it for all whitespace nodes after a sibling mutation.
This also removes a set that could have stale renderer pointers in it (they were never dereferenced).
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildIgnoringContinuation):
Fix a display:contents bug exposed by this change. With display:contents a text renderer may have an anonymous
inline wrapper and we need to take it into account when the text renderer is the beforeChild.
Tested by imported/w3c/web-platform-tests/css/css-display-3/display-contents-state-change-001.html
* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateRenderTree):
Call updateTextRenderer() for all whitespace-only text nodes after a change in siblings.
In normal update case it just figures out quickly (by calling textRendererIsNeeded)
that there are no changes and bails out.
(WebCore::RenderTreeUpdater::updateElementRenderer):
(WebCore::RenderTreeUpdater::updateTextRenderer):
(WebCore::RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded): Deleted.
No longer needed. Just mark that there have been changes to siblings instead.
* style/RenderTreeUpdater.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224034
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mmaxfield@apple.com [Thu, 26 Oct 2017 18:46:24 +0000 (18:46 +0000)]
Mark font palettes as in development
https://bugs.webkit.org/show_bug.cgi?id=178590
Unreviewed.
* features.json:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224033
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 26 Oct 2017 18:44:08 +0000 (18:44 +0000)]
Unreviewed, rolling out r223984.
Caused LayoutTest assertion failures.
Reverted changeset:
"When navigating back to a page, compositing layers may not
use accelerated drawing"
https://bugs.webkit.org/show_bug.cgi?id=178749
https://trac.webkit.org/changeset/223984
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224032
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Thu, 26 Oct 2017 18:41:35 +0000 (18:41 +0000)]
Rebase contentextensions test expectations
https://bugs.webkit.org/show_bug.cgi?id=178841
Reviewed by Alexey Proskuryakov.
They've been marked as flaky for so long that nobody has rebased them. The URLParser
has changed underneath them, DOM error reporting has changed, etc. The first step to
gaining this test coverage back again is rebasing.
* http/tests/contentextensions/block-everything-if-domain-expected.txt:
* http/tests/contentextensions/block-everything-unless-domain-redirect-expected.txt:
* http/tests/contentextensions/character-set-basic-support-expected.txt:
* http/tests/contentextensions/main-resource-expected.txt:
* http/tests/contentextensions/main-resource-redirect-blocked-expected.txt:
* http/tests/contentextensions/main-resource-redirect-error-expected.txt:
* http/tests/contentextensions/make-https-expected.txt:
* http/tests/contentextensions/plugin-doesnt-crash-expected.txt:
* http/tests/contentextensions/sync-xhr-blocked-expected.txt:
* http/tests/contentextensions/text-track-blocked-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224031
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 26 Oct 2017 18:38:54 +0000 (18:38 +0000)]
Add inspector logging for MediaElementSession autoplay
https://bugs.webkit.org/show_bug.cgi?id=178846
Patch by Youenn Fablet <youenn@apple.com> on 2017-10-26
Reviewed by Eric Carlson.
No change of behavior.
Making use of pal Logger in MediaElementSession.
This new logging is limited to autoplay/playback for now.
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::MediaElementSession):
(WebCore::MediaElementSession::playbackPermitted const):
(WebCore::MediaElementSession::autoplayPermitted const):
(WebCore::MediaElementSession::willLog const):
(WebCore::MediaElementSession::logChannel const):
* html/MediaElementSession.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224030
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
megan_gardner@apple.com [Thu, 26 Oct 2017 18:20:14 +0000 (18:20 +0000)]
Remove code to update block selection
https://bugs.webkit.org/show_bug.cgi?id=178843
Reviewed by Tim Horton.
Removes code for updating block selection, which has been disabled.
This code is being slowly pruned to avoid regressions and accidental removal of code that is being used.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didUpdateBlockSelectionWithTouch): Deleted.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(toSelectionHandlePosition): Deleted.
(-[WKContentView _didUpdateBlockSelectionWithTouch:withFlags:growThreshold:shrinkThreshold:]): Deleted.
(-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateBlockSelectionWithTouch): Deleted.
(WebKit::WebPageProxy::didUpdateBlockSelectionWithTouch): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::shouldExpand): Deleted.
(WebKit::WebPage::changeBlockSelection): Deleted.
(WebKit::WebPage::updateBlockSelectionWithTouch): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224029
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jlewis3@apple.com [Thu, 26 Oct 2017 18:16:36 +0000 (18:16 +0000)]
Skipped webrtc/video-replace-muted-track.html on iOS.
https://bugs.webkit.org/show_bug.cgi?id=173608
Unreviewed test gardening.
* platform/ios-wk2/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224028
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 26 Oct 2017 18:11:24 +0000 (18:11 +0000)]
Move ApplePay to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178871
Rubber-stamped by Tim Horton.
Also, add some other missing files.
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224027
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aperez@igalia.com [Thu, 26 Oct 2017 17:59:10 +0000 (17:59 +0000)]
[GTK] WebKit library .so version is not being set correctly
https://bugs.webkit.org/show_bug.cgi?id=178873
Reviewed by Michael Catanzaro.
* Source/cmake/OptionsGTK.cmake: Adjust name of the target for which the .so version gets calculated.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224026
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 26 Oct 2017 17:45:19 +0000 (17:45 +0000)]
Unreviewed, rolling out r224019.
This change caused API test WebKit.MSEIsPlayingAudio to time
out.
Reverted changeset:
"XMLHttpRequest should not treat file URLs as same origin"
https://bugs.webkit.org/show_bug.cgi?id=178565
https://trac.webkit.org/changeset/224019
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224025
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 26 Oct 2017 17:26:21 +0000 (17:26 +0000)]
Unreviewed, rolling out r223994.
The LayoutTest for this change is failing.
Reverted changeset:
"Add service worker handle fetch support for all subresource
requests"
https://bugs.webkit.org/show_bug.cgi?id=178769
https://trac.webkit.org/changeset/223994
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224024
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 26 Oct 2017 17:18:20 +0000 (17:18 +0000)]
Unreviewed, rolling out r223908.
Causes LayoutTest crashes with newer SDKs.
Reverted changeset:
"Adopt new secure coding APIs"
https://bugs.webkit.org/show_bug.cgi?id=178484
https://trac.webkit.org/changeset/223908
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224023
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 26 Oct 2017 16:41:22 +0000 (16:41 +0000)]
Unreviewed, rolling out r223961.
The change that required this has been rolled out.
Reverted changeset:
"Mark test262.yaml/test262/test/language/statements/try/tco-
catch.js as passing."
https://bugs.webkit.org/show_bug.cgi?id=178592
https://trac.webkit.org/changeset/223961
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224022
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Thu, 26 Oct 2017 16:32:46 +0000 (16:32 +0000)]
Update TestExpectations for compositing/tiling/non-active-window-tiles-size.html.
https://bugs.webkit.org/show_bug.cgi?id=171763
Unreviewed test gardening.
* platform/mac-wk2/TestExpectations: Remove Debug-only flag.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224021
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jfbastien@apple.com [Thu, 26 Oct 2017 15:33:55 +0000 (15:33 +0000)]
WebAssembly: no VM / JS version of our implementation
https://bugs.webkit.org/show_bug.cgi?id=177472
Reviewed by Michael Saboff.
This patch removes all appearances of "JS" and "VM" in the wasm
directory. These now only appear in the wasm/js directory, which
is only used in a JS embedding of wasm. It should therefore now be
possible to create non-JS embeddings of wasm through JSC, though
it'll still require:
- Mild codegen for wasm<->embedder calls;
- A strategy for trap handling (no need for full unwind! Could kill).
- Creation of the Wasm::* objects.
- Calling convention handling to call the embedder.
- Handling of multiple embedders (see #177475, this is optional).
Most of the patch consists in renaming JSWebAssemblyInstance to
Instance, and removing temporary copies which I'd added to make
this specific patch very simple.
* interpreter/CallFrame.cpp:
(JSC::CallFrame::wasmAwareLexicalGlobalObject): this one place
which needs to know about who "owns" the Wasm::Instance. In a JS
embedding it's the JSWebAssemblyInstance.
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::B3IRGenerator::addGrowMemory):
(JSC::Wasm::B3IRGenerator::addCurrentMemory):
(JSC::Wasm::B3IRGenerator::getGlobal):
(JSC::Wasm::B3IRGenerator::setGlobal):
(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
* wasm/WasmBinding.cpp:
(JSC::Wasm::wasmToWasm):
* wasm/WasmContext.cpp:
(JSC::Wasm::Context::load const):
(JSC::Wasm::Context::store):
* wasm/WasmContext.h:
* wasm/WasmEmbedder.h:
* wasm/WasmInstance.cpp:
(JSC::Wasm::Instance::Instance):
(JSC::Wasm::Instance::create):
(JSC::Wasm::Instance::extraMemoryAllocated const):
* wasm/WasmInstance.h: add an "owner", the Wasm::Context, move the
"tail" import information from JSWebAssemblyInstance over to here.
(JSC::Wasm::Instance::finalizeCreation):
(JSC::Wasm::Instance::owner const):
(JSC::Wasm::Instance::offsetOfOwner):
(JSC::Wasm::Instance::context const):
(JSC::Wasm::Instance::setMemory):
(JSC::Wasm::Instance::setTable):
(JSC::Wasm::Instance::offsetOfMemory):
(JSC::Wasm::Instance::offsetOfGlobals):
(JSC::Wasm::Instance::offsetOfTable):
(JSC::Wasm::Instance::offsetOfTail):
(JSC::Wasm::Instance::numImportFunctions const):
(JSC::Wasm::Instance::importFunctionInfo):
(JSC::Wasm::Instance::offsetOfTargetInstance):
(JSC::Wasm::Instance::offsetOfWasmEntrypoint):
(JSC::Wasm::Instance::offsetOfWasmToEmbedderStubExecutableAddress):
(JSC::Wasm::Instance::offsetOfImportFunction):
(JSC::Wasm::Instance::importFunction):
(JSC::Wasm::Instance::allocationSize):
(JSC::Wasm::Instance::create): Deleted.
* wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::runForIndex):
* wasm/WasmOMGPlan.h:
* wasm/WasmTable.cpp:
(JSC::Wasm::Table::Table):
(JSC::Wasm::Table::setFunction):
* wasm/WasmTable.h:
* wasm/WasmThunks.cpp:
(JSC::Wasm::throwExceptionFromWasmThunkGenerator):
(JSC::Wasm::triggerOMGTierUpThunkGenerator):
* wasm/js/JSToWasm.cpp:
(JSC::Wasm::createJSToWasmWrapper):
* wasm/js/JSWebAssemblyInstance.cpp: delete code that is now on Wasm::Instance
(JSC::JSWebAssemblyInstance::JSWebAssemblyInstance): The embedder
decides what the import function is. Here we must properly
placement-new it to what we've elected (and initialize it later).
(JSC::JSWebAssemblyInstance::visitChildren):
(JSC::JSWebAssemblyInstance::finalizeCreation):
(JSC::JSWebAssemblyInstance::create):
* wasm/js/JSWebAssemblyInstance.h: delete code that is now on Wasm::Instance
(JSC::JSWebAssemblyInstance::instance):
(JSC::JSWebAssemblyInstance::moduleNamespaceObject):
(JSC::JSWebAssemblyInstance::setMemory):
(JSC::JSWebAssemblyInstance::table):
(JSC::JSWebAssemblyInstance::setTable):
(JSC::JSWebAssemblyInstance::offsetOfInstance):
(JSC::JSWebAssemblyInstance::offsetOfCallee):
(JSC::JSWebAssemblyInstance::context const): Deleted.
(JSC::JSWebAssemblyInstance::offsetOfTail): Deleted.
(): Deleted.
(JSC::JSWebAssemblyInstance::importFunctionInfo): Deleted.
(JSC::JSWebAssemblyInstance::offsetOfTargetInstance): Deleted.
(JSC::JSWebAssemblyInstance::offsetOfWasmEntrypoint): Deleted.
(JSC::JSWebAssemblyInstance::offsetOfWasmToEmbedderStubExecutableAddress): Deleted.
(JSC::JSWebAssemblyInstance::offsetOfImportFunction): Deleted.
(JSC::JSWebAssemblyInstance::importFunction): Deleted.
(JSC::JSWebAssemblyInstance::internalMemory): Deleted.
(JSC::JSWebAssemblyInstance::wasmCodeBlock const): Deleted.
(JSC::JSWebAssemblyInstance::offsetOfWasmTable): Deleted.
(JSC::JSWebAssemblyInstance::offsetOfGlobals): Deleted.
(JSC::JSWebAssemblyInstance::offsetOfCodeBlock): Deleted.
(JSC::JSWebAssemblyInstance::offsetOfWasmCodeBlock): Deleted.
(JSC::JSWebAssemblyInstance::offsetOfCachedStackLimit): Deleted.
(JSC::JSWebAssemblyInstance::offsetOfWasmMemory): Deleted.
(JSC::JSWebAssemblyInstance::offsetOfTopEntryFramePointer): Deleted.
(JSC::JSWebAssemblyInstance::cachedStackLimit const): Deleted.
(JSC::JSWebAssemblyInstance::setCachedStackLimit): Deleted.
(JSC::JSWebAssemblyInstance::wasmMemory): Deleted.
(JSC::JSWebAssemblyInstance::wasmModule): Deleted.
(JSC::JSWebAssemblyInstance::allocationSize): Deleted.
* wasm/js/JSWebAssemblyTable.cpp:
(JSC::JSWebAssemblyTable::setFunction):
* wasm/js/WasmToJS.cpp: One extra indirection to find the JSWebAssemblyInstance.
(JSC::Wasm::materializeImportJSCell):
(JSC::Wasm::handleBadI64Use):
(JSC::Wasm::wasmToJS):
(JSC::Wasm::wasmToJSException):
* wasm/js/WasmToJS.h:
* wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):
* wasm/js/WebAssemblyPrototype.cpp:
(JSC::instantiate):
* wasm/js/WebAssemblyWrapperFunction.cpp:
(JSC::WebAssemblyWrapperFunction::create):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224020
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Thu, 26 Oct 2017 15:14:33 +0000 (15:14 +0000)]
XMLHttpRequest should not treat file URLs as same origin
https://bugs.webkit.org/show_bug.cgi?id=178565
<rdar://problem/
11115901>
Reviewed by Ryosuke Niwa.
Source/WebCore:
Do not treat file URLs as same-origin for XHR requests.
Test: fast/xmlhttprequest/xmlhttprequest-access-self-as-file.html
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Use new helper method.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::requestIsSameOrigin): New method to recognize same-origin
requests, with special handling for XHR.
* page/SecurityOrigin.h:
LayoutTests:
* fast/xmlhttprequest/resources/xmlhttprequest-access-self-as-file-real.html: Added.
* fast/xmlhttprequest/xmlhttprequest-access-self-as-file.html: Added.
* fast/xmlhttprequest/xmlhttprequest-access-self-as-file-expected.txt: Added.
* fast/xmlhttprequest/xmlhttprequest-access-self-as-blob-expected.txt: Added.
* fast/xmlhttprequest/xmlhttprequest-access-self-as-blob.html: Added.
* fast/xmlhttprequest/xmlhttprequest-nonexistent-file-expected.txt: Rebaseline test now that we reject
XHR to local file URLs.
* platform/ios/fast/xmlhttprequest/xmlhttprequest-nonexistent-file-expected.txt: Rebaselined.
* platform/wk2/TestExpectations: Skip test since 'beginDragWithFiles' is not supported in WKTR.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224019
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 26 Oct 2017 14:06:26 +0000 (14:06 +0000)]
Remove scopeguard from platform
https://bugs.webkit.org/show_bug.cgi?id=178681
Patch by Christopher Reid <chris.reid@sony.com> on 2017-10-26
Reviewed by Brady Eidson.
Source/WebCore:
Replacing platform/ScopeGuard with WTF::ScopeExit.
No new tests, no change in behavior.
* Modules/indexeddb/IDBRequest.cpp:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
* WebCore.xcodeproj/project.pbxproj:
* platform/FileSystem.cpp:
* platform/ScopeGuard.h: Removed.
* platform/network/BlobRegistryImpl.cpp:
* workers/service/ServiceWorkerContainer.cpp:
Source/WebKit:
* Shared/mac/ChildProcessMac.mm:
Tools:
* TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224018
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Thu, 26 Oct 2017 12:03:29 +0000 (12:03 +0000)]
REGRESSION(r222090): [HarfBuzz] Arabic shaping is broken except for first word in line
https://bugs.webkit.org/show_bug.cgi?id=178625
Reviewed by Michael Catanzaro.
Source/WebCore:
Once we find the first space, which has the COMMON script, we split the run, and the next ones keep using
COMMON instead of ARABIC because we don't update the current script on every loop iteration. This patch
simplifies the script handling by moving the code back to the loop and always breaking in case of different
scripts, correctly handling INHERITED and COMMON cases and updating the current script when needed.
Covered by existing tests. This improves several tests that have been rebaselined.
* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
(WebCore::findNextRun):
(WebCore::scriptsAreCompatibleForCharacters): Deleted.
LayoutTests:
Rebaseline several tests that have been improved.
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.png:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.png:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.png:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.png:
* platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt:
* platform/gtk/fast/text/atsui-negative-spacing-features-expected.png:
* platform/gtk/fast/text/atsui-negative-spacing-features-expected.txt:
* platform/gtk/fast/text/international/hebrew-vowels-expected.png:
* platform/gtk/fast/text/international/hebrew-vowels-expected.txt:
* platform/gtk/svg/W3C-SVG-1.1/fonts-glyph-02-t-expected.png:
* platform/gtk/svg/W3C-SVG-1.1/fonts-glyph-02-t-expected.txt:
* platform/gtk/svg/custom/glyph-selection-arabic-forms-expected.png:
* platform/gtk/svg/custom/glyph-selection-arabic-forms-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224015
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Thu, 26 Oct 2017 10:58:17 +0000 (10:58 +0000)]
WebDriver: Add support to import and run W3C tests
https://bugs.webkit.org/show_bug.cgi?id=177304
Reviewed by Brian Burg.
Tools:
WPT has now several WebDriver tests, and new ones are going to be added to cover the whole spec. This patch
adds the initial support for running W3C tests. The script import-w3c-webdriver-tests reuses parts of the W3C
test downloader to download the tests and required tools from WPT repository into WebDriverTests
directory. Tests can be run with run-webdriver-tests, a new script that works similar to other test runner
scripts. For now it shows a summary at the end of the execution, there aren't expectations yet, since we are not
ready to run those tests in the bots. Once we are ready to properly run the tests, we can add the expectations
support and run the tests in the bots.
* Scripts/import-w3c-webdriver-tests: Added.
* Scripts/run-webdriver-tests: Added.
* Scripts/webkitpy/style/checker.py: Skip WebDriverTests directory since it only contains third-party python
code.
* Scripts/webkitpy/thirdparty/__init__.py: Add support to autodownload mozlog and mozprocess since they are
required by the WebDriver tests.
* Scripts/webkitpy/webdriver_tests/__init__.py: Added.
* Scripts/webkitpy/webdriver_tests/webdriver_driver.py: Added.
* Scripts/webkitpy/webdriver_tests/webdriver_driver_gtk.py: Added.
* Scripts/webkitpy/webdriver_tests/webdriver_test_result.py: Added.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py: Added.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py: Added.
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py: Added.
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py: Added.
WebDriverTests:
Add json file used by the importer and the result of running the importer.
* imported/w3c/importer.json: Added.
* imported/w3c/tools/pytest/: Added.
* imported/w3c/tools/webdriver/: Added.
* imported/w3c/tools/wptrunner/: Added.
* imported/w3c/webdriver/: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224014
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 26 Oct 2017 10:44:55 +0000 (10:44 +0000)]
[GTK] Web Inspector: Add CanvasOverview.svg and Canvas.svg
https://bugs.webkit.org/show_bug.cgi?id=178426
Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-10-26
Reviewed by Carlos Garcia Campos.
* UserInterface/Images/gtk/Canvas.svg: Added.
* UserInterface/Images/gtk/CanvasOverview.svg: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224013
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eocanha@igalia.com [Thu, 26 Oct 2017 10:31:39 +0000 (10:31 +0000)]
[MSE][GStreamer] Fix hang on clearing/destroying AppendPipeline
https://bugs.webkit.org/show_bug.cgi?id=178819
Reviewed by Xabier Rodriguez-Calvar.
The deadlock may occur when UI thread tries to clear pipeline in
AppendPipeline::clearPlayerPrivate() while parser thread tries to change
pipeline state to pause holding the stream lock in
AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread()
This patch is authored by Eugene Mutavchi <Ievgen_Mutavchi@comcast.com>
* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
Return if there's no player private.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224012
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Thu, 26 Oct 2017 08:46:02 +0000 (08:46 +0000)]
Assert that no script is executed during style recalc
https://bugs.webkit.org/show_bug.cgi?id=178845
<rdar://problem/
35106129>
Reviewed by Antti Koivisto.
This patch adds NoEventDispatchAssertion to Document::updateStyle and Document::updateStyleIfNeeded
to make sure we don't start mutating DOM in the middle of a style update.
Added NoEventDispatchAssertion::EventAllowedScope for various places in SVGUseElement to update its
shadow tree since that happens while updating the style.
No new tests since there should be no behavioral change.
* dom/Document.cpp:
(WebCore::Document::resolveStyle): Added NoEventDispatchAssertion while flushing pending stylesheets
and calling FrameView::willRecalcStyle, and while the style tree solver is in works. Also moved in
the code to update the selection and schedule to dispatch a fake mouse event into the same scope.
Also increment m_styleRecalcCount in the same code since post resolution callbacks could run author
scripts which in turn trigger another (recursive) style recalc.
(WebCore::Document::updateStyleIfNeeded): Put everything but the call to resolveStyle in a scope with
NoEventDispatchAssertion.
* dom/Element.cpp:
(WebCore::Element::cloneElementWithChildren): Added NoEventDispatchAssertion::EventAllowedScope to the
newly cloned element for SVG use element's shadow tree.
(WebCore::Element::cloneElementWithoutChildren): Ditto.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent): Make the assertion more precise to workaround the fact SVG
use elements update its shadow tree in the middle of style updates. Also removed a redundant assertion
since the result of NoEventDispatchAssertion::isEventDispatchAllowedInSubtree cannot chance without
pushing or popoing the stack frame.
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::clearShadowTree):
(WebCore::SVGUseElement::updateShadowTree): Added NoEventDispatchAssertion to the user-agent shadow root
of a SVG use element. Since this is a newly created shadow tree which hasn't been exposed to author
scripts, it's safe to mutate them during the style recalc even though it's not the best design.
(WebCore::SVGUseElement::cloneTarget const): Ditto.
(WebCore::SVGUseElement::expandUseElementsInShadowTree const): Ditto.
(WebCore::SVGUseElement::expandSymbolElementsInShadowTree const): Ditto.
(WebCore::SVGUseElement::transferEventListenersToShadowTree const):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224011
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Thu, 26 Oct 2017 07:10:05 +0000 (07:10 +0000)]
LayoutTest http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=178828
Reviewed by Wenson Hsieh.
Removed the superflous call to finishJSTest after 3s.
* http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224010
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 26 Oct 2017 07:07:51 +0000 (07:07 +0000)]
Move platform Cocoa sources to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178851
Rubber-stamped by Tim Horton.
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224009
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 26 Oct 2017 06:21:35 +0000 (06:21 +0000)]
Start moving Cocoa specific unified sources
https://bugs.webkit.org/show_bug.cgi?id=178850
Rubber-stamped by Tim Horton.
* PlatformMac.cmake:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224008
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Thu, 26 Oct 2017 06:03:35 +0000 (06:03 +0000)]
[HarfBuzz] ComplexTextRun should initialize direction from the harfbuzz buffer
https://bugs.webkit.org/show_bug.cgi?id=178788
Reviewed by Michael Catanzaro.
Instead of using the TextRun direction. If the TextRun is ltr, but the harfbuzz buffer is rtl, the character
indexes will be swapped in m_coreTextIndices.
* platform/graphics/ComplexTextController.h:
(WebCore::ComplexTextController::ComplexTextRun::create): Remove the ltr parameter.
* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Initialize m_isLTR using hb_buffer_get_direction().
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Do not pass ltr to ComplexTextRun::create().
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224007
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 26 Oct 2017 05:23:12 +0000 (05:23 +0000)]
Move remaining platform independent sources to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178849
Rubber-stamped by Tim Horton.
* CMakeLists.txt:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224006
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 26 Oct 2017 04:57:44 +0000 (04:57 +0000)]
Move plugins and rendering to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178848
Rubber-stamped by Tim Horton.
* CMakeLists.txt:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224005
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 26 Oct 2017 04:27:59 +0000 (04:27 +0000)]
Unreviewed, add FEMorphology.cpp back to the regular build after r224003.
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224004
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 26 Oct 2017 04:24:02 +0000 (04:24 +0000)]
Unreviewed, Windows build fix.
* Sources.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224003
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
webkit@devinrousso.com [Thu, 26 Oct 2017 04:07:59 +0000 (04:07 +0000)]
Web Inspector: provide a way to enable/disable event listeners
https://bugs.webkit.org/show_bug.cgi?id=177451
<rdar://problem/
34994925>
Reviewed by Joseph Pecoraro.
Source/JavaScriptCore:
* inspector/protocol/DOM.json:
Add `setEventListenerDisabled` command that enables/disables a specific event listener
during event dispatch. When a disabled event listener is fired, the listener's callback will
not be called.
Source/WebCore:
Test: inspector/dom/setEventListenerDisabled.html
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners):
Add InspectorInstrumentation call to isEventListenerDisabled. If true, the event listener's
callback will not be called.
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::discardBindings):
(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::setEventListenerDisabled):
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
(WebCore::InspectorDOMAgent::willRemoveEventListener):
(WebCore::InspectorDOMAgent::isEventListenerDisabled):
Introduce a mapping of `EventListener*` to `InspectorEventListener`, a struct for uniquely
identifying event listeners so they can be referenced from the frontend. We only add items
to this mapping when `getEventListenersForNode` is called, as that is when EventListener
data is sent to the frontend. This allows us to defer creating an Inspector "mirror" object
for each EventListener until it is needed. Items are removed whenever an event listener is
removed or when the document changes.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::isEventListenerDisabled):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willRemoveEventListenerImpl):
(WebCore::InspectorInstrumentation::isEventListenerDisabledImpl):
Pass additional parameters to InspectorDOMAgent so it can determine if the event listener
actually exists. If not, don't dispatch an event to the frontend as nothing will change.
Source/WebInspectorUI:
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/DOMTreeManager.js:
(WI.DOMTreeManager.prototype.setEventListenerDisabled):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype.attached):
(WI.DOMNodeDetailsSidebarPanel.prototype.detached):
(WI.DOMNodeDetailsSidebarPanel.prototype._eventListenersChanged):
(WI.DOMNodeDetailsSidebarPanel.prototype.addEventListeners): Deleted.
(WI.DOMNodeDetailsSidebarPanel.prototype.removeEventListeners): Deleted.
Listen for `WI.DOMNode.Event.EventListenersChanged` on all instances of WI.DOMNode, since we
will still want to refresh the event listeners section in the event that an event listener
is removed from a parent node.
* UserInterface/Views/EventListenerSectionGroup.js:
(WI.EventListenerSectionGroup):
(WI.EventListenerSectionGroup.prototype._eventText):
(WI.EventListenerSectionGroup.prototype._nodeTextOrLink):
(WI.EventListenerSectionGroup.prototype._createDisabledToggleElement):
(WI.EventListenerSectionGroup.prototype._createDisabledToggleElement.updateTitle):
* UserInterface/Views/EventListenerSectionGroup.css:
(.event-listener-section > .content input[type="checkbox"]):
* UserInterface/Views/DetailsSectionSimpleRow.js:
(WI.DetailsSectionSimpleRow.prototype.get label):
(WI.DetailsSectionSimpleRow.prototype.set label):
LayoutTests:
* inspector/dom/setEventListenerDisabled-expected.txt: Added.
* inspector/dom/setEventListenerDisabled.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224002
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Thu, 26 Oct 2017 03:59:25 +0000 (03:59 +0000)]
Move Platform to unified sources.
https://bugs.webkit.org/show_bug.cgi?id=178829
Rubber-stamped by Tim Horton.
* CMakeLists.txt:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/Cursor.cpp:
* platform/sql/SQLiteDatabase.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224001
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Thu, 26 Oct 2017 02:57:08 +0000 (02:57 +0000)]
messageEvent.source can also be a ServiceWorker
https://bugs.webkit.org/show_bug.cgi?id=178839
Reviewed by Brady Eidson.
messageEvent.source can also be a ServiceWorker:
- https://html.spec.whatwg.org/multipage/comms.html#messageeventsource
This enables calling postMessage() from a ServiceWorker via Bug 178794.
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::source const): Deleted.
* dom/MessageEvent.h:
* dom/MessageEvent.idl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224000
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Thu, 26 Oct 2017 00:30:03 +0000 (00:30 +0000)]
Style::Scope::flushPendingUpdate() can replace the entire document in XSLTProcessor::createDocumentFromSource
https://bugs.webkit.org/show_bug.cgi?id=178715
<rdar://problem/
35144665>
Reviewed by Brent Fulgham.
Apply XLS tranforms when a 0s timer fires or the document finishes parsing or loading whichever comes first
instead of in the middle of collecting a list of stylesheets.
* dom/Document.cpp:
(WebCore::Document::Document): Initialize the newly added timer.
(WebCore::Document::implicitClose): Apply any pending XSLT before we fire load events since some of the event
handlers may be expecting to see the document after XSLT had been applied.
(WebCore::Document::scheduleToApplyXSLTransforms): Added.
(WebCore::Document::applyPendingXSLTransformsNowIfScheduled): Added.
(WebCore::Document::applyPendingXSLTransformsTimerFired): Added. Moved the logic to apply XSL transforms from
Style::Scope::collectActiveStyleSheets, and merged applyXSLTransform into this function.
(WebCore::Document::applyXSLTransform): Deleted.
(WebCore::Document::finishedParsing): Apply XSLT right before updating the style. This is where used to apply
inline XSLT and it happens much earlier than implicitClose.
* dom/Document.h:
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::checkStyleSheet): Schedule XSLT in the document instead of flushing pending
stylesheets, which would have synchronously applied XSLT. We can't apply XSLT synchronously here because this
function can be called from a non-script-resilient call stack.
(WebCore::ProcessingInstruction::sheetLoaded): Ditto.
* style/StyleScope.cpp:
(WebCore::Style::Scope::collectXSLTransforms): Added.
(WebCore::Style::Scope::collectActiveStyleSheets): Removed the code to apply XSLT. Skip ProcessingInstructions
that applies XSLT. Also use RefPtr<StyleSheet> instead of a raw pointer to store StyleSheet.
* style/StyleScope.h:
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::doEnd): Apply any pending XSLTs synchronously here as the comment suggests.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223999
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
webkit@devinrousso.com [Wed, 25 Oct 2017 23:50:11 +0000 (23:50 +0000)]
Web Inspector: Canvas Tab: starting a second recording doesn't show red titlebar if the first recording was empty
https://bugs.webkit.org/show_bug.cgi?id=178805
<rdar://problem/
35176303>
Reviewed by Brian Burg.
Source/WebCore:
No new tests, updated existing tests.
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
If the recording was stopped and had no data, reset the CallTracingActive flag to false.
LayoutTests:
* inspector/canvas/recording-2d-expected.txt:
* inspector/canvas/recording-2d.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223998
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
webkit@devinrousso.com [Wed, 25 Oct 2017 23:49:05 +0000 (23:49 +0000)]
Web Inspector: replace TypeVerifier with subclasses of WI.Collection
https://bugs.webkit.org/show_bug.cgi?id=178045
<rdar://problem/
35174307>
Reviewed by Brian Burg.
Source/WebInspectorUI:
* UserInterface/Models/Collection.js:
(WI.Collection):
(WI.Collection.prototype.get displayName):
(WI.Collection.prototype.objectIsRequiredType):
(WI.Collection.prototype.add):
(WI.Collection.prototype.get typeVerifier): Deleted.
Instead of exposing the typeVerifier, we create a public predicate that returns whether the
given object matches the expected type of the Collection. Subclasses can override it to
limit the scope of the collection to a particular type.
* UserInterface/Models/CollectionTypes.js:
(WI.FrameCollection.prototype.get displayName):
(WI.FrameCollection.prototype.objectIsRequiredType):
(WI.FrameCollection): Deleted.
(WI.ScriptCollection.prototype.get displayName):
(WI.ScriptCollection.prototype.objectIsRequiredType):
(WI.ScriptCollection): Deleted.
(WI.CSSStyleSheetCollection.prototype.get displayName):
(WI.CSSStyleSheetCollection.prototype.objectIsRequiredType):
(WI.CSSStyleSheetCollection): Deleted.
(WI.CanvasCollection.prototype.get displayName):
(WI.CanvasCollection.prototype.objectIsRequiredType):
(WI.CanvasCollection): Deleted.
(WI.ShaderProgramCollection.prototype.get displayName):
(WI.ShaderProgramCollection.prototype.objectIsRequiredType):
(WI.ShaderProgramCollection): Deleted.
(WI.RecordingCollection.prototype.get displayName):
(WI.RecordingCollection.prototype.objectIsRequiredType):
(WI.RecordingCollection): Deleted.
* UserInterface/Models/ResourceCollection.js:
(WI.ResourceCollection):
(WI.ResourceCollection.prototype.get displayName):
(WI.ResourceCollection.prototype.objectIsRequiredType):
(WI.ResourceCollection.verifierForType): Deleted.
* UserInterface/Views/TreeOutlineGroup.js:
(WI.TreeOutlineGroup.prototype.objectIsRequiredType):
(WI.TreeOutlineGroup): Deleted.
Introduce additional subclasses of Collection for other model types. Modify existing
subclasses to remove `typeVerifier` and instead extend `objectIsRequiredType`.
* UserInterface/Models/Canvas.js:
(WI.Canvas):
* UserInterface/Models/Frame.js:
(WI.Frame):
* UserInterface/Protocol/Target.js:
(WI.Target):
* UserInterface/Views/ResourceSidebarPanel.js:
(WI.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
(WI.ResourceSidebarPanel.prototype._addScript):
* UserInterface/Views/CollectionContentView.js:
(WI.CollectionContentView):
(WI.CollectionContentView.titleForCollection): Delete.
* UserInterface/Views/ResourceCollectionContentView.js:
(WI.ResourceCollectionContentView):
Require that subclasses of Collection override `get displayName` if the CollectionContentView
is not provided with a `contentPlaceholderText`.
(WI.CollectionContentView.prototype.initialLayout):
We don't need to create and add ContentView for each item of the Collection, as this is
already done by attached().
(WI.CollectionContentView.prototype._showContentPlaceholder):
Remove the 250ms delay before showing the placeholder TitleView.
* UserInterface/Views/FolderizedTreeElement.js:
(WI.FolderizedTreeElement.prototype._settingsForRepresentedObject):
LayoutTests:
* inspector/unit-tests/collection-expected.txt:
* inspector/unit-tests/collection.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223997
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Wed, 25 Oct 2017 23:47:26 +0000 (23:47 +0000)]
Move html to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178709
Reviewed by Alex Christensen.
* CMakeLists.txt:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223996
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 25 Oct 2017 23:39:09 +0000 (23:39 +0000)]
[Curl] Delete temporally downloaded file when it cancelled
https://bugs.webkit.org/show_bug.cgi?id=134393
Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2017-10-25
Reviewed by Alex Christensen.
* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::didCancelTransfer):
(WebCore::CurlRequest::writeDataToDownloadFileIfEnabled):
(WebCore::CurlRequest::closeDownloadFile):
(WebCore::CurlRequest::cleanupDownloadFile):
* platform/network/curl/CurlRequest.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223995
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 25 Oct 2017 23:32:49 +0000 (23:32 +0000)]
Add service worker handle fetch support for all subresource requests
https://bugs.webkit.org/show_bug.cgi?id=178769
Patch by Youenn Fablet <youenn@apple.com> on 2017-10-25
Reviewed by Chris Dumez.
Source/WebCore:
Test: http/tests/workers/service/image-fetch.https.html
Moving DocumentThreadableLoader logic to CachedResourceLoader to apply it for all resource loads.
Setting the selected service worker identifier for subresource only at the moment.
Testing is limited to images, future wpt tests should cover other subresource cases.
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::prepareFetch):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::setSelectedServiceWorkerIdentifierIfNeeded):
* loader/cache/CachedResourceRequest.h:
LayoutTests:
* http/tests/workers/service/image-fetch.https-expected.txt: Added.
* http/tests/workers/service/image-fetch.https.html: Added.
* http/tests/workers/service/resources/image-fetch-worker.js: Added.
(event.event.request.url.indexOf):
(event.event.request.url.endsWith):
* http/tests/workers/service/resources/image-fetch.js: Added.
(done):
(async.loadedImage):
(async.erroredImage):
(async.logStatus):
(async.test):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223994
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
pvollan@apple.com [Wed, 25 Oct 2017 23:24:15 +0000 (23:24 +0000)]
Network process crash under WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge.
https://bugs.webkit.org/show_bug.cgi?id=160234
rdar://problem/
30675510
Reviewed by Geoffrey Garen.
An exception is raised because we call the method rejectProtectionSpaceAndContinueWithChallenge on the CFNetwork
challenge sender, which does not implement this optional method. The methods on the authentication challenge
sender are deprecated when network session is used, so we should not call them in that case.
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
(WebKit::AuthenticationManager::cancelSingleChallenge):
(WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
* Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
(WebKit::AuthenticationManager::receivedCredential):
(WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
(WebKit::AuthenticationManager::receivedCancellation):
(WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
(WebKit::AuthenticationManager::receivedChallengeRejection):
* Shared/Authentication/soup/AuthenticationManagerSoup.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223993
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Wed, 25 Oct 2017 23:21:38 +0000 (23:21 +0000)]
Aliasing of text in CSS specs is blocky and ugly
https://bugs.webkit.org/show_bug.cgi?id=174946
Source/WebCore:
rdar://problem/
33594542
Reviewed by Dean Jackson.
The PaintedContentRequest relating to subpixel-antialiased text was failing to be
satisfied if the text content in a composited layer was nested inside descendant
RenderLayers, because RenderLayer::isVisuallyNonEmpty() returned early. If this
function is passed a request, we can't return until we've satisfied the request
(which triggers the checking of descendant layers).
Test: compositing/contents-format/subpixel-antialiased-nested-layer.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects const):
LayoutTests:
Reviewed by Dean Jackson.
* compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt: Added.
* compositing/contents-format/subpixel-antialiased-nested-layer.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223992
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
webkit@devinrousso.com [Wed, 25 Oct 2017 23:13:19 +0000 (23:13 +0000)]
Web Inspector: Canvas Tab: clicking on a canvas card causes details sidebar to show and mess up card arrangement
https://bugs.webkit.org/show_bug.cgi?id=178803
<rdar://problem/
35176082>
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/CanvasDetailsSidebarPanel.css:
(.sidebar > .panel.details.canvas > .content > .empty-content-placeholder):
(.sidebar > .panel.details.canvas > .content > .empty-content-placeholder > .message):
* UserInterface/Views/CanvasDetailsSidebarPanel.js:
(WI.CanvasDetailsSidebarPanel):
(WI.CanvasDetailsSidebarPanel.prototype.inspect):
(WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
(WI.CanvasDetailsSidebarPanel.prototype.layout):
* UserInterface/Views/RecordingNavigationSidebarPanel.js:
(WI.RecordingNavigationSidebarPanel.disallowInstanceForClass): Deleted.
* UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
(WI.RecordingStateDetailsSidebarPanel.disallowInstanceForClass): Deleted.
* UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
(WI.RecordingTraceDetailsSidebarPanel.disallowInstanceForClass): Deleted.
Drive-by: these sidebar panels are now only used by the Canvas tab, so we no longer need to
provide support for multiple instances of them.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223991
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 25 Oct 2017 22:27:06 +0000 (22:27 +0000)]
Move DNS resolution outside of NetworkRTCProvider
https://bugs.webkit.org/show_bug.cgi?id=178796
Patch by Youenn Fablet <youenn@apple.com> on 2017-10-25
Reviewed by Geoffrey Garen.
Tested through manual testing on external STUN servers.
Moving NetworkRTCProvider::Resolver into NetworkRTCResolver.
Updating the implementation to use a completion handler.
* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::NetworkRTCProvider::createResolver):
* NetworkProcess/webrtc/NetworkRTCProvider.h:
* NetworkProcess/webrtc/NetworkRTCResolver.cpp:
(WebKit::NetworkRTCResolver::NetworkRTCResolver):
(WebKit::NetworkRTCResolver::~NetworkRTCResolver):
(WebKit::NetworkRTCResolver::start):
(WebKit::NetworkRTCResolver::stop):
(WebKit::NetworkRTCResolver::completed):
(WebKit::NetworkRTCProvider::Resolver::~Resolver): Deleted.
(WebKit::NetworkRTCProvider::stop): Deleted.
(WebKit::NetworkRTCProvider::resolutionCompleted): Deleted.
* NetworkProcess/webrtc/NetworkRTCResolver.h:
* WebKit.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223990
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 25 Oct 2017 22:15:39 +0000 (22:15 +0000)]
Unreviewed, rolling out r223691 and r223729.
https://bugs.webkit.org/show_bug.cgi?id=178834
Broke Speedometer 2 React-Redux-TodoMVC test case (Requested
by rniwa on #webkit).
Reverted changesets:
"Turn recursive tail calls into loops"
https://bugs.webkit.org/show_bug.cgi?id=176601
https://trac.webkit.org/changeset/223691
"REGRESSION(r223691): DFGByteCodeParser.cpp:1483:83: warning:
comparison is always false due to limited range of data type
[-Wtype-limits]"
https://bugs.webkit.org/show_bug.cgi?id=178543
https://trac.webkit.org/changeset/223729
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223989
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Wed, 25 Oct 2017 22:15:05 +0000 (22:15 +0000)]
[MediaStream] Clear cached gUM prompt state
https://bugs.webkit.org/show_bug.cgi?id=178754
<rdar://problem/
32742356>
Reviewed by Youenn Fablet.
Source/WebKit:
* Shared/WebPreferences.yaml: Define new settings.
* Shared/WebPreferencesDefinitionsBase.h: New default values.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetInactiveMediaCaptureSteamRepromptIntervalInMinutes): New.
(WKPreferencesGetInactiveMediaCaptureSteamRepromptIntervalInMinutes): Ditto.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _inactiveMediaCaptureSteamRepromptIntervalInMinutes]): Ditto.
(-[WKPreferences _setInactiveMediaCaptureSteamRepromptIntervalInMinutes:]): Ditto.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy): Initialize
the timer.
(WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Remove unneeded namespace.
(WebKit::toWebCore): Remove unneeded breaks.
(WebKit::UserMediaPermissionRequestManagerProxy::searchForGrantedRequest const): Remove unneeded namespace.
(WebKit::UserMediaPermissionRequestManagerProxy::wasRequestDenied): Ditto.
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Ditto.
(WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Ditto.
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Ditto.
(WebKit::UserMediaPermissionRequestManagerProxy::syncWithWebCorePrefs const): Ditto.
(WebKit::UserMediaPermissionRequestManagerProxy::captureStateChanged): Set the watchdog timer
to the correct interval based on capture state.
(WebKit::UserMediaPermissionRequestManagerProxy::watchdogTimerFired): Clear cached state.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
Tools:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new test
* TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm: Added.
(-[GetUserMediaRepromptUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]):
(-[GetUserMediaRepromptUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/getUserMedia.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223988
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ross.kirsling@sony.com [Wed, 25 Oct 2017 22:06:51 +0000 (22:06 +0000)]
Add committer status for Ross Kirsling
https://bugs.webkit.org/show_bug.cgi?id=178832
Unreviewed.
* Scripts/webkitpy/common/config/contributors.json:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223987
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Wed, 25 Oct 2017 21:47:13 +0000 (21:47 +0000)]
Unreviewed, add missing copyright header to ServiceWorkerClientType.idl.
* workers/service/ServiceWorkerClientType.idl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223986
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Wed, 25 Oct 2017 21:36:39 +0000 (21:36 +0000)]
Make toJS() do the right thing for ServiceWorkerClient
https://bugs.webkit.org/show_bug.cgi?id=178816
Reviewed by Youenn Fablet.
Make toJS() do the right thing for ServiceWorkerClient. In particular,
it needs to construct a JSServiceWorkerWindowClient wrapper if the
implementation object is a ServiceWorkerWindowClient.
Also, ServiceWorkerClient does not need to be an ActiveDOMObject as
it does not have any long-running tasks. Make it a ContextDestructionObject
instead for now.
* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* workers/service/ServiceWorkerClient.cpp:
(WebCore::ServiceWorkerClient::postMessage):
* workers/service/ServiceWorkerClient.h:
(WebCore::ServiceWorkerClient::create):
* workers/service/ServiceWorkerClient.idl:
* workers/service/ServiceWorkerClientType.h: Copied from Source/WebCore/workers/service/ServiceWorkerClient.idl.
* workers/service/ServiceWorkerClientType.idl: Added.
* workers/service/ServiceWorkerClients.h:
* workers/service/ServiceWorkerClients.idl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223985
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Wed, 25 Oct 2017 21:32:08 +0000 (21:32 +0000)]
When navigating back to a page, compositing layers may not use accelerated drawing
https://bugs.webkit.org/show_bug.cgi?id=178749
rdar://problem/
35158946
Reviewed by Dean Jackson.
Source/WebCore:
There were two issues with setting GraphicsLayerCA's "acceleratesDrawing" state which
occurred on back navigation, related to the ordering of style recalcs and layout.
First, at style recalc time, we created a RenderLayerCompositor but hadn't yet called
its cacheAcceleratedCompositingFlags(), so any layers created during style update
didn't get accelerated drawing. Fix by making cacheAcceleratedCompositingFlags() internal
to RenderLayerCompositor and calling it from willRecalcStyle() and updateCompositingLayers().
Secondly, GraphicsLayerCA::commitLayerChangesBeforeSublayers() needs to updateAcceleratesDrawing()
before updating tiles, so that new tiles fetch the right acceleratesDrawing state from
the TileController.
Test: compositing/accelerated-layers-after-back.html
* page/FrameView.cpp:
(WebCore::FrameView::updateCompositingLayersAfterLayout):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::willRecalcStyle):
(WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
* rendering/RenderLayerCompositor.h:
Source/WebKit:
Avoid assertions when a test enables accelerated drawing (which we can't support
in the iOS simulator).
* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::ensureBackingStore):
Tools:
Fix WTR and DRT to parse "useAcceleratedDrawing" out of "webkit-test-runner" options
and use it to set the state of the web view.
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestOptions.mm:
(TestOptions::TestOptions):
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
LayoutTests:
Moved iframes/resources/page-cache-helper.html up to compositing/resources/go-back.html.
* compositing/accelerated-layers-after-back-expected.txt: Added.
* compositing/accelerated-layers-after-back.html: Added.
* compositing/iframes/page-cache-layer-tree.html:
* compositing/page-cache-back-crash.html:
* compositing/resources/go-back.html: Renamed from LayoutTests/compositing/iframes/resources/page-cache-helper.html.
* platform/ios/compositing/accelerated-layers-after-back-expected.txt: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223984
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 25 Oct 2017 21:30:16 +0000 (21:30 +0000)]
Web Inspector: Display fetch() initiated loads as "fetch" instead of "xhr" in the Network Tab
https://bugs.webkit.org/show_bug.cgi?id=178826
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-10-25
Reviewed by Youenn Fablet.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.shortDisplayNameForResourceType):
Fetch and XHR loads are still grouped under the succinct "XHR" filter, but
at least display the better type name in the "Type" column of the table.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223983
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Wed, 25 Oct 2017 21:19:19 +0000 (21:19 +0000)]
LayoutTest http/tests/loading/basic-credentials-sent-automatically.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=159427
Reviewed by Youenn Fablet.
Use setTimeout to make load delegate callback printing more deterministic.
The important part is that the credentials are printed, and they still are.
* http/tests/loading/basic-credentials-sent-automatically-expected.txt:
* http/tests/loading/basic-credentials-sent-automatically.html:
* platform/mac/TestExpectations:
* platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223982
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 25 Oct 2017 21:17:46 +0000 (21:17 +0000)]
Enable ServiceWorker to fetch resources
https://bugs.webkit.org/show_bug.cgi?id=178673
Patch by Youenn Fablet <youenn@apple.com> on 2017-10-25
Reviewed by Brady Eidson.
Source/WebCore:
Test: http/tests/workers/service/service-worker-fetch.html
Allow reusing of EmptyFrameLoaderClient for network loading in WebKit Service Worker environment.
Allow overriding the creation of a document loader, pageID, frameID and sessionID getters.
Allow the possibility to create synthetic documents for all ports.
Beefing up ServiceWorkerThreadProxy as it owns a Document and a Page that do nothing but server
the purpose of loading resources for a service worker thread.
* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::setResponse):
* loader/EmptyClients.cpp:
(WebCore::EmptyFrameLoaderClient::sessionID const):
(WebCore::EmptyFrameLoaderClient::createNetworkingContext):
(WebCore::createEmptyFrameNetworkingContext):
* loader/EmptyClients.h:
* loader/EmptyFrameLoaderClient.h: Added.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::initForSynthesizedDocument):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:
* workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::ServiceWorkerThread):
(WebCore::m_workerObjectProxy):
* workers/service/context/ServiceWorkerThread.h:
* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::create):
(WebCore::createPageForServiceWorker):
(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
(WebCore::ServiceWorkerThreadProxy::postTaskToLoader):
* workers/service/context/ServiceWorkerThreadProxy.h:
Test: http/tests/workers/service/service-worker-fetch.html
Source/WebKit:
ServiceWorkerContextManager makes use of the new ServiceWorkerThreadProxy.
It creates the necessary environment for the thread to make use of network loads, web sockets and cache storage.
Fetch is functional with these changes.
ServiceWorkerProcessProxy is introduced as a UIProcess proxy to the service worker process.
This process proxy is responsible to give the pageID used by all service worker thread instances for network loads.
ServiceWorkerContextManager is responsible to give a unique frameID for all service worker threads.
This is necessary as these two ids are currently needed for any network load.
ServiceWorkerThreadProxy creates its own FrameLoaderClient which is now used to get pageID, frameID and sessionID.
* UIProcess/ServiceWorkerProcessProxy.cpp: Added.
(WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
(WebKit::m_serviceWorkerPageID):
(WebKit::ServiceWorkerProcessProxy::~ServiceWorkerProcessProxy):
(WebKit::ServiceWorkerProcessProxy::start):
* UIProcess/ServiceWorkerProcessProxy.h: Added.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::getWorkerContextProcessConnection):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::initializeNewWebProcess):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::generatePageID):
* UIProcess/WebProcessProxy.h:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::startPingLoad):
* WebProcess/Network/WebLoaderStrategy.h:
* WebProcess/Storage/ServiceWorkerContextManager.cpp:
(WebKit::ServiceWorkerContextManager::ServiceWorkerContextManager):
(WebKit::ServiceWorkerContextManager::startServiceWorker):
(WebKit::ServiceWorkerContextManager::startFetch):
* WebProcess/Storage/ServiceWorkerContextManager.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::pageID const):
(WebKit::WebFrameLoaderClient::frameID const):
(WebKit::WebFrameLoaderClient::sessionID const):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getWorkerContextConnection):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
Source/WebKitLegacy/mac:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::pageID const):
(WebFrameLoaderClient::frameID const):
(WebFrameLoaderClient::sessionID const):
Added implementation to the new getters.
They are noop in the context of WK1.
Source/WebKitLegacy/win:
Added implementation to the new getters.
They are noop in the context of WK1.
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::pageID const):
(WebFrameLoaderClient::frameID const):
(WebFrameLoaderClient::sessionID const):
* WebCoreSupport/WebFrameLoaderClient.h:
LayoutTests:
* http/tests/workers/service/resources/service-worker-fetch-worker.js: Added.
* http/tests/workers/service/resources/service-worker-fetch.js: Added.
* http/tests/workers/service/service-worker-fetch-expected.txt: Added.
* http/tests/workers/service/service-worker-fetch.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223981
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
msaboff@apple.com [Wed, 25 Oct 2017 21:12:38 +0000 (21:12 +0000)]
REGRESSION(r223937): Use of -fobjc-weak causes build failures with older compilers
https://bugs.webkit.org/show_bug.cgi?id=178825
Reviewed by Mark Lam.
Enable ARC for ARM64_32. This eliminate the need for setting CLANG_ENABLE_OBJC_WEAK.
* Configurations/ToolExecutable.xcconfig:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223980
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
webkit@devinrousso.com [Wed, 25 Oct 2017 21:12:00 +0000 (21:12 +0000)]
Web Inspector: Canvas Tab: selected canvas card loses selection outline style while recording
https://bugs.webkit.org/show_bug.cgi?id=178814
<rdar://problem/
35177317>
Reviewed by Brian Burg.
* UserInterface/Views/CanvasOverviewContentView.css:
(.content-view.canvas-overview .content-view.canvas):
(.content-view.canvas-overview .content-view.canvas > :matches(header, .preview, footer)):
(.content-view.canvas-overview .content-view.canvas.selected > :matches(.preview, footer),):
(.content-view.canvas-overview .content-view.canvas > header):
(.content-view.canvas-overview .content-view.canvas.is-recording > header):
(.content-view.canvas-overview .content-view.canvas > .preview):
(.content-view.canvas-overview .content-view.canvas > footer):
(.content-view.canvas-overview .content-view.canvas.selected:not(.is-recording)): Deleted.
Instead of applying the border to the entire element, apply parts of the border to each of
its children so that we can choose what colors to use for each part.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223979
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
nvasilyev@apple.com [Wed, 25 Oct 2017 21:09:45 +0000 (21:09 +0000)]
Web Inspector: [PARITY] Styles Redesign: Add color gradient, bezier curve, and spring inline widgets
https://bugs.webkit.org/show_bug.cgi?id=178404
<rdar://problem/
35035992>
Reviewed by Devin Rousso.
Add inline widgets for the following CSS values:
- Gradients, e.g. `background-image: linear-gradient(yellow, orange)`
- Bezier curves, e.g. `transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55)`
- Spring functions, e.g. `transition-timing-function: spring(1, 2, 2, 4)`
* UserInterface/Models/Color.js:
(WI.Color.prototype.toString):
Don't throw. The are never try/catch blocks on the callsites.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._renderValue):
(WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
(WI.SpreadsheetStyleProperty.prototype._addGradientTokens):
(WI.SpreadsheetStyleProperty.prototype._addColorTokens):
(WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223978
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jmarcell@apple.com [Wed, 25 Oct 2017 20:44:29 +0000 (20:44 +0000)]
Versioning.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223977
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dewei_zhu@apple.com [Wed, 25 Oct 2017 19:48:57 +0000 (19:48 +0000)]
Fix a bug in syncing script that test/build syncer is never set.
https://bugs.webkit.org/show_bug.cgi?id=178772
Reviewed by Ryosuke Niwa.
Neither 'buildSyncer' nor 'testSyncer' is ever set.
Added a unit test to cover this case.
* server-tests/tools-sync-buildbot-integration-tests.js:
(createTriggerable): Refactor it to allow customized name.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers): Update syncer info accordingly.
(BuildbotTriggerable._testGroupMapForBuildRequests): Initialize build and test syncer to null.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223975
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Wed, 25 Oct 2017 19:42:16 +0000 (19:42 +0000)]
UNPACK_FLIP_Y is broken for MSE-backed videos
https://bugs.webkit.org/show_bug.cgi?id=178774
Reviewed by Dean Jackson.
Source/WebCore:
The global GLSL variable gl_Position can apparently only be set once, and any modifications
made after that initial set are ignored. So rather than implement flipping by changing
gl_Position.y, flip the texture coordinates instead.
Drive-by fix: some of the constants used in VideoTextureCopierCV are not defined on older
macOS versions, so make them optional.
Tests: fast/canvas/webgl/texImage2D-mse-flipY-false.html
fast/canvas/webgl/texImage2D-mse-flipY-true.html
* platform/graphics/cv/VideoTextureCopierCV.cpp:
(WebCore::transferFunctionFromString):
(WebCore::VideoTextureCopierCV::initializeUVContextObjects):
* platform/cocoa/CoreVideoSoftLink.cpp:
* platform/cocoa/CoreVideoSoftLink.h:
LayoutTests:
* fast/canvas/webgl/resources/orientation-flipped-fragmented.mp4: Added.
* fast/canvas/webgl/resources/orientation-normal-fragmented.mp4: Added.
* fast/canvas/webgl/texImage2D-mse-flipY-false-expected.txt: Added.
* fast/canvas/webgl/texImage2D-mse-flipY-false.html: Added.
* fast/canvas/webgl/texImage2D-mse-flipY-true-expected.txt: Added.
* fast/canvas/webgl/texImage2D-mse-flipY-true.html: Added.
* platform/ios/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223974
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Wed, 25 Oct 2017 19:36:08 +0000 (19:36 +0000)]
[Service Worker] Add stubs for serviceWorkerClient.type
https://bugs.webkit.org/show_bug.cgi?id=178812
Reviewed by Youenn Fablet.
Add stubs for serviceWorkerClient.type to match the latest specification:
- https://w3c.github.io/ServiceWorker/#enumdef-clienttype
* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* workers/service/ServiceWorkerClient.cpp:
(WebCore::ServiceWorkerClient::type const):
* workers/service/ServiceWorkerClient.h:
* workers/service/ServiceWorkerClient.idl:
* workers/service/ServiceWorkerClientType.h: Added.
* workers/service/ServiceWorkerClientType.idl: Added.
* workers/service/ServiceWorkerClients.h:
* workers/service/ServiceWorkerClients.idl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223973
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Wed, 25 Oct 2017 19:27:05 +0000 (19:27 +0000)]
Move mathml and page to unified souces
https://bugs.webkit.org/show_bug.cgi?id=178770
Rubber-stamped by Tim Horton.
* CMakeLists.txt:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223972
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
keith_miller@apple.com [Wed, 25 Oct 2017 19:06:42 +0000 (19:06 +0000)]
Fix implicit cast of enum, which seems to break the windows build of unified sources.
https://bugs.webkit.org/show_bug.cgi?id=178822
Reviewed by Saam Barati.
* bytecode/DFGExitProfile.h:
(JSC::DFG::FrequentExitSite::hash const):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223971
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
nvasilyev@apple.com [Wed, 25 Oct 2017 19:02:28 +0000 (19:02 +0000)]
Web Inspector: Styles Redesign: Newly added invalid property isn't immediately shown as invalid
https://bugs.webkit.org/show_bug.cgi?id=178488
Reviewed by Brian Burg.
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.newBlankProperty):
Call this.update to update _properties, _allProperties, _visibleProperties, and _allVisibleProperties.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled)):
(.spreadsheet-style-declaration-editor .property.invalid-name:not(.disabled)):
(.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .value):
When the property name is valid, but the value isn't, display red line-through only for the value.
This is how it works in the old styles sidebar as well.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
(WI.SpreadsheetCSSStyleDeclarationEditor):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty):
(WI.SpreadsheetStyleProperty.prototype.updateClassNames):
(WI.SpreadsheetStyleProperty.prototype._update):
Introduce updateClassNames method. Unlike _update, it doesn't change text selection or focus and
can be safely called on a property while it's being edited.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223970
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 25 Oct 2017 18:54:58 +0000 (18:54 +0000)]
fast/images/animated-gif-paint-after-animation.html flaky crash
https://bugs.webkit.org/show_bug.cgi?id=178510
Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-10-25
Reviewed by Said Abou-Hallawa.
ScalableImageDecoder was accessed from the main thread and the
image decoding thread without a mutex.
No new tests because there is no behavior change.
* platform/image-decoders/ScalableImageDecoder.h: Add m_mutex. Lock the mutex in setData.
* platform/image-decoders/ScalableImageDecoder.cpp:
(WebCore::ScalableImageDecoder::frameIsCompleteAtIndex const): Lock the mutex.
(WebCore::ScalableImageDecoder::frameHasAlphaAtIndex const): Ditto.
(WebCore::ScalableImageDecoder::frameBytesAtIndex const): Ditto.
(WebCore::ScalableImageDecoder::frameDurationAtIndex const): Ditto.
(WebCore::ScalableImageDecoder::createFrameImageAtIndex): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223968
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryanhaddad@apple.com [Wed, 25 Oct 2017 18:42:11 +0000 (18:42 +0000)]
Mark http/tests/loading/basic-credentials-sent-automatically.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=159427
Unreviewed test gardening.
* platform/mac/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223967
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 25 Oct 2017 18:38:48 +0000 (18:38 +0000)]
[WinCairo] Add WebKit platform files for wincairo webkit
https://bugs.webkit.org/show_bug.cgi?id=178000
Patch by Yousuke Kimoto <yousuke.kimoto@sony.com> on 2017-10-25
Reviewed by Alex Christensen.
* Platform/Module.h:
* Platform/SharedMemory.h:
(WebKit::SharedMemory::handle const):
* Platform/win/LoggingWin.cpp: Added. It is based on Source/WebCore/platform/win/LoggingWin.cpp
(WebKit::logLevelString):
* Platform/win/ModuleWin.cpp: Added.
(WebKit::Module::load):
(WebKit::Module::unload):
(WebKit::Module::platformFunctionPointer const):
* Platform/win/SharedMemoryWin.cpp: Added.
(WebKit::SharedMemory::Handle::Handle):
(WebKit::SharedMemory::Handle::~Handle):
(WebKit::SharedMemory::Handle::isNull const):
(WebKit::SharedMemory::Handle::encode const):
(WebKit::SharedMemory::Handle::clear):
(WebKit::getDuplicatedHandle):
(WebKit::SharedMemory::Handle::decode):
(WebKit::protectAttribute):
(WebKit::SharedMemory::allocate):
(WebKit::SharedMemory::create):
(WebKit::accessRights):
(WebKit::SharedMemory::map):
(WebKit::SharedMemory::adopt):
(WebKit::SharedMemory::~SharedMemory):
(WebKit::SharedMemory::createHandle):
(WebKit::SharedMemory::systemPageSize):
* PlatformWin.cmake:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223966
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 25 Oct 2017 18:32:46 +0000 (18:32 +0000)]
Unreviewed, rolling out r222945.
https://bugs.webkit.org/show_bug.cgi?id=178818
"It made WasmBench crash" (Requested by saamyjoon on #webkit).
Reverted changeset:
"bmalloc mutex should be adaptive"
https://bugs.webkit.org/show_bug.cgi?id=177839
https://trac.webkit.org/changeset/222945
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223965
268f45cc-cd09-0410-ab3c-
d52691b4dbfc