WebKit-https.git
4 years agoMake it more obvious when using an unaccelerated image buffer, and fix a few callers...
timothy_horton@apple.com [Tue, 22 Sep 2015 18:45:54 +0000 (18:45 +0000)]
Make it more obvious when using an unaccelerated image buffer, and fix a few callers who do
https://bugs.webkit.org/show_bug.cgi?id=149428

Reviewed by Simon Fraser and Darin Adler.

* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::createCompatibleBuffer):
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::create):
Make the RenderingMode parameter to ImageBuffer::create non-optional.

* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::renderingMode):
* platform/graphics/GraphicsTypes.h:
Add renderingMode() getter so that every caller doesn't need to do the conversion to RenderingMode.

* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::image):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createRasterShape):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::putByteArray):
These five callers create unconditionally unaccelerated ImageBuffers which
should probably instead respect the acceleration bit from the context
that the ImageBuffer will eventually be painted into. Bugs have been filed.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::createCompositingBuffer):
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::drawPattern):
Adjust the argument order and remove defaults which are passed explicitly.

* page/FrameSnapshotting.cpp:
(WebCore::snapshotFrameRect):
Snapshots are (currently) meant to be taken without accelerated drawing.
Make this explicit.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::drawPattern):
Make use of createCompatibleBuffer. This caller was previously creating
an unconditionally unaccelerated context!

* platform/graphics/NamedImageGeneratedImage.cpp:
(WebCore::NamedImageGeneratedImage::drawPattern):
Remove a comment.

* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::getScratchBuffer):
ShadowBlur is only used with unaccelerated contexts, so it's OK to hardcode Unaccelerated here.

* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::asImageBuffer):
(WebCore::FilterEffect::createImageBufferResult):
Flip the order of the arguments.

(WebCore::FilterEffect::openCLImageToImageBuffer):
This caller was previously creating an unaccelerated buffer; instead, match the destination buffer.

* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::allocateBackingStoreIfNeeded):
Adjust the argument order and remove defaults which are passed explicitly.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
Get rid of the unneeded renderingMode local, and factor out retrieval of Frame.

* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
These two callers are unconditionally creating unaccelerated buffers,
and changing this to match the destination context seems to actually
break things. This needs further investigation.

* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::createMaskAndSwapContextForTextGradient):
This caller was previously creating an unaccelerated buffer; instead, match the destination buffer.

* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
Make use of renderingMode().

* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::createImageBuffer):
Adjust the argument order.

* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::nativeImageForCurrentFrame):

* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::imageForCurrentSharingServicePickerItem):

* Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
(WebKit::ThreadSafeCoordinatedSurface::create):

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

4 years agoXMLHttpRequest properties should be on the prototype
cdumez@apple.com [Tue, 22 Sep 2015 18:27:26 +0000 (18:27 +0000)]
XMLHttpRequest properties should be on the prototype
https://bugs.webkit.org/show_bug.cgi?id=149465

Reviewed by Darin Adler.

Source/WebCore:

Move most XMLHttpRequest properties to the prototype, as per the Web IDL
specification. This should be web-compatible now that properties on the
prototype are configurable after r190104.

The 'response' / 'responseText' properties are still incorrectly on the
instance because they are currently using a [CustomGetter] in our IDL
and the bindings generator currently does not move such properties to
the prototype.

Test:
fast/xmlhttprequest/xmlhttprequest-properties-prototype.html
js/dom/xhr-prototype-define-property.html

* bindings/scripts/CodeGeneratorJS.pm:
(InterfaceRequiresAttributesOnInstanceForCompatibility): Deleted.

LayoutTests:

Add layout test to check that XMLHttpRequest properties are on the
prototype and have the right properties (enumerable and configurable).

* fast/xmlhttprequest/xmlhttprequest-properties-prototype-expected.txt: Added.
* fast/xmlhttprequest/xmlhttprequest-properties-prototype.html: Added.

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

4 years agoUnreviewed, add myself to the committers list.
n_wang@apple.com [Tue, 22 Sep 2015 17:54:12 +0000 (17:54 +0000)]
Unreviewed, add myself to the committers list.

* Scripts/webkitpy/common/config/contributors.json:

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

4 years ago[WK2][NetworkCache] New entry bodies remain in dirty memory after being written to...
akling@apple.com [Tue, 22 Sep 2015 17:48:28 +0000 (17:48 +0000)]
[WK2][NetworkCache] New entry bodies remain in dirty memory after being written to disk.
<https://webkit.org/b/149463>

Reviewed by Antti Koivisto.

Call msync(MS_ASYNC) on cache entry bodies after writing their data to a
memory-mapped file. This turns the previously dirty memory into clean memory,
reducing our effective footprint.

I previously believed this would happen automatically when the kernel finds
itself under memory pressure, around the same time as it starts dropping
volatile pages. Turns out that's not the case. Even under considerable pressure,
we never flush this memory to file. So let's take care of it ourselves.

If this ends up generating more IO activity than we're comfortable with on some
scenario, we can look at throttling.

* NetworkProcess/cache/NetworkCacheData.cpp:
(WebKit::NetworkCache::Data::mapToFile):

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

4 years agoDrop support for legacy EntityReference DOM Node type
cdumez@apple.com [Tue, 22 Sep 2015 17:17:12 +0000 (17:17 +0000)]
Drop support for legacy EntityReference DOM Node type
https://bugs.webkit.org/show_bug.cgi?id=149348

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C DOM test now that more checks are passing.

* web-platform-tests/dom/historical-expected.txt:

Source/WebCore:

Drop support for legacy EntityReference DOM Node type.

EntityReference has been dropped from the DOM specification:
- https://dom.spec.whatwg.org/#dom-core-changes

EntityReference is not supported in Firefox:
- https://developer.mozilla.org/en-US/docs/Web/API/EntityReference
- https://developer.mozilla.org/en-US/docs/Web/API/NodeIterator.expandEntityReferences
- https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker.expandEntityReferences

Chrome dropped support for EntityReference a while back (May 2013):
- EntityReference: https://code.google.com/p/chromium/issues/detail?id=226628
- NodeFilter / TreeWalker.expandEntityReferences:
  - https://groups.google.com/a/chromium.org/d/msg/blink-dev/-ZO3eja4maA/86T13XJwQpUJ
  - https://src.chromium.org/viewvc/blink?view=rev&revision=185771

IE also dropped support for EntityReference Nodes:
https://msdn.microsoft.com/library/ff974819(v=vs.85).aspx (Remarks section)

No new tests, already covered by existing test.

* DerivedSources.cpp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/WebKitDOMPrivate.cpp:
(WebKit::wrap): Deleted.
* bindings/js/JSNodeCustom.cpp:
(WebCore::createWrapperInline): Deleted.
* bindings/objc/DOM.mm:
(kitClass): Deleted.
* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Skip webkit_dom_document_create_entity_reference until Carlos fixes it.
* dom/Attr.cpp:
(WebCore::Attr::childTypeAllowed):
(WebCore::Attr::childrenChanged): Deleted.
* dom/Attr.h:
* dom/ContainerNode.cpp:
(WebCore::checkAcceptChild): Deleted.
(WebCore::checkAcceptChildGuaranteedNodeTypes): Deleted.
(WebCore::ContainerNode::removeChild): Deleted.
* dom/Document.cpp:
(WebCore::Document::createEntityReference):
(WebCore::Document::createNodeIterator):
(WebCore::Document::createTreeWalker):
(WebCore::Document::createEditingTextNode): Deleted.
(WebCore::Document::importNode): Deleted.
(WebCore::Document::adoptNode): Deleted.
(WebCore::Document::scheduleForcedStyleRecalc): Deleted.
(WebCore::Document::scheduleStyleRecalc): Deleted.
(WebCore::Document::childTypeAllowed): Deleted.
(WebCore::Document::canAcceptChild): Deleted.
* dom/Document.h:
* dom/Document.idl:
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::childTypeAllowed): Deleted.
* dom/Element.cpp:
(WebCore::Element::childTypeAllowed): Deleted.
* dom/EntityReference.cpp:
(WebCore::EntityReference::EntityReference):
* dom/EntityReference.h:
* dom/EntityReference.idl:
* dom/Node.cpp:
(WebCore::Node::setNodeValue):
(WebCore::Node::dumpStatistics): Deleted.
(WebCore::Node::childNodes): Deleted.
(WebCore::Node::lastDescendant): Deleted.
(WebCore::Node::isDescendantOf): Deleted.
(WebCore::Node::textContent): Deleted.
(WebCore::Node::ancestorElement): Deleted.
(WebCore::hashPointer): Deleted.
* dom/Node.h:
(WebCore::Node::isDocumentTypeNode): Deleted.
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::NodeIterator):
* dom/NodeIterator.h:
(WebCore::NodeIterator::create):
* dom/NodeIterator.idl:
* dom/Range.cpp:
(WebCore::Range::checkDeleteExtract):
(WebCore::lengthOfContentsInNode): Deleted.
(WebCore::Range::processContentsBetweenOffsets): Deleted.
(WebCore::Range::insertNode): Deleted.
(WebCore::Range::checkNodeWOffset): Deleted.
(WebCore::Range::checkNodeBA): Deleted.
(WebCore::Range::cloneRange): Deleted.
(WebCore::Range::selectNode): Deleted.
(WebCore::Range::selectNodeContents): Deleted.
(WebCore::Range::surroundContents): Deleted.
(WebCore::Range::shadowRoot): Deleted.
(WebCore::Range::pastLastNode): Deleted.
(WebCore::Range::absoluteBoundingBox): Deleted.
(WebCore::Range::absoluteTextRects): Deleted.
* dom/Range.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::childTypeAllowed): Deleted.
* dom/Traversal.cpp:
(WebCore::NodeIteratorBase::NodeIteratorBase):
(WebCore::NodeIteratorBase::acceptNode): Deleted.
* dom/Traversal.h:
(WebCore::NodeIteratorBase::expandEntityReferences):
* dom/TreeWalker.cpp:
(WebCore::TreeWalker::TreeWalker):
* dom/TreeWalker.h:
(WebCore::TreeWalker::create):
* dom/TreeWalker.idl:
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendStartMarkup): Deleted.
* xml/XPathUtil.cpp:
(WebCore::XPath::isValidContextNode): Deleted.

Source/WebKit2:

Drop handling EntityReference Nodes.

* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
(WebKit::WKDOMNodeClass): Deleted.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::isAssistableElement):

LayoutTests:

Drop several outdated DOM compliance tests. Update / Rebaseline others.

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

4 years agoUnreviewed, rebaseline several W3C html tests on iOS after r190106 and r190085.
cdumez@apple.com [Tue, 22 Sep 2015 16:13:34 +0000 (16:13 +0000)]
Unreviewed, rebaseline several W3C html tests on iOS after r190106 and r190085.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:
* platform/ios-simulator/imported/w3c/web-platform-tests/html/semantics/interfaces-expected.txt:

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

4 years agoUnreviewed 32-bit Yosemite build fix.
eric.carlson@apple.com [Tue, 22 Sep 2015 16:13:10 +0000 (16:13 +0000)]
Unreviewed 32-bit Yosemite build fix.

* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
(WebCore::WebAudioSourceProviderAVFObjC::provideInput):

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

4 years agoUnreviewed, rebaseline fast/table/rowindex.html after r190099.
cdumez@apple.com [Tue, 22 Sep 2015 16:11:06 +0000 (16:11 +0000)]
Unreviewed, rebaseline fast/table/rowindex.html after r190099.

* platform/efl/fast/table/rowindex-expected.txt:
* platform/gtk/fast/table/rowindex-expected.txt:
* platform/win/fast/table/rowindex-expected.txt:

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

4 years ago[MediaStream Mac] implement WebAudioSourceProvider
eric.carlson@apple.com [Tue, 22 Sep 2015 14:31:24 +0000 (14:31 +0000)]
[MediaStream Mac] implement WebAudioSourceProvider
https://bugs.webkit.org/show_bug.cgi?id=149419

Reviewed by Darin Adler.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::audioSourceProvider): New.
* Modules/mediastream/MediaStreamTrack.h:

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createMediaStreamSource): Rewrite.

* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): We know the Vector
  size, so reserve capacity.

* Modules/webaudio/MediaStreamAudioSource.cpp:
(WebCore::MediaStreamAudioSource::audioSourceProvider): Add.
* Modules/webaudio/MediaStreamAudioSource.h:
(WebCore::MediaStreamAudioSource::~MediaStreamAudioSource):
(WebCore::MediaStreamAudioSource::deviceId):
(WebCore::MediaStreamAudioSource::setDeviceId):
(WebCore::MediaStreamAudioSource::useIDForTrackID): Deleted.

* Modules/webaudio/MediaStreamAudioSourceNode.cpp:
(WebCore::MediaStreamAudioSourceNode::create): Context and track can't be null so take references.
(WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode): Ditto.
(WebCore::MediaStreamAudioSourceNode::~MediaStreamAudioSourceNode): Clear provider client.
(WebCore::MediaStreamAudioSourceNode::setFormat): Create a resampler when necessary.
(WebCore::MediaStreamAudioSourceNode::process): Process.
(WebCore::MediaStreamAudioSourceNode::reset): Deleted.
* Modules/webaudio/MediaStreamAudioSourceNode.h:
(WebCore::MediaStreamAudioSourceNode::mediaStream):
(WebCore::MediaStreamAudioSourceNode::audioSourceProvider): Deleted.

* WebCore.xcodeproj/project.pbxproj: Add WebAudioSourceProviderAVFObjC.cpp/h.

* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::audioSourceProvider): New, passthrough to source.
* platform/mediastream/MediaStreamTrackPrivate.h:
* platform/mediastream/RealtimeMediaSource.h:
(WebCore::RealtimeMediaSource::audioSourceProvider):

* platform/mediastream/mac/AVAudioCaptureSource.h:
* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::audioSourceProvider): New.
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
* platform/mediastream/mac/AVMediaCaptureSource.h:
* platform/mediastream/mac/AVMediaCaptureSource.mm:
(WebCore::AVMediaCaptureSource::audioSourceProvider): Assert, this shouldn't be reachable.

* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h: Added.
* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm: Added.
(WebCore::WebAudioSourceProviderAVFObjC::create):
(WebCore::WebAudioSourceProviderAVFObjC::WebAudioSourceProviderAVFObjC):
(WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC):
(WebCore::WebAudioSourceProviderAVFObjC::startProducingData):
(WebCore::WebAudioSourceProviderAVFObjC::stopProducingData):
(WebCore::WebAudioSourceProviderAVFObjC::provideInput):
(WebCore::WebAudioSourceProviderAVFObjC::setClient):
(WebCore::operator==):
(WebCore::operator!=):
(WebCore::WebAudioSourceProviderAVFObjC::prepare):
(WebCore::WebAudioSourceProviderAVFObjC::unprepare):
(WebCore::WebAudioSourceProviderAVFObjC::process):

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

4 years agoSource/WebCore:
commit-queue@webkit.org [Tue, 22 Sep 2015 13:59:38 +0000 (13:59 +0000)]
Source/WebCore:
CurrentTime on mediaController is set as 0 when playback is completed.
https://bugs.webkit.org/show_bug.cgi?id=149154

Patch by sangdeug.kim <sangdeug.kim@samsung.com> on 2015-09-22
Reviewed by Eric Carlson.

Test : media/media-controller-time-clamp.html

* html/MediaController.cpp:
(MediaController::setCurrentTime):
(MediaController::updatePlaybackState):
* html/MediaController.h:

LayoutTests:
Add test for checking currentTime of mediacontroller when playback is completed.
https://bugs.webkit.org/show_bug.cgi?id=149154

Patch by sangdeug.kim <sangdeug.kim@samsung.com> on 2015-09-22
Reviewed by Eric Carlson.

* media/media-controller-time-clamp-expected.txt:
* media/media-controller-time-clamp.html:

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

4 years agoUnreviewed, rolling out r189616.
commit-queue@webkit.org [Tue, 22 Sep 2015 12:21:31 +0000 (12:21 +0000)]
Unreviewed, rolling out r189616.
https://bugs.webkit.org/show_bug.cgi?id=149456

suspected cause of multiple regressions (Requested by kling on
#webkit).

Reverted changeset:

"[JSC] Weak should only accept cell pointees."
https://bugs.webkit.org/show_bug.cgi?id=148955
http://trac.webkit.org/changeset/189616

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

4 years agoFix the all-in-one build with GCC
ossy@webkit.org [Tue, 22 Sep 2015 10:06:07 +0000 (10:06 +0000)]
Fix the all-in-one build with GCC
https://bugs.webkit.org/show_bug.cgi?id=148428

Reviewed by Darin Adler.

Removed Source/WebCore/inspector/InspectorIndexedDBAgent.cpp from the all-in-one build.

* WebCore.vcxproj/WebCore.vcxproj:
* inspector/InspectorAllInOne.cpp:

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

4 years agoFix warnings in IDLParser.pm
ossy@webkit.org [Tue, 22 Sep 2015 09:32:12 +0000 (09:32 +0000)]
Fix warnings in IDLParser.pm
https://bugs.webkit.org/show_bug.cgi?id=149406

Reviewed by Alex Christensen.

* bindings/scripts/IDLParser.pm:
(typeHasNullableSuffix):
(typeRemoveNullableSuffix):

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

4 years agoWeb Inspector: update Esprima to latest version
sbarati@apple.com [Tue, 22 Sep 2015 08:26:50 +0000 (08:26 +0000)]
Web Inspector: update Esprima to latest version
https://bugs.webkit.org/show_bug.cgi?id=148960

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Esprima version 2.6 further supports ES6. We're
updating to it so we can support more ES6 features
in our script syntax tree.

* UserInterface/External/Esprima/LICENSE:
* UserInterface/External/Esprima/esprima.js:
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration.gatherIdentifiers):
(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):

LayoutTests:

* inspector/model/parse-script-syntax-tree-expected.txt:
* inspector/model/parse-script-syntax-tree.html:

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

4 years agoinvalidateSlotAssignments should trigger style recalc
rniwa@webkit.org [Tue, 22 Sep 2015 08:17:09 +0000 (08:17 +0000)]
invalidateSlotAssignments should trigger style recalc
https://bugs.webkit.org/show_bug.cgi?id=149447

Reviewed by Antti Koivisto.

Source/WebCore:

Invalidate the render tree of a shadow host when a new child is inserted, an existing child is removed,
or slot attribute of a child is modified.

No new tests. Covered by existing tests added in r190101.

* dom/Element.cpp:
(WebCore::Element::childrenChanged): Call invalidateSlotAssignments or invalidateDefaultSlotAssignments
depending on the types of children being inserted or removed since text nodes can only be assigned into
a default slot.
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::invalidateSlotAssignments):
(WebCore::ShadowRoot::invalidateDefaultSlotAssignments): Added.
* dom/ShadowRoot.h:
* dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::invalidate): Reconstruct the render tree for the whole host. We can optimize
in the future by only invalidating active slot elements instead.
(WebCore::SlotAssignment::invalidateDefaultSlot): Added.
* dom/SlotAssignment.h:

LayoutTests:

Removed failing expectations from newly passing tests.

Also added test cases for inserting and removing text nodes, and modified the style recalc tests
to force layout between each DOM change to test case separately.

* fast/shadow-dom/shadow-layout-after-host-child-changes.html:
* fast/shadow-dom/shadow-layout-after-inserting-or-removing-host-child.html:
* fast/shadow-dom/shadow-layout-after-slot-changes.html:
* platform/mac/TestExpectations:

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

4 years agoWeb Inspector: Basic Block Annotations and Type Profiler annotations wrong for script...
sbarati@apple.com [Tue, 22 Sep 2015 07:35:27 +0000 (07:35 +0000)]
Web Inspector: Basic Block Annotations and Type Profiler annotations wrong for script with "class" with default constructor
https://bugs.webkit.org/show_bug.cgi?id=149248

Reviewed by Mark Lam.

We keep track of which functions have and have not
executed so we can show visually, inside the inspector,
which functions have and have not executed. With a default
constructor, our parser parses code that isn't in the actual
JavaScript source code of the user. Our parser would then
give us a range of starting at "1" to "1 + default constructor length"
as being the text range of a function. But, this would then pollute
actual source code that was at these ranges.

Therefore, we should treat these default constructor source
codes as having "invalid" ranges. We use [UINT_MAX, UINT_MAX]
as the invalid range. This range has the effect of not polluting
valid ranges inside the source code.

* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::unlinkedCodeBlockFor):
(JSC::UnlinkedFunctionExecutable::setInvalidTypeProfilingOffsets):
* bytecode/UnlinkedFunctionExecutable.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitNewDefaultConstructor):

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

4 years ago[EFL] Build break when DEVELOPER_MODE is OFF
ryuan.choi@navercorp.com [Tue, 22 Sep 2015 07:29:44 +0000 (07:29 +0000)]
[EFL] Build break when DEVELOPER_MODE is OFF
https://bugs.webkit.org/show_bug.cgi?id=149448

Reviewed by Gyuyoung Kim.

Since r187191, DatabaseProcessMainUnix is missing in symbol filter.

* Source/cmake/eflsymbols.filter:

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

4 years agotime element should use HTMLTimeElement interface
cdumez@apple.com [Tue, 22 Sep 2015 06:25:02 +0000 (06:25 +0000)]
time element should use HTMLTimeElement interface
https://bugs.webkit.org/show_bug.cgi?id=148840
<rdar://problem/22586690>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C HTML test now that more checks are passing.

* web-platform-tests/html/semantics/text-level-semantics/the-time-element/001-expected.txt:

Source/WebCore:

Time element should be an instance of HTMLTimeElement instead of generic
HTMLElement:
https://html.spec.whatwg.org/multipage/semantics.html#the-time-element

Firefox exposes HTMLTimeElement. This patch aligns our behavior with
the specification and Firefox.

No new tests, already covered by existing test.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLElementsAllInOne.cpp:
* html/HTMLTagNames.in:
* html/HTMLTimeElement.cpp: Added.
(WebCore::HTMLTimeElement::create):
(WebCore::HTMLTimeElement::HTMLTimeElement):
* html/HTMLTimeElement.h: Added.
* html/HTMLTimeElement.idl: Added.

LayoutTests:

Rebaseline existing test now that HTMLTimeElement is exposed on the
global Window object.

* js/dom/global-constructors-attributes-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

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

4 years agoImplement the comma instruction in WebAssembly
sukolsak@gmail.com [Tue, 22 Sep 2015 06:01:14 +0000 (06:01 +0000)]
Implement the comma instruction in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=149425

Reviewed by Geoffrey Garen.

This patch implements the comma instruction in WebAssembly. The comma
instruction evaluates the left operand and then the right operand and
returns the value of the right operand.

* tests/stress/wasm-comma.js: Added.
(shouldBe):
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::discard):
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::parseExpressionI32):
(JSC::WASMFunctionParser::parseExpressionF32):
(JSC::WASMFunctionParser::parseExpressionF64):
(JSC::WASMFunctionParser::parseComma):
* wasm/WASMFunctionParser.h:
* wasm/WASMFunctionSyntaxChecker.h:
(JSC::WASMFunctionSyntaxChecker::discard):

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

4 years agoDOM attributes on prototypes should be configurable
cdumez@apple.com [Tue, 22 Sep 2015 05:36:53 +0000 (05:36 +0000)]
DOM attributes on prototypes should be configurable
https://bugs.webkit.org/show_bug.cgi?id=134364

Reviewed by Sam Weinig.

Source/WebCore:

DOM attributes on prototypes should be configurable as per the Web IDL
specification:
https://heycam.github.io/webidl/#es-attributes

This patch aligns our behavior with the specification and Firefox.

Test: fast/dom/attributes-configurable.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributesHashTable):

LayoutTests:

Add a layout test to confirm that attributes on prototypes are configurable.

* fast/dom/attributes-configurable-expected.txt: Added.
* fast/dom/attributes-configurable.html: Added.

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

4 years agoAlways use the compiler's CAS implementation and get rid of ENABLE(COMPARE_AND_SWAP)
fpizlo@apple.com [Tue, 22 Sep 2015 04:34:19 +0000 (04:34 +0000)]
Always use the compiler's CAS implementation and get rid of ENABLE(COMPARE_AND_SWAP)
https://bugs.webkit.org/show_bug.cgi?id=149438

Reviewed by Mark Lam.

Source/JavaScriptCore:

* heap/HeapInlines.h:
(JSC::Heap::reportExtraMemoryVisited):
(JSC::Heap::deprecatedReportExtraMemory):

Source/WebCore:

No new tests because no new behavior.

* platform/text/TextBreakIterator.cpp:
(WebCore::compareAndSwapNonSharedCharacterBreakIterator):
(WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator):

Source/WTF:

* wtf/Atomics.h: Make weakCompareAndSwap() just forward to the system CAS via WTF::Atomic.
(WTF::weakCompareAndSwap):
(WTF::weakCompareAndSwapUIntPtr): Deleted.
(WTF::weakCompareAndSwapSize): Deleted.
* wtf/Bitmap.h: Small changes to use the new API.
(WTF::WordType>::concurrentTestAndSet):
* wtf/Platform.h: Remove ENABLE(COMPARE_AND_SWAP)

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

4 years agoAllow DataDetectors to pre-filter telephone number menu items
timothy_horton@apple.com [Tue, 22 Sep 2015 04:27:09 +0000 (04:27 +0000)]
Allow DataDetectors to pre-filter telephone number menu items
https://bugs.webkit.org/show_bug.cgi?id=149444
<rdar://problem/19286320>

Reviewed by Sam Weinig.

Source/WebCore:

* platform/spi/mac/DataDetectorsSPI.h:
Add some SPI.

Source/WebKit2:

* Platform/mac/MenuUtilities.mm:
(WebKit::menuItemForTelephoneNumber):
(WebKit::menuForTelephoneNumber):
Let DataDetectors know what kind of items we want, so that they can avoid
some unnecessary work in cases where we were just going to throw away the items anyway.

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

4 years agoAdd some style recalc tests for shadow DOM
rniwa@webkit.org [Tue, 22 Sep 2015 04:01:29 +0000 (04:01 +0000)]
Add some style recalc tests for shadow DOM
https://bugs.webkit.org/show_bug.cgi?id=149445

Reviewed by Antti Koivisto.

Add tests to make sure we trigger necessary style recalc.

* fast/shadow-dom/shadow-layout-after-attach-shadow-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/shadow-layout-after-attach-shadow.html: Added.
* fast/shadow-dom/shadow-layout-after-host-child-changes-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/shadow-layout-after-host-child-changes.html: Added.
* fast/shadow-dom/shadow-layout-after-inserting-or-removing-host-child-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/shadow-layout-after-inserting-or-removing-host-child.html: Added.
* fast/shadow-dom/shadow-layout-after-slot-changes-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/shadow-layout-after-slot-changes.html: Added.
* platform/mac/TestExpectations:

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

4 years agohttps://bugs.webkit.org/show_bug.cgi?id=149415
ap@apple.com [Tue, 22 Sep 2015 03:06:04 +0000 (03:06 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=149415
REGRESSION (r182648): UIWebView does not set location.hash synchronously
<rdar://problem/22169467>

Reviewed by Darin Adler.

* fast/loader/location-hash-user-gesture-expected.txt: Added.
* fast/loader/location-hash-user-gesture.html: Added.
* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoUpdate HTMLTableRowElement.rowIndex to behave according to the specification
cdumez@apple.com [Tue, 22 Sep 2015 02:57:44 +0000 (02:57 +0000)]
Update HTMLTableRowElement.rowIndex to behave according to the specification
https://bugs.webkit.org/show_bug.cgi?id=148842
<rdar://problem/22586914>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C HTML test now that one more check is passing.

* web-platform-tests/html/semantics/tabular-data/the-tr-element/rowIndex-expected.txt:

Source/WebCore:

Update HTMLTableRowElement.rowIndex to behave according to the
specification:
https://html.spec.whatwg.org/multipage/tables.html#dom-tr-rowindex

In particular, rowIndex no longer returns -1 for <tr> elements that are
direct children of the table Element. Also,<tr> Elements in all <thead> /
<tfoot> children of the table Element now get a rowIndex, as per the
specification:
- https://html.spec.whatwg.org/multipage/tables.html#dom-table-rows

Previously, only <tr> elements in the first <thead> and the first <tbody>
children of the table would get a rowIndex.

Also, we now abort early and return -1 if the row is a grand-child of a
table element but its direct parent is not a <thead> / <tbody> / <tfoot>.
This avoid unnecessary traversal and matches the specification.

The code is refactored a bit to leverage HTMLTableElement.rows(), as
per the specification:
"return the index of the tr element in that table element's rows collection"

Previously, we would duplicate the table traversal logic. This
simplifies the code and fixes a bug as the traversal logic was slightly
different here and in HTMLTableRowsCollection. Because of this, only
<tr> elements in the first <thead> / <tfoot> would get a rowIndex.
Performance should be similar.

No new tests, already covered by existing test.

* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::rowIndex):
(WebCore::HTMLTableRowElement::sectionRowIndex): Deleted.
(WebCore::HTMLTableRowElement::insertCell): Deleted.

LayoutTests:

Rebaseline existing test because rows in all <thead> / <tfoot> children
of the <table> Element now get a rowIndex.

* platform/mac/fast/table/rowindex-expected.txt:

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

4 years agoAdd more rendering tests for shadow DOM
rniwa@webkit.org [Tue, 22 Sep 2015 02:26:28 +0000 (02:26 +0000)]
Add more rendering tests for shadow DOM
https://bugs.webkit.org/show_bug.cgi?id=149437

Reviewed by Antti Koivisto.

Added various tests for shadow tree rendering as well as tests for :host pseudo class and ::slotted pseudo element.

* fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after.html: Added.
* fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules.html: Added.
* fast/shadow-dom/css-scoping-shadow-host-functional-rule-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-host-functional-rule.html: Added.
* fast/shadow-dom/css-scoping-shadow-host-rule-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-host-rule.html: Added.
* fast/shadow-dom/css-scoping-shadow-host-with-before-after-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-host-with-before-after.html: Added.
* fast/shadow-dom/css-scoping-shadow-slot-display-override-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-slot-display-override.html: Added.
* fast/shadow-dom/css-scoping-shadow-slotted-rule-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-slotted-rule.html: Added.
* fast/shadow-dom/css-scoping-shadow-with-outside-rules-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-with-outside-rules.html: Added.
* platform/mac/TestExpectations:

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

4 years agoFix release builds with security assertion after r190007.
rniwa@webkit.org [Tue, 22 Sep 2015 01:27:54 +0000 (01:27 +0000)]
Fix release builds with security assertion after r190007.

* dom/DocumentOrderedMap.cpp:
* dom/DocumentOrderedMap.h:

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

4 years agofunctionProtoFuncToString should not rely on typeProfilingEndOffset()
sbarati@apple.com [Tue, 22 Sep 2015 01:21:47 +0000 (01:21 +0000)]
functionProtoFuncToString should not rely on typeProfilingEndOffset()
https://bugs.webkit.org/show_bug.cgi?id=149429

Reviewed by Geoffrey Garen.

We should be able to freely change typeProfilingEndOffset()
without worrying we will break Function.prototype.toString.

* runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncToString):

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

4 years ago[Threaded Compositor] Modified to use reference of GraphicsContext instead of pointer
yoon@igalia.com [Tue, 22 Sep 2015 00:51:41 +0000 (00:51 +0000)]
[Threaded Compositor] Modified to use reference of GraphicsContext instead of pointer
https://bugs.webkit.org/show_bug.cgi?id=149399

Reviewed by Darin Adler.

This fixes build failure after r189144

Source/WebCore:

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaint):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
* platform/graphics/texmap/coordinated/CoordinatedSurface.h:
* platform/graphics/texmap/coordinated/Tile.cpp:
(WebCore::Tile::paintToSurfaceContext):
* platform/graphics/texmap/coordinated/Tile.h:
* platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:
* platform/graphics/texmap/coordinated/UpdateAtlas.cpp:

Source/WebKit2:

* Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
(WebKit::ThreadSafeCoordinatedSurface::paintToSurface):
(WebKit::ThreadSafeCoordinatedSurface::beginPaint):
(WebKit::ThreadSafeCoordinatedSurface::endPaint):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:

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

4 years ago[Win] Unreviewed build fix.
bfulgham@apple.com [Tue, 22 Sep 2015 00:38:14 +0000 (00:38 +0000)]
[Win] Unreviewed build fix.

* WebKit.vcxproj/WebKit/WebKitApple.props: We need to link against
libdispatch on Windows.

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

4 years agoThe binding for getDistributedNodes unnecessarily makes a vector of nodes
rniwa@webkit.org [Tue, 22 Sep 2015 00:26:06 +0000 (00:26 +0000)]
The binding for getDistributedNodes unnecessarily makes a vector of nodes
https://bugs.webkit.org/show_bug.cgi?id=149434

Reviewed by Darin Adler.

Added a jsArray for const Vector<T*>* so that we can generate the binding code for getDistributedNodes()
without having to create Vector<RefPtr<Node>> out of Vector<Node*>*.

* bindings/js/JSDOMBinding.h:
(WebCore::jsArray): Added.
* html/HTMLSlotElement.cpp:
(WebCore::HTMLSlotElement::assignedNodes):
(WebCore::HTMLSlotElement::getDistributedNodes): Deleted.
* html/HTMLSlotElement.h:
* html/HTMLSlotElement.idl:

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

4 years agoREGRESSION (r182648): UIWebView does not set location.hash synchronously
ap@apple.com [Tue, 22 Sep 2015 00:21:22 +0000 (00:21 +0000)]
REGRESSION (r182648): UIWebView does not set location.hash synchronously
https://bugs.webkit.org/show_bug.cgi?id=149415
<rdar://problem/22169467>

Reviewed by Darin Adler.

The problem was that the delegate in UI thread became asynchronous due to calling
into LaunchServices.

* WebCoreSupport/WebFrameLoaderClient.mm: (shouldTryAppLink): Don't attempt app
links for same domain navigations. This check is part of substantially more complicated
logic in WebKit2 that I don't understand, but that should be enough to demonstrate
that this fix is an improvement at least.

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

4 years agoSource/WebCore:
bfulgham@apple.com [Tue, 22 Sep 2015 00:07:40 +0000 (00:07 +0000)]
Source/WebCore:
[Win] Show tiled drawing debug overlay on Windows
https://bugs.webkit.org/show_bug.cgi?id=149426

Reviewed by Dean Jackson.

No new tests: No change in behavior.

* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::PlatformCALayer::drawRepaintIndicator): Revise signature to accept
a scale value and a font size.
(WebCore::PlatformCALayer::drawTextAtPoint): Revise signature for new arguments.
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::drawTileMapContents): Removing scaling and text drawing code,
and call common CALayer drawing routine.
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::create): Switch to nullptr.
(WebCore::CACFLayerTreeHost::CACFLayerTreeHost): Switch to C++14 initializers.
(WebCore::CACFLayerTreeHost::setPage): Added.
(WebCore::CACFLayerTreeHost::rootLayer): Update debug info layer if requested by settings.
(WebCore::CACFLayerTreeHost::layerTreeDidChange): Ditto.
(WebCore::CACFLayerTreeHost::mainFrameTiledBacking): Added.
(WebCore::CACFLayerTreeHost::updateDbugInfoLayer): Added.
* platform/graphics/ca/win/CACFLayerTreeHost.h:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(WebCore::PlatformCALayerWin::drawTextAtPoint): Revised signature for new arguments. Use
argument for font size (rather than hard-coded '18'). Adjust font size by passed scale value.
* platform/graphics/ca/win/PlatformCALayerWin.h:

Source/WebKit/win:
[Win] Show tiled drawing debug overlay on Windows
https://bugs.webkit.org/show_bug.cgi?id=149426

Reviewed by Dean Jackson.

* Interfaces/IWebPreferencesPrivate.idl: Add new IWebPreferencesPrivate3 API version
so we can add new methods this cycle.
* WebPreferenceKeysPrivate.h: Add key for 'WebKitShowTiledScrollingIndicator'
* WebPreferences.cpp:
(WebPreferences::QueryInterface): Recognize the new IWebPreferencesPrivate3 API.
(WebPreferences::showTiledScrollingIndicator): Added.
(WebPreferences::setShowTiledScrollingIndicator): Ditto.
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged): Update to recognize 'showTiledScrollingIndicator'.
(WebView::setAcceleratedCompositing): Link the CACFLayerTreeHost to the WebCore Page object
so that it can see settings information.

Tools:
Remove 'nullable' to fix older iOS builds.

Patch by Simon Fraser <simon.fraser@apple.com> on 2015-09-21

* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView scrollViewDidEndZooming:withView:atScale:]):

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

4 years agoRemove old GCC cruft from wtf/StdLibExtras.h
ossy@webkit.org [Tue, 22 Sep 2015 00:05:17 +0000 (00:05 +0000)]
Remove old GCC cruft from wtf/StdLibExtras.h
https://bugs.webkit.org/show_bug.cgi?id=149401

Reviewed by Alex Christensen.

* wtf/StdLibExtras.h:

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

4 years agoDisable Parental Controls on the Apple TV platform
aestes@apple.com [Mon, 21 Sep 2015 23:22:35 +0000 (23:22 +0000)]
Disable Parental Controls on the Apple TV platform
https://bugs.webkit.org/show_bug.cgi?id=149421

Reviewed by Darin Adler.

* wtf/Platform.h:

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

4 years agoUnreviewed, rolling out r190086.
commit-queue@webkit.org [Mon, 21 Sep 2015 23:03:17 +0000 (23:03 +0000)]
Unreviewed, rolling out r190086.
https://bugs.webkit.org/show_bug.cgi?id=149427

Broke LayoutTests/inspector/model/remote-object.htm (Requested
by saamyjoon on #webkit).

Reverted changeset:

"Web Inspector: Basic Block Annotations and Type Profiler
annotations wrong for script with "class" with default
constructor"
https://bugs.webkit.org/show_bug.cgi?id=149248
http://trac.webkit.org/changeset/190086

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

4 years agoRemove 'nullable' to fix older iOS builds.
simon.fraser@apple.com [Mon, 21 Sep 2015 22:50:47 +0000 (22:50 +0000)]
Remove 'nullable' to fix older iOS builds.

* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView scrollViewDidEndZooming:withView:atScale:]):

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

4 years agoWeb Inspector: Basic Block Annotations and Type Profiler annotations wrong for script...
sbarati@apple.com [Mon, 21 Sep 2015 22:42:12 +0000 (22:42 +0000)]
Web Inspector: Basic Block Annotations and Type Profiler annotations wrong for script with "class" with default constructor
https://bugs.webkit.org/show_bug.cgi?id=149248

Reviewed by Mark Lam.

We keep track of which functions have and have not
executed so we can show visually, inside the inspector,
which functions have and have not executed. With a default
constructor, our parser parses code that isn't in the actual
JavaScript source code of the user. Our parser would then
give us a range of starting at "1" to "1 + default constructor length"
as being the text range of a function. But, this would then pollute
actual source code that was at these ranges.

Therefore, we should treat these default constructor source
codes as having "invalid" ranges. We use [UINT_MAX, UINT_MAX]
as the invalid range. This range has the effect of not polluting
valid ranges inside the source code.

* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::unlinkedCodeBlockFor):
(JSC::UnlinkedFunctionExecutable::setInvalidTypeProfilingOffsets):
* bytecode/UnlinkedFunctionExecutable.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitNewDefaultConstructor):

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

4 years ago[JS Bindings] prototype.constructor should be writable
cdumez@apple.com [Mon, 21 Sep 2015 22:39:25 +0000 (22:39 +0000)]
[JS Bindings] prototype.constructor should be writable
https://bugs.webkit.org/show_bug.cgi?id=149412
<rdar://problem/22545096>

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline W3C DOM / HTML tests now that more checks are passing.

* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

prototype.constructor should have the following properties:
{ [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }

as per the Web IDL specification:
https://heycam.github.io/webidl/#interface-prototype-object

In WebKit, it is currently not writable. It is writable in Firefox.

Test: fast/events/event-prototype-constructor-properties.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributesHashTable):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSreadonly.cpp:

LayoutTests:

Add layout test that checks that Event.prototype.constructor has the
expected properties and that it is actually writable.

* fast/events/event-prototype-constructor-properties-expected.txt: Added.
* fast/events/event-prototype-constructor-properties.html: Added.

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

4 years agoHTMLSlotElement should render its assigned nodes
antti@apple.com [Mon, 21 Sep 2015 22:27:28 +0000 (22:27 +0000)]
HTMLSlotElement should render its assigned nodes
https://bugs.webkit.org/show_bug.cgi?id=149242

Reviewed by Ryosuke Niwa.

Source/WebCore:

Support rendering the assigned nodes under HTMLSlotElement.

* dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::assignSlots):

    Move the empty slot finding to the loop as the hash table may mutate.

* html/HTMLSlotElement.cpp:
(WebCore::HTMLSlotElement::attributeChanged):
(WebCore::HTMLSlotElement::assignedNodes):
(WebCore::HTMLSlotElement::getDistributedNodes):
* html/HTMLSlotElement.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
(WebCore::Style::attachSlot):
(WebCore::Style::attachRenderTree):
(WebCore::Style::detachChildren):
(WebCore::Style::detachShadowRoot):
(WebCore::Style::detachSlot):
(WebCore::Style::detachRenderTree):
(WebCore::Style::resolveChildren):
(WebCore::Style::resolveSlot):
(WebCore::Style::resolveTree):

LayoutTests:

Enable the relevant tests.

* platform/mac/TestExpectations:

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

4 years ago[Win] Use command-line argument to launch in regular or High DPI mode.
bfulgham@apple.com [Mon, 21 Sep 2015 22:02:38 +0000 (22:02 +0000)]
[Win] Use command-line argument to launch in regular or High DPI mode.
https://bugs.webkit.org/show_bug.cgi?id=149417

Reviewed by Dean Jackson.

* MiniBrowser/win/Common.cpp:
(parseCommandLine): Ignore the '--highDPI' argument. It's used at the
very start of execution, before the MiniBrowser.dll is loaded.
* win/DLLLauncher/DLLLauncherMain.cpp:
(shouldUseHighDPI): Check for '--highDPI', and use this mode if
present. On WinCairo, always use High DPI.

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

4 years agoRemove Windows-specific navigator-detached-no-crash-expected.
achristensen@apple.com [Mon, 21 Sep 2015 21:52:09 +0000 (21:52 +0000)]
Remove Windows-specific navigator-detached-no-crash-expected.
https://bugs.webkit.org/show_bug.cgi?id=149414

Reviewed by Filip Pizlo.

When we switched to CMake, NAVIGATOR_HWCONCURRENCY got enabled.
There is no reason to disable it, and the expectations match the default expectations now.

* platform/win/fast/dom/navigator-detached-no-crash-expected.txt: Removed.

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

4 years agoImplement call statements and call expressions of type void in WebAssembly
sukolsak@gmail.com [Mon, 21 Sep 2015 21:20:25 +0000 (21:20 +0000)]
Implement call statements and call expressions of type void in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=149411

Reviewed by Mark Lam.

Call instructions in WebAssembly can be both statements and expressions.
This patch implements call statements. It also implements call
expressions of type void. The only place where call expressions of type
void can occur is the left-hand side of the comma (,) operator, which
will be implemented in a subsequent patch. The comma operator requires
both of its operands to be expressions.

* tests/stress/wasm-calls.js:
* tests/stress/wasm/calls.wasm:
* wasm/WASMConstants.h:
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::parseStatement):
(JSC::WASMFunctionParser::parseExpression):
(JSC::WASMFunctionParser::parseExpressionI32):
(JSC::WASMFunctionParser::parseExpressionF32):
(JSC::WASMFunctionParser::parseExpressionF64):
(JSC::WASMFunctionParser::parseExpressionVoid):
(JSC::WASMFunctionParser::parseCallInternal):
(JSC::WASMFunctionParser::parseCallIndirect):
(JSC::WASMFunctionParser::parseCallImport):
* wasm/WASMFunctionParser.h:
* wasm/WASMReader.cpp:
(JSC::WASMReader::readOpExpressionVoid):
* wasm/WASMReader.h:

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

4 years agosvg/custom/hidpi-masking-clipping.svg fails with accelerated drawing on
timothy_horton@apple.com [Mon, 21 Sep 2015 21:01:53 +0000 (21:01 +0000)]
svg/custom/hidpi-masking-clipping.svg fails with accelerated drawing on
https://bugs.webkit.org/show_bug.cgi?id=149413
<rdar://problem/22787058>

Reviewed by Dean Jackson.

No new tests, this is covered by existing tests.

* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
(WebCore::RenderSVGResourcePattern::applyResource):
(WebCore::RenderSVGResourcePattern::createTileImage):
* rendering/svg/RenderSVGResourcePattern.h:
Make pattern images respect the accelerated bit of the parent GraphicsContext.

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

4 years agoDOMTokenList.add() / remove() should run the update steps even if tokens were not...
cdumez@apple.com [Mon, 21 Sep 2015 20:59:12 +0000 (20:59 +0000)]
DOMTokenList.add() / remove() should run the update steps even if tokens were not modified
https://bugs.webkit.org/show_bug.cgi?id=148780
<rdar://problem/22571794>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C DOM test now that more checks are passing.

* web-platform-tests/dom/nodes/MutationObserver-attributes-expected.txt:

Source/WebCore:

DOMTokenList.add() / remove() should run the update steps even if tokens
were not modified, as per the DOM specification:
- https://dom.spec.whatwg.org/#dom-domtokenlist-add
- https://dom.spec.whatwg.org/#dom-domtokenlist-remove

The update steps are specified at:
- https://dom.spec.whatwg.org/#concept-DTL-update

This will have several side effects if the DOMTokenList has an associated
attribute. It will overwrite the attribute value which will:
1. Generate a Mutation event.
2. Possibly change the attribute value as the new value is the "ordered
   set serializer for tokens". So it will get rid of extra spaces and
   duplicates in the attribute value.

Firefox already behaves according to the specification.

No new tests, already covered by existing tests.

* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::addInternal):
(WebCore::DOMTokenList::removeInternal):
(WebCore::DOMTokenList::remove): Deleted.

LayoutTests:

Update / Rebaseline several classList /relList tests now that our
behavior has changed.

* fast/dom/HTMLElement/class-list-expected.txt:
* fast/dom/HTMLElement/class-list-quirks-expected.txt:
* fast/dom/HTMLElement/script-tests/class-list.js:
* fast/dom/rel-list-expected.txt:
* fast/dom/rel-list.html:

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

4 years agoDisable PICTURE_SIZES in Windows CMake build like r189745.
achristensen@apple.com [Mon, 21 Sep 2015 20:57:05 +0000 (20:57 +0000)]
Disable PICTURE_SIZES in Windows CMake build like r189745.
https://bugs.webkit.org/show_bug.cgi?id=149125

* Source/cmake/OptionsWin.cmake:
Do the same thing as r189745.

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

4 years agoJSC should infer property types
fpizlo@apple.com [Mon, 21 Sep 2015 20:49:04 +0000 (20:49 +0000)]
JSC should infer property types
https://bugs.webkit.org/show_bug.cgi?id=148610

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This change brings recursive type inference to JavaScript object properties in JSC. We check that a
value being stored into a property obeys a property's type before we do the store. If it doesn't,
we broaden the property's type to include the new value. If optimized code was relying on the old
type, we deoptimize that code.

The type system that this supports includes important primitive types like Int32 and Boolean. But
it goes further and also includes a type kind called ObjectWithStructure, which means that we
expect the property to always point to objects with a particular structure. This only works for
leaf structures (i.e. structures that have a valid transition watchpoint set). Invalidation of the
transition set causes the property type to become Object (meaning an object with any structure).
This capability gives us recursive type inference. It's possible for an expression like "o.f.g.h"
to execute without any type checks if .f and .g are both ObjectWithStructure.

The type inference of a property is tracked by an InferredType instance, which is a JSCell. This
means that it manages its own memory. That's convenient. For example, when the DFG is interested in
one of these, it can just list the InferredType as a weak reference in addition to setting a
watchpoint. This ensures that even if the InferredType is dropped by the owning structure, the DFG
won't read a dangling pointer. A mapping from property name to InferredType is implemented by
InferredTypeTable, which is also a JSCell. Each Structure may point to some InferredTypeTable.

This feature causes programs to be happier (run faster without otherwise doing bad things like
using lots of memory) when four conditions hold:

1) A property converges to one of the types that we support.
2) The property is loaded from more frequently than it is stored to.
3) The stores are all cached, so that we statically emit a type check.
4) We don't allocate a lot of meta-data for the property's type.

We maximize the likelihood of (1) by having a rich type system. But having a rich type system means
that a reflective put to a property has to have a large switch over the inferred type to decide how
to do the type check. That's why we need (3). We ensure (3) by having every reflective property
store (i.e. putDirectInternal in any context that isn't PutById) force the inferred type to become
Top. We don't really worry about ensuring (2); this is statistically true for most programs
already.

Probably the most subtle trickery goes into (4). Logically we'd like to say that each
(Structure, Property) maps to its own InferredType. If structure S1 has a transition edge to S2,
then we could ensure that the InferredType I1 where (S1, Property)->I1 has a data flow constraint
to I2 where (S2, Property)->I2. That would work, but it would involve a lot of memory. And when I1
gets invalidated in some way, it would have to tell I2 about it, and then I2 might tell other
InferredType objects downstream. That's madness. So, the first major compromise that we make here
is to say that if some property has some InferredType at some Structure, then anytime we
transition from that Structure, the new Structure shares the same InferredType for that property.
This unifies the type of the property over the entire transition tree starting at the Structure at
which the property was added. But this would still mean that each Structure would have its own
InferredTypeTable. We don't want that because experience with PropertyTable shows that this can be
a major memory hog. So, we don't create an InferredTypeTable until someone adds a property that is
subject to type inference (i.e. it was added non-reflectively), and we share that InferredTypeTable
with the entire structure transition tree rooted at the Structure that had the first inferred
property. We also drop the InferredTypeTable anytime that we do a dictionary transition, and we
don't allow further property type inference if a structure had ever been a dictionary.

This is a 3% speed-up on Octane and a 12% speed-up on Kraken on my setup. It's not a significant
slow-down on any benchmark I ran.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::branchTest64):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::branchTest64):
(JSC::MacroAssemblerX86_64::test64):
* bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::generate):
* bytecode/PutByIdFlags.cpp:
(WTF::printInternal):
* bytecode/PutByIdFlags.h:
(JSC::encodeStructureID):
(JSC::decodeStructureID):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFromLLInt):
(JSC::PutByIdStatus::computeFor):
(JSC::PutByIdStatus::computeForStubInfo):
* bytecode/PutByIdVariant.cpp:
(JSC::PutByIdVariant::operator=):
(JSC::PutByIdVariant::replace):
(JSC::PutByIdVariant::transition):
(JSC::PutByIdVariant::setter):
(JSC::PutByIdVariant::attemptToMerge):
(JSC::PutByIdVariant::dumpInContext):
* bytecode/PutByIdVariant.h:
(JSC::PutByIdVariant::newStructure):
(JSC::PutByIdVariant::requiredType):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedInstruction::UnlinkedInstruction):
* bytecode/Watchpoint.h:
(JSC::InlineWatchpointSet::touch):
(JSC::InlineWatchpointSet::isBeingWatched):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::addConstantValue):
(JSC::BytecodeGenerator::emitPutById):
(JSC::BytecodeGenerator::emitDirectPutById):
* dfg/DFGAbstractInterpreter.h:
(JSC::DFG::AbstractInterpreter::filter):
(JSC::DFG::AbstractInterpreter::filterByValue):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::filter):
* dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::setType):
(JSC::DFG::AbstractValue::set):
(JSC::DFG::AbstractValue::fixTypeForRepresentation):
(JSC::DFG::AbstractValue::mergeOSREntryValue):
(JSC::DFG::AbstractValue::isType):
(JSC::DFG::AbstractValue::filter):
(JSC::DFG::AbstractValue::filterValueByType):
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::setType):
(JSC::DFG::AbstractValue::isType):
(JSC::DFG::AbstractValue::validate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
(JSC::DFG::ByteCodeParser::handleGetByOffset):
(JSC::DFG::ByteCodeParser::handlePutByOffset):
(JSC::DFG::ByteCodeParser::load):
(JSC::DFG::ByteCodeParser::store):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::handlePutById):
* dfg/DFGClobbersExitState.cpp:
(JSC::DFG::clobbersExitState):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
(JSC::DFG::ConstantFoldingPhase::emitGetByOffset):
(JSC::DFG::ConstantFoldingPhase::emitPutByOffset):
(JSC::DFG::ConstantFoldingPhase::addBaseCheck):
* dfg/DFGDesiredInferredType.h: Added.
(JSC::DFG::DesiredInferredType::DesiredInferredType):
(JSC::DFG::DesiredInferredType::operator bool):
(JSC::DFG::DesiredInferredType::object):
(JSC::DFG::DesiredInferredType::expected):
(JSC::DFG::DesiredInferredType::isStillValid):
(JSC::DFG::DesiredInferredType::add):
(JSC::DFG::DesiredInferredType::operator==):
(JSC::DFG::DesiredInferredType::operator!=):
(JSC::DFG::DesiredInferredType::isHashTableDeletedValue):
(JSC::DFG::DesiredInferredType::hash):
(JSC::DFG::DesiredInferredType::dumpInContext):
(JSC::DFG::DesiredInferredType::dump):
(JSC::DFG::DesiredInferredTypeHash::hash):
(JSC::DFG::DesiredInferredTypeHash::equal):
* dfg/DFGDesiredWatchpoints.cpp:
(JSC::DFG::AdaptiveStructureWatchpointAdaptor::add):
(JSC::DFG::InferredTypeAdaptor::add):
(JSC::DFG::DesiredWatchpoints::DesiredWatchpoints):
(JSC::DFG::DesiredWatchpoints::~DesiredWatchpoints):
(JSC::DFG::DesiredWatchpoints::addLazily):
(JSC::DFG::DesiredWatchpoints::consider):
(JSC::DFG::DesiredWatchpoints::reallyAdd):
(JSC::DFG::DesiredWatchpoints::areStillValid):
(JSC::DFG::DesiredWatchpoints::dumpInContext):
* dfg/DFGDesiredWatchpoints.h:
(JSC::DFG::AdaptiveStructureWatchpointAdaptor::dumpInContext):
(JSC::DFG::InferredTypeAdaptor::hasBeenInvalidated):
(JSC::DFG::InferredTypeAdaptor::dumpInContext):
(JSC::DFG::DesiredWatchpoints::isWatched):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::isSafeToLoad):
(JSC::DFG::Graph::inferredTypeFor):
(JSC::DFG::Graph::livenessFor):
(JSC::DFG::Graph::tryGetConstantProperty):
(JSC::DFG::Graph::inferredValueForProperty):
(JSC::DFG::Graph::tryGetConstantClosureVar):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::registerInferredType):
(JSC::DFG::Graph::inferredTypeForProperty):
* dfg/DFGInferredTypeCheck.cpp: Added.
(JSC::DFG::insertInferredTypeCheck):
* dfg/DFGInferredTypeCheck.h: Added.
* dfg/DFGNode.h:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGPropertyTypeKey.h: Added.
(JSC::DFG::PropertyTypeKey::PropertyTypeKey):
(JSC::DFG::PropertyTypeKey::operator bool):
(JSC::DFG::PropertyTypeKey::structure):
(JSC::DFG::PropertyTypeKey::uid):
(JSC::DFG::PropertyTypeKey::operator==):
(JSC::DFG::PropertyTypeKey::operator!=):
(JSC::DFG::PropertyTypeKey::hash):
(JSC::DFG::PropertyTypeKey::isHashTableDeletedValue):
(JSC::DFG::PropertyTypeKey::dumpInContext):
(JSC::DFG::PropertyTypeKey::dump):
(JSC::DFG::PropertyTypeKey::deletedUID):
(JSC::DFG::PropertyTypeKeyHash::hash):
(JSC::DFG::PropertyTypeKeyHash::equal):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::SafeToExecuteEdge::operator()):
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileTypeOf):
(JSC::DFG::SpeculativeJIT::compileCheckStructure):
(JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::speculateCell):
(JSC::DFG::SpeculativeJIT::speculateCellOrOther):
(JSC::DFG::SpeculativeJIT::speculateObject):
(JSC::DFG::SpeculativeJIT::speculate):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStoreBarrierInsertionPhase.cpp:
* dfg/DFGStructureAbstractValue.h:
(JSC::DFG::StructureAbstractValue::at):
(JSC::DFG::StructureAbstractValue::operator[]):
(JSC::DFG::StructureAbstractValue::onlyStructure):
(JSC::DFG::StructureAbstractValue::forEach):
* dfg/DFGUseKind.cpp:
(WTF::printInternal):
* dfg/DFGUseKind.h:
(JSC::DFG::typeFilterFor):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileCheckStructure):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCheckCell):
(JSC::FTL::DFG::LowerDFGToLLVM::compileMultiPutByOffset):
(JSC::FTL::DFG::LowerDFGToLLVM::numberOrNotCellToInt32):
(JSC::FTL::DFG::LowerDFGToLLVM::checkInferredType):
(JSC::FTL::DFG::LowerDFGToLLVM::loadProperty):
(JSC::FTL::DFG::LowerDFGToLLVM::speculate):
(JSC::FTL::DFG::LowerDFGToLLVM::speculateCell):
(JSC::FTL::DFG::LowerDFGToLLVM::speculateCellOrOther):
(JSC::FTL::DFG::LowerDFGToLLVM::speculateMachineInt):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExit):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::decodedCodeMapFor):
(JSC::AssemblyHelpers::branchIfNotType):
(JSC::AssemblyHelpers::purifyNaN):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::branchIfEqual):
(JSC::AssemblyHelpers::branchIfNotCell):
(JSC::AssemblyHelpers::branchIfCell):
(JSC::AssemblyHelpers::branchIfNotOther):
(JSC::AssemblyHelpers::branchIfInt32):
(JSC::AssemblyHelpers::branchIfNotInt32):
(JSC::AssemblyHelpers::branchIfNumber):
(JSC::AssemblyHelpers::branchIfNotNumber):
(JSC::AssemblyHelpers::branchIfEmpty):
(JSC::AssemblyHelpers::branchStructure):
* jit/Repatch.cpp:
(JSC::tryCachePutByID):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/InferredType.cpp: Added.
(JSC::InferredType::create):
(JSC::InferredType::destroy):
(JSC::InferredType::createStructure):
(JSC::InferredType::visitChildren):
(JSC::InferredType::kindForFlags):
(JSC::InferredType::Descriptor::forValue):
(JSC::InferredType::Descriptor::forFlags):
(JSC::InferredType::Descriptor::putByIdFlags):
(JSC::InferredType::Descriptor::merge):
(JSC::InferredType::Descriptor::removeStructure):
(JSC::InferredType::Descriptor::subsumes):
(JSC::InferredType::Descriptor::dumpInContext):
(JSC::InferredType::Descriptor::dump):
(JSC::InferredType::InferredType):
(JSC::InferredType::~InferredType):
(JSC::InferredType::canWatch):
(JSC::InferredType::addWatchpoint):
(JSC::InferredType::dump):
(JSC::InferredType::willStoreValueSlow):
(JSC::InferredType::makeTopSlow):
(JSC::InferredType::set):
(JSC::InferredType::removeStructure):
(JSC::InferredType::InferredStructureWatchpoint::fireInternal):
(JSC::InferredType::InferredStructureFinalizer::finalizeUnconditionally):
(JSC::InferredType::InferredStructure::InferredStructure):
(WTF::printInternal):
* runtime/InferredType.h: Added.
* runtime/InferredTypeTable.cpp: Added.
(JSC::InferredTypeTable::create):
(JSC::InferredTypeTable::destroy):
(JSC::InferredTypeTable::createStructure):
(JSC::InferredTypeTable::visitChildren):
(JSC::InferredTypeTable::get):
(JSC::InferredTypeTable::willStoreValue):
(JSC::InferredTypeTable::makeTop):
(JSC::InferredTypeTable::InferredTypeTable):
(JSC::InferredTypeTable::~InferredTypeTable):
* runtime/InferredTypeTable.h: Added.
* runtime/JSObject.h:
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirectWithoutTransition):
* runtime/Structure.cpp:
(JSC::Structure::materializePropertyMap):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::removePropertyTransition):
(JSC::Structure::startWatchingInternalProperties):
(JSC::Structure::willStoreValueSlow):
(JSC::Structure::visitChildren):
(JSC::Structure::prototypeChainMayInterceptStoreTo):
* runtime/Structure.h:
(JSC::PropertyMapEntry::PropertyMapEntry):
* runtime/StructureInlines.h:
(JSC::Structure::get):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
* tests/stress/prop-type-boolean-then-string.js: Added.
* tests/stress/prop-type-int32-then-string.js: Added.
* tests/stress/prop-type-number-then-string.js: Added.
* tests/stress/prop-type-object-or-other-then-string.js: Added.
* tests/stress/prop-type-object-then-string.js: Added.
* tests/stress/prop-type-other-then-string.js: Added.
* tests/stress/prop-type-string-then-object.js: Added.
* tests/stress/prop-type-struct-or-other-then-string.js: Added.
* tests/stress/prop-type-struct-then-object.js: Added.
* tests/stress/prop-type-struct-then-object-opt.js: Added.
* tests/stress/prop-type-struct-then-object-opt-fold.js: Added.
* tests/stress/prop-type-struct-then-object-opt-multi.js: Added.

Source/WTF:

* wtf/HashTable.h:
(WTF::HashTableAddResult::HashTableAddResult): Make it possible to say "HashMap::AddResult result" without assigning anything to it yet.
* wtf/PrintStream.h:
(WTF::printInternal): Beef up printing of some common WTF types, in particular RefPtr<UniquedStringImpl>.

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

4 years ago32-bit Mac build fix attempt after r190065.
rniwa@webkit.org [Mon, 21 Sep 2015 20:34:37 +0000 (20:34 +0000)]
32-bit Mac build fix attempt after r190065.

* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

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

4 years agoAdd some tests for shadow DOM rendering
rniwa@webkit.org [Mon, 21 Sep 2015 20:24:02 +0000 (20:24 +0000)]
Add some tests for shadow DOM rendering
https://bugs.webkit.org/show_bug.cgi?id=149330

Reviewed by Antti Koivisto.

Added some ref tests for new shadow DOM API rendering with failing expectations everywhere.

This is a relanding of r189962 excluding css-scoping-shadow-rendering.html since it has since been added in r190006
as css-scoping-shadow-root-hides-children.html by Antti.

* fast/shadow-dom/css-scoping-shadow-invisible-slot-expected.html: Added.
* fast/shadow-dom/css-scoping-shadow-invisible-slot.html: Added.
* fast/shadow-dom/css-scoping-shadow-slot-expected.html: Added.
* fast/shadow-dom/css-scoping-shadow-slot.html: Added.
* fast/shadow-dom/css-scoping-shadow-with-rules-expected.html: Added.
* fast/shadow-dom/css-scoping-shadow-with-rules.html: Added.
* platform/mac/TestExpectations:

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

4 years agoWebCore shouldn't have to include DFG headers
fpizlo@apple.com [Mon, 21 Sep 2015 20:10:04 +0000 (20:10 +0000)]
WebCore shouldn't have to include DFG headers
https://bugs.webkit.org/show_bug.cgi?id=149337

Reviewed by Michael Saboff.

This does some simple rewiring and outlining of CodeBlock/Heap functionality so that
those headers don't have to include DFG headers. As a result, WebCore no longer includes
DFG headers, except for two fairly innocent ones (DFGCommon.h and DFGCompilationMode.h).
This also changes the Xcode project file so that all but those two headers are Project
rather than Private. So, if WebCore accidentally includes any of them, we'll get a build
error.

The main group of headers that this prevents WebCore from including are the DFGDesired*.h
files and whatever those include. Those headers used to be fairly simple, but now they
are growing in complexity (especially with things like http://webkit.org/b/148610). So,
it makes sense to make sure they don't leak out of JSC.

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::CallLinkInfo):
(JSC::CallLinkInfo::~CallLinkInfo):
(JSC::CallLinkInfo::clearStub):
(JSC::CallLinkInfo::visitWeak):
(JSC::CallLinkInfo::setFrameShuffleData):
* bytecode/CallLinkInfo.h:
(JSC::CallLinkInfo::isVarargsCallType):
(JSC::CallLinkInfo::specializationKindFor):
(JSC::CallLinkInfo::frameShuffleData):
(JSC::CallLinkInfo::CallLinkInfo): Deleted.
(JSC::CallLinkInfo::~CallLinkInfo): Deleted.
(JSC::CallLinkInfo::setFrameShuffleData): Deleted.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::getOrAddArrayProfile):
(JSC::CodeBlock::codeOrigins):
(JSC::CodeBlock::numberOfDFGIdentifiers):
(JSC::CodeBlock::identifier):
(JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasExpressionInfo):
(JSC::CodeBlock::hasCodeOrigins):
(JSC::CodeBlock::numberOfIdentifiers):
(JSC::CodeBlock::identifier):
(JSC::CodeBlock::codeOrigins): Deleted.
(JSC::CodeBlock::numberOfDFGIdentifiers): Deleted.
* bytecode/CodeOrigin.h:
* dfg/DFGDesiredIdentifiers.cpp:
* heap/Heap.cpp:
(JSC::Heap::didFinishIterating):
(JSC::Heap::completeAllDFGPlans):
(JSC::Heap::markRoots):
(JSC::Heap::deleteAllCodeBlocks):
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::deprecatedReportExtraMemory):
(JSC::Heap::forEachCodeBlock):
(JSC::Heap::forEachProtectedCell):
* runtime/Executable.h:
* runtime/JSCInlines.h:
(JSC::Heap::forEachCodeBlock): Deleted.

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

4 years ago[MediaStream] Clean up MediaStream private interfaces
eric.carlson@apple.com [Mon, 21 Sep 2015 20:09:51 +0000 (20:09 +0000)]
[MediaStream] Clean up MediaStream private interfaces
https://bugs.webkit.org/show_bug.cgi?id=149381

Reviewed by Jer Noble.

No new tests, no functional change.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::create):
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::clone):
(WebCore::MediaStream::getTrackById):
(WebCore::MediaStream::getAudioTracks):
(WebCore::MediaStream::getVideoTracks):
(WebCore::MediaStream::getTracks):
(WebCore::MediaStream::activeStatusChanged):
(WebCore::MediaStream::didAddTrack):
(WebCore::MediaStream::didRemoveTrack):
(WebCore::MediaStream::registry):
(WebCore::MediaStream::trackVectorForType):
(WebCore::MediaStream::didAddTrackToPrivate): Deleted.
(WebCore::MediaStream::didRemoveTrackFromPrivate): Deleted.
* Modules/mediastream/MediaStream.h:

* Modules/mediastream/MediaStreamRegistry.cpp:
(WebCore::MediaStreamRegistry::lookup):
(WebCore::MediaStreamRegistry::MediaStreamRegistry):
* Modules/mediastream/MediaStreamRegistry.h:

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack):
(WebCore::MediaStreamTrack::~MediaStreamTrack):
(WebCore::MediaStreamTrack::kind):
(WebCore::MediaStreamTrack::removeObserver):
(WebCore::MediaStreamTrack::trackEnded):
(WebCore::MediaStreamTrack::trackMutedChanged):
(WebCore::MediaStreamTrack::trackStatesChanged):
(WebCore::MediaStreamTrack::configureTrackRendering):
* Modules/mediastream/MediaStreamTrack.h:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsType):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load):

* platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.mm:
(WebCore::MediaStreamPrivateAVFObjC::create):
(WebCore::MediaStreamPrivateAVFObjC::MediaStreamPrivateAVFObjC):

* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::create):
(WebCore::MediaStreamPrivate::MediaStreamPrivate):
(WebCore::MediaStreamPrivate::~MediaStreamPrivate):
(WebCore::MediaStreamPrivate::tracks):
(WebCore::MediaStreamPrivate::addTrack):
(WebCore::MediaStreamPrivate::removeTrack):
* platform/mediastream/MediaStreamPrivate.h:
(WebCore::MediaStreamPrivateClient::~MediaStreamPrivateClient):
(WebCore::MediaStreamPrivate::id):
(WebCore::MediaStreamPrivate::active):
(WebCore::MediaStreamPrivate::MediaStreamPrivate): Deleted.
(WebCore::MediaStreamPrivate::~MediaStreamPrivate): Deleted.

* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::addObserver):
(WebCore::MediaStreamTrackPrivate::removeObserver):
(WebCore::MediaStreamTrackPrivate::label):
(WebCore::MediaStreamTrackPrivate::endTrack):
(WebCore::MediaStreamTrackPrivate::sourceStopped):
(WebCore::MediaStreamTrackPrivate::sourceMutedChanged):
(WebCore::MediaStreamTrackPrivate::sourceStatesChanged):
(WebCore::MediaStreamTrackPrivate::preventSourceFromStopping):
* platform/mediastream/MediaStreamTrackPrivate.h:
(WebCore::MediaStreamTrackPrivate::Observer::~Observer):
(WebCore::MediaStreamTrackPrivate::ended):
(WebCore::MediaStreamTrackPrivate::startProducingData):
(WebCore::MediaStreamTrackPrivate::stopProducingData):
(WebCore::MediaStreamTrackPrivate::setMuted):
(WebCore::MediaStreamTrackPrivateClient::~MediaStreamTrackPrivateClient): Deleted.
(WebCore::MediaStreamTrackPrivate::setClient): Deleted.
(WebCore::MediaStreamTrackPrivate::client): Deleted.

* platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
(WebCore::TrackSourceInfo::create):
(WebCore::TrackSourceInfo::id):
(WebCore::TrackSourceInfo::label):
(WebCore::TrackSourceInfo::groupId):
(WebCore::TrackSourceInfo::kind):
(WebCore::TrackSourceInfo::TrackSourceInfo):
(WebCore::TrackSourceInfo::deviceId): Deleted.

* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::RealtimeMediaSource):
(WebCore::RealtimeMediaSource::reset):
(WebCore::RealtimeMediaSource::setMuted):
(WebCore::RealtimeMediaSource::statesDidChanged):
(WebCore::RealtimeMediaSource::readonly):
* platform/mediastream/RealtimeMediaSource.h:
(WebCore::RealtimeMediaSource::id):
(WebCore::RealtimeMediaSource::persistentId):
(WebCore::RealtimeMediaSource::setPersistentId):
(WebCore::RealtimeMediaSource::type):
(WebCore::RealtimeMediaSource::stopped):
* platform/mediastream/RealtimeMediaSourceCenter.h:
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::AVCaptureDeviceManager::getSourcesInfo):

* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::~RealtimeMediaSourceCenterMac):
(WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
(WebCore::RealtimeMediaSourceCenterMac::getMediaStreamTrackSources):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:

* platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
(WebCore::RealtimeMediaSourceCenterOwr::~RealtimeMediaSourceCenterOwr):
(WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
* platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:

* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::registerMockRealtimeMediaSourceCenter):
(WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
(WebCore::MockRealtimeMediaSourceCenter::createMediaStream):
(WebCore::MockRealtimeMediaSourceCenter::getMediaStreamTrackSources):
* platform/mock/MockRealtimeMediaSourceCenter.h:

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

4 years agoAdd image-only failure expectation to fast/shadow-dom/css-scoping-shadow-root-hides...
rniwa@webkit.org [Mon, 21 Sep 2015 20:05:51 +0000 (20:05 +0000)]
Add image-only failure expectation to fast/shadow-dom/css-scoping-shadow-root-hides-children.html on non-Mac ports.

* TestExpectations:

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

4 years ago[OS X] Update for Xcode 7.0 on Yosemite
ap@apple.com [Mon, 21 Sep 2015 19:43:12 +0000 (19:43 +0000)]
[OS X] Update for Xcode 7.0 on Yosemite
https://bugs.webkit.org/show_bug.cgi?id=149389

Reviewed by Dan Bernstein.

* DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h:
* WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.h:
Removed unneeded declarations - conforming to a protocol is sufficient.

* DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
* WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm:
Changed the definitions to be compiled whenever the SDK requires it (so we will have
dead code compiled in when building for 10.10 with 10.11 SDK, somewhat unfortunately).

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

4 years agoSkip tests on Windows after r189947.
achristensen@apple.com [Mon, 21 Sep 2015 19:38:03 +0000 (19:38 +0000)]
Skip tests on Windows after r189947.

* platform/win/TestExpectations:
webkit-font-smoothing doesn't work on Windows.

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

4 years agoFix the !ENABLE(TEMPLATE_ELEMENT) build after r189945
ossy@webkit.org [Mon, 21 Sep 2015 19:15:55 +0000 (19:15 +0000)]
Fix the !ENABLE(TEMPLATE_ELEMENT) build after r189945
https://bugs.webkit.org/show_bug.cgi?id=149400

Reviewed by Darin Adler.

* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):

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

4 years agoRange.cloneContents() / extractContents should throw a HierarchyRequestError when...
cdumez@apple.com [Mon, 21 Sep 2015 19:15:03 +0000 (19:15 +0000)]
Range.cloneContents() / extractContents should throw a HierarchyRequestError when encountering a doctype
https://bugs.webkit.org/show_bug.cgi?id=148770
<rdar://problem/22570898>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C DOM test now that more checks are passing.

* web-platform-tests/dom/ranges/Range-cloneContents-expected.txt:

Source/WebCore:

Range.cloneContents() and Range.extractContents() should throw a
HierarchyRequestError when encountering a doctype:
- https://dom.spec.whatwg.org/#concept-range-clone (step 12)
- https://dom.spec.whatwg.org/#concept-range-extract (step 12)

However, Range.deleteContents() should not:
- https://dom.spec.whatwg.org/#dom-range-deletecontents

WebKit was not throwing in the Range.cloneContents() case. This
aligns updates our behavior to match the specification and
Firefox.

Tests: fast/dom/Range/clone-contents-document-type.html
       fast/dom/Range/delete-contents-document-type.html
       fast/dom/Range/extract-contents-document-type.html

* dom/Range.cpp:
(WebCore::Range::processContentsBetweenOffsets):

LayoutTests:

Add new tests to cover the behaviour of Range's cloneContents() / extractContents()
and deleteContents() when encountering a doctype.

* fast/dom/Range/clone-contents-document-type-expected.txt: Added.
* fast/dom/Range/clone-contents-document-type.html: Added.
* fast/dom/Range/delete-contents-document-type-expected.txt: Added.
* fast/dom/Range/delete-contents-document-type.html: Added.
* fast/dom/Range/extract-contents-document-type-expected.txt: Added.
* fast/dom/Range/extract-contents-document-type.html: Added.
* fast/dom/Range/resources/frame-with-doctype.html: Added.

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

4 years agoWeb Inspector: arrow function names are never inferred, call frames are labeled ...
commit-queue@webkit.org [Mon, 21 Sep 2015 19:11:42 +0000 (19:11 +0000)]
Web Inspector: arrow function names are never inferred, call frames are labeled (anonymous function)
https://bugs.webkit.org/show_bug.cgi?id=148318

Patch by Aleksandr Skachkov <gskachkov@gmail.com> on 2015-09-21
Reviewed by Saam Barati.

Tiny change to support of the inferred name in arrow function

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createAssignResolve):

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

4 years agoAdd the ability for tests to run script in the UI process in WebKitTestRunner
simon.fraser@apple.com [Mon, 21 Sep 2015 19:10:48 +0000 (19:10 +0000)]
Add the ability for tests to run script in the UI process in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=149356

Reviewed by Tim Horton.

Source/WebKit2:

Expose a few private functions for testing.

* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

This change adds testRunner.runUIScript(script, callback), which allows a test
to execute script in a JSContext which runs in the UI process. That context
has bindings exposed through the UIScriptController interface; currently one test
function, and some iOS-specific functions are included. UIScriptController can be
async with a callback, and runUIScript() itself is asynchronous. When the UI
script is complete, it calls uiController.uiScriptComplete(result), where 'result'
is a string passed back to the web process, and given to the runUIScript()
callback function.

Thanks to Gyuyoung Kim for help with the Gtk/Efl build.

* WebKitTestRunner/DerivedSources.make: Build UIScriptController.idl.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Add runUIScript().
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage): When the UI-side script is
complete, call back into TestRunner.
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::nextUIScriptCallbackID):
(WTR::TestRunner::runUIScript): Post a message to the injected bundle to run the UI script.
(WTR::TestRunner::runUIScriptCallback): When the UI script is done, execute its callback function.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/TestController.cpp:
(WTR::updateTestOptionsFromTestHeader):
(WTR::TestController::testOptionsForTest): Support "useFlexibleViewport" as a test argument.
(WTR::shouldUseFixedLayout): Deleted. Moved to a TestInvocation function.
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::shouldUseFixedLayout):
(WTR::TestInvocation::shouldUseThreadedScrolling):
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::runUISideScript): Run the UI-side script!
(WTR::TestInvocation::uiScriptDidComplete): Send a message back to the injected bundle.
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/TestOptions.h:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.h: Copied from Tools/WebKitTestRunner/TestOptions.h.
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: Added.
(-[TestRunnerWKWebView dragImage:at:offset:event:pasteboard:source:slideBack:]):
(-[TestRunnerWKWebView zoomToScale:animated:completionHandler:]):
(-[TestRunnerWKWebView scrollViewDidEndZooming:withView:atScale:]):
(-[TestRunnerWKWebView onDidEndZooming:]): Allow a test to hook into the end of zooming.
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::PlatformWebView): Make a TestRunnerWKWebView on iOS.
* WebKitTestRunner/ios/UIScriptControllerIOS.mm: Added.
(WTR::UIScriptController::doAsyncTask):
(WTR::UIScriptController::zoomToScale):
(WTR::UIScriptController::zoomScale):
(WTR::UIScriptController::minimumZoomScale):
(WTR::UIScriptController::maximumZoomScale):
(WTR::UIScriptController::contentVisibleRect):
* WebKitTestRunner/mac/EventSenderProxy.mm:
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(-[TestRunnerWKWebView dragImage:at:offset:event:pasteboard:source:slideBack:]): Deleted.
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::updatePlatformSpecificTestOptionsForTest):
(WTR::shouldUseThreadedScrolling): Deleted. Moved to TestInvocation.
* WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.h:
* WebKitTestRunner/uiscriptcontext/UIScriptContext.cpp: Added. Owns the JS context in the UI process.
(UIScriptContext::UIScriptContext):
(UIScriptContext::~UIScriptContext):
(UIScriptContext::runUIScript): Entrypoint to running the UI script. If the script didn't do anything
asynchronous, call the callback.
(UIScriptContext::nextTaskCallbackID):
(UIScriptContext::prepareForAsyncTask): Do setup for one async task (i.e. a UIScriptController function
that has a callback). Has to store the callbackID of the script, so code called from the completion
callback knows which UI script invoked it.
(UIScriptContext::asyncTaskComplete): Called when one task is finished.
(UIScriptContext::uiScriptComplete):
(UIScriptContext::objectFromRect): Make a JS object from a rect.
* WebKitTestRunner/uiscriptcontext/UIScriptContext.h: Copied from Tools/WebKitTestRunner/TestOptions.h.
(WTR::UIScriptContext::hasOutstandingAsyncTasks):
* WebKitTestRunner/uiscriptcontext/UIScriptController.cpp: Copied from Tools/WebKitTestRunner/TestOptions.h.
(WTR::UIScriptController::UIScriptController):
(WTR::UIScriptController::makeWindowObject):
(WTR::UIScriptController::wrapperClass):
(WTR::UIScriptController::doAsyncTask):
(WTR::UIScriptController::zoomToScale):
(WTR::UIScriptController::zoomScale):
(WTR::UIScriptController::minimumZoomScale):
(WTR::UIScriptController::maximumZoomScale):
(WTR::UIScriptController::contentVisibleRect):
(WTR::UIScriptController::uiScriptComplete):
* WebKitTestRunner/uiscriptcontext/UIScriptController.h: Copied from Tools/WebKitTestRunner/TestOptions.h.
(WTR::UIScriptController::create):
* WebKitTestRunner/uiscriptcontext/bindings/UIScriptController.idl: Copied from Tools/WebKitTestRunner/TestOptions.h.

LayoutTests:

Some new tests that exercise testRunner.runUIScript().

* TestExpectations:
* fast/harness/concurrent-ui-side-scripts-expected.txt: Added.
* fast/harness/concurrent-ui-side-scripts.html: Added.
* fast/harness/ui-side-scripts-expected.txt: Added.
* fast/harness/ui-side-scripts.html: Added.
* fast/zooming/zoom-to-scale.html: Added.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

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

4 years agoLayout milestones aren't synchronized with UI-side compositing transactions
timothy_horton@apple.com [Mon, 21 Sep 2015 19:03:31 +0000 (19:03 +0000)]
Layout milestones aren't synchronized with UI-side compositing transactions
https://bugs.webkit.org/show_bug.cgi?id=149362

Reviewed by Anders Carlsson.

Because layout milestones are primarily used to synchronize things with
the displayed layout/rendering of the page, they should fire at the same
time as the contents of the view change.

However, with UI-side compositing, the layer tree transaction will
most likely come in *after* the layout milestones associated with its
contents fire, breaking this synchronization.

Instead, put the layout milestones inside the transaction and fire them
immediately after it is committed in the UI process.

* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::setCallbackIDs):
(WebKit::RemoteLayerTreeTransaction::newlyReachedLayoutMilestones):
(WebKit::RemoteLayerTreeTransaction::setNewlyReachedLayoutMilestones):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
Add LayoutMilestones to the transaction.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didLayout):
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::renderingProgressDidChange):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
(WKPageSetPageNavigationClient):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree):
Remove the UserData parameter from didLayout/renderingProgressDidChange,
except for at the API level where we'll always pass null.
Nobody uses UserData on didLayout, and we'll assert if any client sets it
(and it won't get passed through to the UI process).

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didLayoutForCustomContentProvider):
Just call didLayout with the relevant milestones instead of reimplementing it.

(WebKit::WebPageProxy::didLayout):
* UIProcess/WebPageProxy.h:
Make didLayout public.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
Let WebPage handle dispatching didLayout.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::dispatchDidLayout):
* WebProcess/WebPage/WebPage.h:
Let the DrawingArea handle dispatching didLayout.
If it doesn't want to handle it, we'll just do the normal thing
and dispatch an async message.

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
If we reach a new layout milestone, dispatch didLayout client/delegate callbacks.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::dispatchDidLayout):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
(WebKit::RemoteLayerTreeDrawingArea::dispatchDidLayout):
Queue up milestones as we reach them, and send them in the transaction.

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

4 years agoNew tests introduced in r188545 fail on 32 bit ARM
commit-queue@webkit.org [Mon, 21 Sep 2015 18:59:34 +0000 (18:59 +0000)]
New tests introduced in r188545 fail on 32 bit ARM
https://bugs.webkit.org/show_bug.cgi?id=148376

Patch by Aleksandr Skachkov <gskachkov@gmail.com> on 2015-09-19
Reviewed by Saam Barati.

Added correct support of the ARM CPU in JIT functions that are related to arrow function.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewFunction):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOpcodes.cpp:
(JSC::JIT::emitNewFuncExprCommon):

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

4 years agoImplement Store expressions in WebAssembly
sukolsak@gmail.com [Mon, 21 Sep 2015 18:47:38 +0000 (18:47 +0000)]
Implement Store expressions in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=149395

Reviewed by Geoffrey Garen.

The Store instruction in WebAssembly stores a value in the linear memory
at the given index. It can be both a statement and an expression. When
it is an expression, it returns the assigned value. This patch
implements Store as an expression.

Since Store uses two operands, which are the index and the value, we
need to pop the two operands from the stack and push the value back to
the stack. We can simply implement this by copying the value to where
the index is in the stack.

* tests/stress/wasm-linear-memory.js:
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::buildStore):
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::parseStatement):
(JSC::WASMFunctionParser::parseExpressionI32):
(JSC::WASMFunctionParser::parseExpressionF32):
(JSC::WASMFunctionParser::parseExpressionF64):
(JSC::WASMFunctionParser::parseStore):
* wasm/WASMFunctionParser.h:
* wasm/WASMFunctionSyntaxChecker.h:
(JSC::WASMFunctionSyntaxChecker::buildStore):

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

4 years agoUserMediaClientMock leaks every test run
timothy_horton@apple.com [Mon, 21 Sep 2015 18:03:25 +0000 (18:03 +0000)]
UserMediaClientMock leaks every test run
https://bugs.webkit.org/show_bug.cgi?id=149358

Reviewed by Eric Carlson.

* Modules/mediastream/UserMediaController.cpp:
(WebCore::provideUserMediaTo):
Make provideUserMediaTo operate unconditionally, just like all of the
other similar functions, reverting r165733.

* Modules/mediastream/UserMediaController.h:
* testing/Internals.cpp:
(WebCore::Internals::Internals):
Remove the existing UserMediaController supplement before installing a new one.
This way, we're replacing it with the one Internals is trying to install,
instead of leaking UserMediaClientMocks.

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

4 years agoTurn on threaded scrolling by default in the tests
timothy_horton@apple.com [Mon, 21 Sep 2015 18:00:20 +0000 (18:00 +0000)]
Turn on threaded scrolling by default in the tests
https://bugs.webkit.org/show_bug.cgi?id=149377

Reviewed by Simon Fraser.

* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::updatePlatformSpecificTestOptionsForTest):
(WTR::shouldUseThreadedScrolling): Deleted.
Turn on threaded scrolling by default.

* compositing/geometry/fixed-position-flipped-writing-mode.html:
* compositing/layer-creation/no-compositing-for-sticky.html:
* compositing/overflow/automatically-opt-into-composited-scrolling.html:
* compositing/overflow/clipping-ancestor-with-accelerated-scrolling-ancestor.html:
* compositing/overflow/composited-scrolling-creates-a-stacking-container.html:
* compositing/overflow/composited-scrolling-paint-phases.html:
* compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html:
* compositing/overflow/dynamic-composited-scrolling-status.html:
* compositing/overflow/iframe-inside-overflow-clipping.html:
* compositing/overflow/nested-scrolling.html:
* compositing/overflow/overflow-clip-with-accelerated-scrolling-ancestor.html:
* compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html:
* compositing/overflow/scrolling-content-clip-to-viewport.html:
* compositing/overflow/scrolling-without-painting.html:
* compositing/overflow/textarea-scroll-touch.html:
* compositing/overflow/updating-scrolling-content.html:
* compositing/rtl/rtl-fixed-overflow-scrolled.html:
* compositing/rtl/rtl-overflow-scrolling.html:
* fast/block/positioning/rtl-fixed-positioning.html:
* fast/block/positioning/vertical-rl/fixed-positioning.html:
* fast/dom/horizontal-scrollbar-in-rtl.html:
* fast/dom/horizontal-scrollbar-when-dir-change.html:
* fast/dom/scroll-reveal-left-overflow.html:
* fast/dom/scroll-reveal-top-overflow.html:
* fast/dom/vertical-scrollbar-when-dir-change.html:
* fast/multicol/pagination/RightToLeft-rl-hittest.html:
* scrollingcoordinator/non-fast-scrollable-region-scaled-iframe.html:
* scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html:
* swipe/main-frame-pinning-requirement.html:
Turn off threaded scrolling in the cases where it sensibly affects the test result.
These cases are:
        - tests that use scrollTo or similar, and then depend on the
          scrolling happening synchronously

        - tests that use setAcceleratedCompositingForOverflowScrollEnabled,
          which asserts if combined with threaded scrolling

* fast/text/combining-character-sequence-vertical.html:
* fast/text/descent-clip-in-scaled-page.html:
* fast/text/descent-clip-in-scaled-page-expected.html:
* fast/text/vertical-quotation-marks.html:
Turn off threaded scrolling in three tests where it shouldn't affect the test result,
but for some reason does.

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

4 years agoGenerate WebCoreHeaderDetection.h with CMake on Windows
achristensen@apple.com [Mon, 21 Sep 2015 17:00:45 +0000 (17:00 +0000)]
Generate WebCoreHeaderDetection.h with CMake on Windows
https://bugs.webkit.org/show_bug.cgi?id=135861

Reviewed by Brent Fulgham.

This fixes many of the failing media tests.

* AVFoundationSupport.py:
(lookFor):
(fileContains):
Use a command line parameter for the WebKitLibraries directory
to not require the WEBKIT_LIBRARIES environment variable with the CMake build.
* DerivedSources.make:
Pass WEBKIT_LIBRARIES as a command line parameter.
* PlatformAppleWin.cmake:
Added missing sources for video.
* PlatformWin.cmake:
Generate WebCoreHeaderDetection.h correctly and copy the media controls sources to WebKit.resources.

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

4 years agoWeb Inspector: requestAnimationFrame continues to be called after stopping the timeli...
mattbaker@apple.com [Mon, 21 Sep 2015 16:30:22 +0000 (16:30 +0000)]
Web Inspector: requestAnimationFrame continues to be called after stopping the timeline recording
https://bugs.webkit.org/show_bug.cgi?id=149390

Reviewed by Brian Burg.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._update):
Stop calling requestAnimationFrame if this._updating is false and recording end time is NaN.

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

4 years agoBuild fix for WebAssembly.
sukolsak@gmail.com [Mon, 21 Sep 2015 09:14:42 +0000 (09:14 +0000)]
Build fix for WebAssembly.

* wasm/JSWASMModule.cpp:
* wasm/WASMFunctionParser.cpp:

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

4 years ago[GTK] media controls does not show up when playing video finishes.
changseok.oh@collabora.com [Mon, 21 Sep 2015 08:53:01 +0000 (08:53 +0000)]
[GTK] media controls does not show up when playing video finishes.
https://bugs.webkit.org/show_bug.cgi?id=149112

Reviewed by Philippe Normand.

Source/WebCore:

GTK port does not show controls after playing video. This behavior is different
from what Mac port does. They do show controls when playing video finishes.
At least, we should update the timeline before showing it up not to show incorrect numbers
when reappearing.

Test: media/media-controls-timeline-updates-after-playing.html

* Modules/mediacontrols/mediaControlsBase.js:
(Controller.prototype.setPlaying):
(Controller.prototype.showControls):

LayoutTests:

* media/media-controls-timeline-updates-after-playing-expected.txt: Added.
* media/media-controls-timeline-updates-after-playing.html: Added.

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

4 years ago[GTK] timeline is not updated after few seconds when mouse hovers on controls
changseok.oh@collabora.com [Mon, 21 Sep 2015 08:37:25 +0000 (08:37 +0000)]
[GTK] timeline is not updated after few seconds when mouse hovers on controls
https://bugs.webkit.org/show_bug.cgi?id=149111

Reviewed by Philippe Normand.

Source/WebCore:

Timeline is not updated if controlsAreHidden is true. The problem here is that
the function does not mean actually 'hidden' since it only checkes 'show' and 'hidden'
class existences. The panel's visibility are not only controlled by the two classes,
but also by video::-webkit-media-controls-panel:hover. The panel could be visible
by setting the pseudo hover class. So we need to check if panel is hovered as well in controlsAreHidden().

Test: media/media-controls-timeline-updates-when-hovered.html

* Modules/mediacontrols/mediaControlsBase.js:
(Controller.prototype.controlsAreHidden):

LayoutTests:

* media/media-controls-timeline-updates-when-hovered-expected.txt: Added.
* media/media-controls-timeline-updates-when-hovered.html: Added.

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

4 years ago[GTK] run-gtk-tests doesn't provide feedback about crashing google tests
carlosgc@webkit.org [Mon, 21 Sep 2015 07:28:12 +0000 (07:28 +0000)]
[GTK] run-gtk-tests doesn't provide feedback about crashing google tests
https://bugs.webkit.org/show_bug.cgi?id=149252

Reviewed by Darin Adler.

In case of glib tests the test runner notifies about tests
crashing, but for google tests we don't get any feedback, which
means that in case of a test crashing we get a list of **PASS**
messages and at the summary we are notified that the test suite
has failed, but it's impossible to know which test cases have failed.

* Scripts/run-gtk-tests:
(TestRunner._run_google_test): Add a **CRASH** message if test
case crashed.

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

4 years ago[GTK] REGRESSION(188031): ASSERTION FAILED: menu
mcatanzaro@igalia.com [Mon, 21 Sep 2015 07:22:37 +0000 (07:22 +0000)]
[GTK] REGRESSION(188031): ASSERTION FAILED: menu
https://bugs.webkit.org/show_bug.cgi?id=149379

Reviewed by Carlos Garcia Campos.

Remove assert that no longer makes sense.

* platform/gtk/ContextMenuGtk.cpp:
(WebCore::ContextMenu::setPlatformDescription): Deleted.

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

4 years agoImplement SetLocal and SetGlobal expressions in WebAssembly
sukolsak@gmail.com [Mon, 21 Sep 2015 05:06:26 +0000 (05:06 +0000)]
Implement SetLocal and SetGlobal expressions in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=149383

Reviewed by Saam Barati.

SetLocal and SetGlobal in WebAssembly can be both statements and
expressions. We have implemented the statement version. This patch
implements the expression version.

SetLocal and SetGlobal expressions return the assigned value.
Since SetLocal and SetGlobal use only one operand, which is the assigned
value, we can simply implement them by not removing the value from the
top of the stack.

* tests/stress/wasm-globals.js:
* tests/stress/wasm-locals.js:
* tests/stress/wasm/globals.wasm:
* tests/stress/wasm/locals.wasm:
* wasm/WASMConstants.h:
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::buildSetLocal):
(JSC::WASMFunctionCompiler::buildSetGlobal):
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::parseStatement):
(JSC::WASMFunctionParser::parseExpressionI32):
(JSC::WASMFunctionParser::parseExpressionF32):
(JSC::WASMFunctionParser::parseExpressionF64):
(JSC::WASMFunctionParser::parseSetLocal):
(JSC::WASMFunctionParser::parseSetGlobal):
(JSC::WASMFunctionParser::parseSetLocalStatement): Deleted.
(JSC::WASMFunctionParser::parseSetGlobalStatement): Deleted.
* wasm/WASMFunctionParser.h:
* wasm/WASMFunctionSyntaxChecker.h:
(JSC::WASMFunctionSyntaxChecker::buildSetLocal):
(JSC::WASMFunctionSyntaxChecker::buildSetGlobal):

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

4 years ago[ES6] Added controlFlowProfiler test for arrow function
commit-queue@webkit.org [Mon, 21 Sep 2015 04:36:34 +0000 (04:36 +0000)]
[ES6] Added controlFlowProfiler test for arrow function
https://bugs.webkit.org/show_bug.cgi?id=145638

Patch by Aleksandr Skachkov <gskachkov@gmail.com> on 2015-09-19
Reviewed by Saam Barati.

* Source/JavaScriptCore/tests/controlFlowProfiler/arrowfunction-expression.js: added

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

4 years agohttp/tests/contentfiltering/load-substitute-data-from-appcache.html crashes sometimes
aestes@apple.com [Mon, 21 Sep 2015 04:26:43 +0000 (04:26 +0000)]
http/tests/contentfiltering/load-substitute-data-from-appcache.html crashes sometimes
https://bugs.webkit.org/show_bug.cgi?id=148890

Reviewed by Alexey Proskuryakov.

Added a test to verify my theory that load-substitute-data-from-appcache.html will crash even with Content Filtering disabled.

* TestExpectations: Skipped the new test since it only works in WebKit2.
* http/tests/appcache/decide-navigation-policy-after-delay-expected.txt: Added.
* http/tests/appcache/decide-navigation-policy-after-delay.html: Added.
* http/tests/appcache/resources/decide-navigation-policy-after-delay-frame.html: Added.
* platform/wk2/TestExpectations: Enabled the test in WebKit2.

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

4 years agoUnreviewed attempt to fix GTK build after r190030.
cdumez@apple.com [Mon, 21 Sep 2015 03:39:28 +0000 (03:39 +0000)]
Unreviewed attempt to fix GTK build after r190030.

* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_link_element_set_sizes):

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

4 years agoUnreviewed, another GTK build fix after r190017.
cdumez@apple.com [Mon, 21 Sep 2015 03:33:05 +0000 (03:33 +0000)]
Unreviewed, another GTK build fix after r190017.

* bindings/scripts/CodeGeneratorGObject.pm:
(IsPropertyWriteable):
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_class_init):
(webkit_dom_test_obj_set_property): Deleted.

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

4 years agoUnreviewed attempt to fix the GTK build after r190017.
cdumez@apple.com [Mon, 21 Sep 2015 03:24:36 +0000 (03:24 +0000)]
Unreviewed attempt to fix the GTK build after r190017.

* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction):

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

4 years agoUnreviewed, rebaseline W3C HTML DOM test on iOS after r190030.
cdumez@apple.com [Mon, 21 Sep 2015 03:01:22 +0000 (03:01 +0000)]
Unreviewed, rebaseline W3C HTML DOM test on iOS after r190030.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:

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

4 years agoPass JSC::ExecState to the custom bindings by reference
cdumez@apple.com [Mon, 21 Sep 2015 02:42:29 +0000 (02:42 +0000)]
Pass JSC::ExecState to the custom bindings by reference
https://bugs.webkit.org/show_bug.cgi?id=149393

Reviewed by Sam Weinig.

Pass JSC::ExecState to the custom bindings by reference instead of by
pointer as it is expected to be non-null.

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

4 years agoWebKitTestRunner can leak user content script results between tests
ap@apple.com [Mon, 21 Sep 2015 00:28:42 +0000 (00:28 +0000)]
WebKitTestRunner can leak user content script results between tests
https://bugs.webkit.org/show_bug.cgi?id=149391

Reviewed by Sam Weinig.

Move WKBundlePageRemoveAllUserContent call so that it's executed before loading
about:blank, and thus about:blank doesn't have unintended side effects.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::resetAfterTest):

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

4 years agoRegression(r190023): fast/dom/navigation-with-sideeffects-crash.html is crashing
cdumez@apple.com [Sun, 20 Sep 2015 23:24:23 +0000 (23:24 +0000)]
Regression(r190023): fast/dom/navigation-with-sideeffects-crash.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=149392

Reviewed by Alexey Proskuryakov.

In the generated code for [PutForwards=xxx], make sure the forwarded
implementation object is ref'd before calling toString() as toString()
can be overridden by JS and cause the object to get deref'd / destroyed.

No new tests, already covered by existing test.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjPutForwardsAttribute):
(WebCore::setJSTestObjPutForwardsNullableAttribute):

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

4 years agoFix a relative path in accessibility/mac/removing-textarea-after-edit-crash.html
ap@apple.com [Sun, 20 Sep 2015 19:52:04 +0000 (19:52 +0000)]
Fix a relative path in accessibility/mac/removing-textarea-after-edit-crash.html
after moving the test.
https://bugs.webkit.org/show_bug.cgi?id=149217

Patch by Chris Fleizach <cfleizach@apple.com> on 2015-09-20
Reviewed by Alexey Proskuryakov.

* accessibility/mac/removing-textarea-after-edit-crash.html:

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

4 years agoUnreviewed, updated my email address.
sukolsak@gmail.com [Sun, 20 Sep 2015 19:20:57 +0000 (19:20 +0000)]
Unreviewed, updated my email address.

* Scripts/webkitpy/common/config/contributors.json:

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

4 years agoGet rid of custom bindings for HTMLLinkElement.sizes setter
cdumez@apple.com [Sun, 20 Sep 2015 16:43:55 +0000 (16:43 +0000)]
Get rid of custom bindings for HTMLLinkElement.sizes setter
https://bugs.webkit.org/show_bug.cgi?id=149382

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

* web-platform-tests/html/dom/interfaces-expected.txt:
Rebaseline test. Our bindings generator does not move attributes that have
a custom setter from the instance to the prototype. Now that the 'sizes'
attribute no longer has a custom setter, it has moved to the prototype,
where it is expected to be.

Source/WebCore:

Get rid of custom bindings for HTMLLinkElement.sizes setter by leveraging
the new [PutForwards=xxx] Web IDL extended attribute, as per the HTML
specification:
- https://html.spec.whatwg.org/#htmllinkelement

Also add FIXME comments in our IDL for various attributes that should be
using [PutForwards=xxx] according to the HTML specification but are not
currently. Those were not updated in this patch because it will subtly
change their web-exposed behavior.

No new tests, no intended web-exposed behavior change. However, one side
effect of the change is that the attribtue has moved to the prototype.
Our bindings generator was keeping this attribute on the instance because
it has a custom setter.
Bindings tests coverage was extended.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSHTMLLinkElementCustom.cpp: Removed.
Drop custom bindings for HTMLLinkElement.sizes setter.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
- Stop passing an extra isNull argument to getters of nullable attributes
  that have a wrapper type. These can return a null pointer so there is
  no need for an extra argument.
- When [PutForwards=xxx] is used, only do the null-check on the attribute
  getter if the attribute is marked as nullable. If the attribute is not
  marked as nullable, the implementation is expected to return a C++
  reference, otherwise a raw pointer. This was needed because
  HTMLLinkElement::sizes() returns a reference as it can never return
  null.

* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
* bindings/scripts/test/TestObj.idl:
Add bindings tests coverage for using [PutForwards=xxx] on a
nullable attribute.

* dom/Document.idl:
Mark Document.location as nullable as per the specification. The
implementation returns a raw pointer and can return null. The
bindings generator expects a raw pointer and will do a null check
on it.

* html/HTMLAnchorElement.idl:
* html/HTMLAreaElement.idl:
* html/HTMLElement.idl:
* html/HTMLIFrameElement.idl:
* html/HTMLOutputElement.idl:
* html/HTMLTableCellElement.idl:
Add FIXME comments for attributes that are supposed to use
[PutForwards=xxx] as per the HTML specification but currently don't.

* html/HTMLLinkElement.idl:
Use [PutForwards=value] for the 'sizes' attribute, as per the
specification and stop using a custom setter.

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

4 years ago[CallWith=ScriptState] should pass ExecState to the implementation by reference
cdumez@apple.com [Sun, 20 Sep 2015 16:41:01 +0000 (16:41 +0000)]
[CallWith=ScriptState] should pass ExecState to the implementation by reference
https://bugs.webkit.org/show_bug.cgi?id=149378

Reviewed by Sam Weinig.

[CallWith=ScriptState] should pass ExecState to the implementation by
reference instead of pointer, as it is expected to be non-null.

Also rename the ExecState variables from 'exec' to 'state' in the
bindings as this is the preferred naming convention.

* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/legacy/LegacyCursor.cpp:
(WebCore::LegacyCursor::update):
* Modules/indexeddb/legacy/LegacyCursor.h:
* Modules/indexeddb/legacy/LegacyObjectStore.cpp:
(WebCore::LegacyObjectStore::add):
(WebCore::LegacyObjectStore::put):
* Modules/indexeddb/legacy/LegacyObjectStore.h:
* Modules/mediastream/CapabilityRange.cpp:
(WebCore::scriptValue):
(WebCore::CapabilityRange::min):
(WebCore::CapabilityRange::max):
* Modules/mediastream/CapabilityRange.h:
* Modules/streams/ReadableStreamController.h:
(WebCore::ReadableStreamController::error):
(WebCore::ReadableStreamController::enqueue):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateEventListenerCall):
(GenerateGetOwnPropertySlotBody):
(GenerateHeader):
(GenerateOverloadedFunction):
(GetIndexedGetterExpression):
(GenerateImplementation):
(GenerateFunctionCastedThis):
(GenerateCallWith):
(GenerateArgumentsCountCheck):
(GenerateParametersCheck):
(GenerateReturnParameters):
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(GenerateImplementationFunctionCall):
(JSValueToNative):
(NativeToJSValue):
(GenerateOverloadedConstructorDefinition):
(GenerateConstructorDefinition):

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

4 years ago[Mac, iOS] AccessibilityController doesn't uninstall global notification handler
ap@apple.com [Sun, 20 Sep 2015 15:30:09 +0000 (15:30 +0000)]
[Mac, iOS] AccessibilityController doesn't uninstall global notification handler
https://bugs.webkit.org/show_bug.cgi?id=149384

Reviewed by Chris Fleizach.

Tools:

* DumpRenderTree/ios/AccessibilityControllerIOS.mm:
(AccessibilityController::addNotificationListener): Fixed a leak, and cleaned up the code.
(AccessibilityController::platformResetToConsistentState): Actually remove the handler,
regardless of whether someone else holds a reference (we also call -stopListening in
-dealloc).

* DumpRenderTree/mac/AccessibilityControllerMac.mm:
(AccessibilityController::platformResetToConsistentState):
(AccessibilityController::addNotificationListener):
Ditto.

LayoutTests:

* accessibility/mac/loaded-notification.html: Cleaned up the test - js-test-pre is
incompatible with directly using waitUntilDone.

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

4 years ago.:
youenn.fablet@crf.canon.fr [Sun, 20 Sep 2015 10:30:05 +0000 (10:30 +0000)]
.:
Removing XHR_TIMEOUT guard

Remove XHR_TIMEOUT compilation guard
https://bugs.webkit.org/show_bug.cgi?id=149260

Reviewed by Benjamin Poulain.

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:
Remove XHR_TIMEOUT compilation guard
https://bugs.webkit.org/show_bug.cgi?id=149260

Reviewed by Benjamin Poulain.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:
Remove XHR_TIMEOUT compilation guard
https://bugs.webkit.org/show_bug.cgi?id=149260

Reviewed by Benjamin Poulain.

Covered by existing tests.

* Configurations/FeatureDefines.xcconfig:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::XMLHttpRequest):
(WebCore::XMLHttpRequest::didFail):
(WebCore::XMLHttpRequest::didReachTimeout):
(WebCore::XMLHttpRequest::setTimeout):
(WebCore::XMLHttpRequest::setResponseType):
(WebCore::XMLHttpRequest::open):
(WebCore::XMLHttpRequest::createRequest):
(WebCore::XMLHttpRequest::internalAbort):
(WebCore::XMLHttpRequest::didFailRedirectCheck):
(WebCore::XMLHttpRequest::didSendData):
(WebCore::XMLHttpRequest::suspend):
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequest.idl:

Source/WebKit/mac:
Remove XHR_TIMEOUT compilation guard
https://bugs.webkit.org/show_bug.cgi?id=149260

Reviewed by Benjamin Poulain.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:
Remove XHR_TIMEOUT compilation guard
https://bugs.webkit.org/show_bug.cgi?id=149260

Reviewed by Benjamin Poulain.

* Configurations/FeatureDefines.xcconfig:

Source/WTF:
Remove XHR_TIMEOUT compilation guard
https://bugs.webkit.org/show_bug.cgi?id=149260

Reviewed by Benjamin Poulain.

* wtf/FeatureDefines.h:

Tools:
Remove XHR_TIMEOUT compilation guard
https://bugs.webkit.org/show_bug.cgi?id=149260

Reviewed by Benjamin Poulain.

* Scripts/webkitperl/FeatureList.pm:

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

4 years agoAdd two missing files to the Xcode project
timothy_horton@apple.com [Sun, 20 Sep 2015 07:38:44 +0000 (07:38 +0000)]
Add two missing files to the Xcode project

* WebCore.xcodeproj/project.pbxproj:
These are imported by files that are built for Mac, but missing from the project.

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

4 years ago[Web IDL] Add support for [PutForwards=XXX] IDL extended attribute
cdumez@apple.com [Sun, 20 Sep 2015 01:59:36 +0000 (01:59 +0000)]
[Web IDL] Add support for [PutForwards=XXX] IDL extended attribute
https://bugs.webkit.org/show_bug.cgi?id=149376

Reviewed by Darin Adler.

[Web IDL] Add support for [PutForwards=XXX] IDL extended attribute:
https://heycam.github.io/webidl/#PutForwards

As an initial proof of concept, use it for Document.location as per the
HTML specification, instead of using custom bindings:
https://html.spec.whatwg.org/multipage/dom.html#the-document-object

More attributes can be ported later.

No new tests, no web-exposed behavior change intended. Bindings tests
coverage was added.

* bindings/js/JSDocumentCustom.cpp:
Drop custom bindings for the location attribute setter.

* bindings/scripts/CodeGenerator.pm:
(GetAttributeFromInterface):
Add convenience function that returned an attribute from another
interface. This is used by [PutForwards] to retrieve the forwarded
attribute.

* bindings/scripts/CodeGeneratorJS.pm:
(IsReadonly):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
Add support for [PutForwards=XXX] IDL extended attribute.

* bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestNode.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/ObjC/DOMTestNode.h:
* bindings/scripts/test/ObjC/DOMTestNode.mm:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
Add binding tests coverage for [PutForwards=XXX] IDL extended
attribute.

* dom/Document.idl:
Use [PutForwards=href] for Document.location attribute, as per the HTML
specification and stop using custom bindings for the setter. Also mark
the attribute as readonly as all attributes using [PutForwards] must be
marked as readonly as per the Web IDL specification.

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

4 years ago[GTK] Unreviewed, should check the result of fread
utatane.tea@gmail.com [Sun, 20 Sep 2015 01:09:05 +0000 (01:09 +0000)]
[GTK] Unreviewed, should check the result of fread
https://bugs.webkit.org/show_bug.cgi?id=148917

Suppress the build warning on GTK with GCC.

* jsc.cpp:
(fillBufferWithContentsOfFile):
(fetchModuleFromLocalFileSystem):

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

4 years ago[WebIDL] Specify default parameter values where it is useful
cdumez@apple.com [Sun, 20 Sep 2015 00:45:26 +0000 (00:45 +0000)]
[WebIDL] Specify default parameter values where it is useful
https://bugs.webkit.org/show_bug.cgi?id=149331
<rdar://problem/22545600>

Reviewed by Darin Adler.

Source/WebCore:

Specify default parameter values where it is useful in our IDL, that is
to say where undefined would be converted to something else than the
default value otherwise. This patch focuses on the HTML API.

This patch also adds support for default values for optional parameters
of string enumeration type as this was needed by the
CanvasRenderingContext2D API.

Test: fast/html/undefined-parameter-default-value.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
Add support default values for optional parameters of string enumeration
type as this was needed by the CanvasRenderingContext2D API.

* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
* bindings/scripts/test/TestObj.idl:
Add bindings tests coverage for optional parameters of string enumeration
type and that have a default value.

* html/HTMLInputElement.idl:
Specify default parameter value for stepUp() / stepDown(). Without this,
stepUp(undefined) would be equivalent to calling stepUp(0) even though
it is supposed to be equivalent to calling stepUp(1).

* html/HTMLTableElement.idl:
* html/HTMLTableSectionElement.idl:
Specify default parameter value for insertRow(). Without this,
insertRow(undefined) would be equivalent to insertRow(0) instead of
insertRow(-1). This would prepend the row instead of appending it:
- https://html.spec.whatwg.org/#htmltableelement
- https://html.spec.whatwg.org/#htmltablesectionelement

* html/HTMLTableRowElement.idl:
Specify default parameter value for insertCell(). Without this,
insertCell(undefined) would be equivalent to insertCell(0) instead of
insertCell(-1). This would prepend the cell instead of appending it:
- https://html.spec.whatwg.org/#htmltablerowelement

* html/canvas/CanvasRenderingContext2D.idl:
Specify default value for CanvasWindingRule parameters so that calling
this with undefined will use the default enum value instead of using the
"undefined" string and then throwing because it is not a valid enum value:
- https://html.spec.whatwg.org/#canvasrenderingcontext2d

LayoutTests:

Add test to check the behavior of passing undefined for various optional
parameters that have a default value in the HTML specification.

* fast/html/undefined-parameter-default-value-expected.txt: Added.
* fast/html/undefined-parameter-default-value.html: Added.

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

4 years agoCleanup code that finds and loads a media engine
eric.carlson@apple.com [Sun, 20 Sep 2015 00:43:08 +0000 (00:43 +0000)]
Cleanup code that finds and loads a media engine
https://bugs.webkit.org/show_bug.cgi?id=149371

Reviewed by Darin Adler.

No new tests, no functional change.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::setRegistry): New, set the registry.
(WebCore::MediaStream::lookup): New, lookup a url in the registry.
* Modules/mediastream/MediaStream.h:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource): Restructure and simplify the code that tries the
  different types of media engine so the code is easier to understand and modify.
(WebCore::HTMLMediaElement::createMediaPlayer): Clear m_mediaStreamSrcObject.

* platform/graphics/MediaPlayer.cpp:
(WebCore::buildMediaEnginesVector): Add some whitespace to make it easier to read.
(WebCore::bestMediaEngineForSupportParameters): Also process mediastream and mediasource urls.
(WebCore::MediaPlayer::load): ASSERT if called when the reload timer is active.
(WebCore::MediaPlayer::loadWithNextMediaEngine): Also process mediastream and mediasource urls.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Don't test empty/null urls.

* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::supportsType): Ditto.

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

4 years ago[GTK] WebEditorClient::supportsGlobalSelection returns true under Wayland
mcatanzaro@igalia.com [Sun, 20 Sep 2015 00:17:27 +0000 (00:17 +0000)]
[GTK] WebEditorClient::supportsGlobalSelection returns true under Wayland
https://bugs.webkit.org/show_bug.cgi?id=149375

Reviewed by Darin Adler.

WebEditorClient::supportsGlobalSelection should return false when running under Wayland,
since Wayland does not have any equivalent for PRIMARY or the concept of a global selection.

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::supportsGlobalSelection):

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

4 years agoAttempted build fix.
mitz@apple.com [Sat, 19 Sep 2015 22:07:58 +0000 (22:07 +0000)]
Attempted build fix.

* mac/postprocess-framework-headers.sh: Fixed an overzealous regular expression.

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

4 years agoGet rid of most custom bindings for Location.idl
cdumez@apple.com [Sat, 19 Sep 2015 21:37:09 +0000 (21:37 +0000)]
Get rid of most custom bindings for Location.idl
https://bugs.webkit.org/show_bug.cgi?id=149370

Reviewed by Darin Adler.

Get rid of most custom bindings for Location.idl by extending support
for the [CallWith=XXX] IDL extended attribute to support 2 additional
values: ActiveWindow and FirstWindow. Also introduce a
[SetterCallWith=XXX] alternative that passes the extra arguments to
the attribute setter only, as is needed by the Location attributes.

No new tests, no intended web-exposed behavior change.

* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
* bindings/scripts/test/TestObj.idl:
Add bindings tests coverage for [SetterCallWith=XXX].

* page/Location.idl:
Also drop [DoNotCheckSecurityOnSetter] on href attribute. It has
no effet as the interface does not have [CheckSecurity].

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

4 years agoAttempted build fix.
mitz@apple.com [Sat, 19 Sep 2015 21:05:47 +0000 (21:05 +0000)]
Attempted build fix.

* WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:

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

4 years agoGet rid of custom bindings for Document.location getter
cdumez@apple.com [Sat, 19 Sep 2015 18:15:23 +0000 (18:15 +0000)]
Get rid of custom bindings for Document.location getter
https://bugs.webkit.org/show_bug.cgi?id=149369

Reviewed by Andreas Kling.

Get rid of custom bindings for Document.location getter by defining
a location getter on Document that calls the one on the document's
DOMWindow. The DOMWindow location getter already has an
isCurrentlyDisplayedInFrame() check so the document does not need
to do a null check on the frame.

No new tests, no web-exposed behavior change intended.

* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::location): Deleted.
* dom/Document.cpp:
(WebCore::Document::location):
* dom/Document.h:
* dom/Document.idl:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::location):

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

4 years agoVariableEnvironmentNode should inherit from ParserArenaDeletable because VariableEnvi...
sbarati@apple.com [Sat, 19 Sep 2015 15:36:46 +0000 (15:36 +0000)]
VariableEnvironmentNode should inherit from ParserArenaDeletable because VariableEnvironment's must have their destructors run
https://bugs.webkit.org/show_bug.cgi?id=149359

Reviewed by Andreas Kling.

VariableEnvironment must have its destructor run.
Therefore, VariableEnvironmentNode should inherit from ParserArenaDeletable.
Also, anything that inherits from VariableEnvironmentNode must use
ParserArenaDeletable's operator new. Also, any other nodes that own
a VariableEnvironment must also have their destructors run.

* parser/Nodes.h:
(JSC::VariableEnvironmentNode::VariableEnvironmentNode):

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

4 years agoNull dereference loading Blink layout test svg/filters/feImage-failed-load-crash...
dino@apple.com [Sat, 19 Sep 2015 09:59:47 +0000 (09:59 +0000)]
Null dereference loading Blink layout test svg/filters/feImage-failed-load-crash.html
https://bugs.webkit.org/show_bug.cgi?id=149316
<rdar://problem/22749532>

Reviewed by Tim Horton.

Source/WebCore:

If an feImage triggered loading a resource, and then was removed from the document,
we'd still try to notify its parent when the resource arrived (or failed).

Merge Blink commit:
https://chromium.googlesource.com/chromium/blink/+/9cbcfd7866bbaff0c4b3c4c8508b7c97b46d6e6a

Test: svg/filters/feImage-failed-load-crash.html

* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::notifyFinished): Add a null check to the parent element
before sending the notification.

LayoutTests:

Merge Blink commit:
https://chromium.googlesource.com/chromium/blink/+/9cbcfd7866bbaff0c4b3c4c8508b7c97b46d6e6a

* svg/filters/feImage-failed-load-crash-expected.txt: Added.
* svg/filters/feImage-failed-load-crash.html: Added.

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

4 years agoNull dereference loading Blink layout test svg/custom/use-href-attr-removal-crash...
dino@apple.com [Sat, 19 Sep 2015 09:56:12 +0000 (09:56 +0000)]
Null dereference loading Blink layout test svg/custom/use-href-attr-removal-crash.html
https://bugs.webkit.org/show_bug.cgi?id=149315
<rdar://problem/22749358>

Reviewed by Tim Horton.

Source/WebCore:

We were not checking if the corresponding element referenced from
the SVG <use> actually existed before trying to set attributes on it.
The original Blink change is a little more detailed:
https://chromium.googlesource.com/chromium/blink/+/e2f1087f32bb088160ab7d59a715a1403ef267c7
However, we've significantly diverged at this point.

Tests: svg/custom/use-href-attr-removal-crash.html
       svg/custom/use-href-attr-removal-crash2.svg
       svg/custom/use-href-change-local-to-invalid-remote.html

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::transferSizeAttributesToTargetClone):

LayoutTests:

These tests, copied from Blink, should not crash.
The originals come from:
https://chromium.googlesource.com/chromium/blink/+/e2f1087f32bb088160ab7d59a715a1403ef267c7

* svg/custom/use-href-attr-removal-crash.html: Added.
* svg/custom/use-href-attr-removal-crash-expected.txt: Added.
* svg/custom/use-href-attr-removal-crash2.svg: Added.
* svg/custom/use-href-attr-removal-crash2-expected.txt: Added.
* svg/custom/use-href-change-local-to-invalid-remote.html: Added.
* svg/custom/use-href-change-local-to-invalid-remote-expected.txt: Added.

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

4 years agoFix Windows tests after r189934.
achristensen@apple.com [Sat, 19 Sep 2015 08:57:33 +0000 (08:57 +0000)]
Fix Windows tests after r189934.

* CMakeLists.txt:
Include WebKit.rc to include resources like missingImage.png in WebKit.dll.

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