WebKit-https.git
3 years agoMove two MiniBrowserBundle settings out of the .pbxproj
aestes@apple.com [Fri, 10 Feb 2017 10:28:59 +0000 (10:28 +0000)]
Move two MiniBrowserBundle settings out of the .pbxproj
https://bugs.webkit.org/show_bug.cgi?id=168106

Reviewed by Tim Horton.

INFOPLIST_FILE was specified in MiniBrowserBundle.xcconfig but overridden to "" in
the project file. This removes the project file override.

WRAPPER_EXTENSION was moved from the project file to MiniBrowserBundle.xcconfig.

* MiniBrowser/Configurations/MiniBrowserBundle.xcconfig:
* MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:

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

3 years ago[EME] Implement MediaKeySession::updateKeyStatuses(), MediaKeyStatusMap
zandobersek@gmail.com [Fri, 10 Feb 2017 10:22:50 +0000 (10:22 +0000)]
[EME] Implement MediaKeySession::updateKeyStatuses(), MediaKeyStatusMap
https://bugs.webkit.org/show_bug.cgi?id=167888

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Implement MediaKeySession::updateKeyStatuses(), transforming the passed-in
KeyStatusVector into a Vector mapping the key IDs to MediaKeyStatus values.
A keystatuseschange event is fired on the MediaKeySession object afterwards.
The queueing of the task that runs the 'attemp to resume playback' on the
related HTMLMediaElement objects isn't done yet since that algorithm isn't
implemented yet.

The statuses Vector is stored on the MediaKeySession object. That Vector is
then exposed through the MediaKeyStatusMap object, each such object being
unique to one MediaKeySession object. The implementation of MediaKeyStatusMap
thus keeps a reference to the session object as long as that object is alive,
and queries the MediaKeySession::statuses() getter to access the Vector that
contains status information for all the key IDs.

MediaKeyStatusMap::Iterator object keeps a reference to the MediaKeyStatusMap
object and accesses the statuses by indexing into the status Vector of the
related MediaKeySession object.

CDMInstance::updateLicense() now accepts the session ID string as the first
argument, making it possible to specify which session should be updated.

MockCDMFactory::keysForSessionWithID() returns an optional reference to the
Vector value in the session map that lists all the key IDs that are being
stored for that session.

MockCDMInstance::updateLicense() now detects the 'keys-changed' entry in the
passed-in response data, and upon detecting that constructs a KeyStatusVector
object containing all the keys for that session. KeyStatus::Usable is returned
for each object at the moment, but this should be adjustable in the future
through additional parameters passed through the response data. The Vector
object is then passed to the callback and is then passed to the 'update key
statuses' algorithm in MediaKeySession.

Covered by a test case in media/encrypted-media/mock-MediaKeySession-update.html.

* Modules/encryptedmedia/CDMInstance.h:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::~MediaKeySession):
(WebCore::MediaKeySession::update):
(WebCore::MediaKeySession::updateKeyStatuses):
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/encryptedmedia/MediaKeyStatusMap.cpp:
(WebCore::MediaKeyStatusMap::MediaKeyStatusMap):
(WebCore::MediaKeyStatusMap::detachSession):
(WebCore::MediaKeyStatusMap::size):
(WebCore::keyIdsMatch):
(WebCore::MediaKeyStatusMap::has):
(WebCore::MediaKeyStatusMap::get):
(WebCore::MediaKeyStatusMap::Iterator::Iterator):
(WebCore::MediaKeyStatusMap::Iterator::next):
* Modules/encryptedmedia/MediaKeyStatusMap.h:
(WebCore::MediaKeyStatusMap::create):
* Modules/encryptedmedia/MediaKeyStatusMap.idl:
* testing/MockCDMFactory.cpp:
(WebCore::MockCDMFactory::keysForSessionWithID):
(WebCore::MockCDMInstance::updateLicense):
* testing/MockCDMFactory.h:

LayoutTests:

Add another test case to the mock-MediaKeySession-update.html test that
ensures the keystatuseschange event is fired on the MediaKeySession object
and that the status of the keys is properly reported through the
MediaKeyStatusMap object associated with this MediaKeySession.

* media/encrypted-media/mock-MediaKeySession-update-expected.txt:
* media/encrypted-media/mock-MediaKeySession-update.html:

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

3 years agoFix 32-and-64-bit build on El Capitan.
achristensen@apple.com [Fri, 10 Feb 2017 09:17:12 +0000 (09:17 +0000)]
Fix 32-and-64-bit build on El Capitan.

* Scripts/build-webkit:
Somebody's building with something like this:
build-webkit ARCHS="i386 x86_64"
We want this to also not build libwebrtc for now.

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

3 years agoFix ASAN build.
achristensen@apple.com [Fri, 10 Feb 2017 09:04:32 +0000 (09:04 +0000)]
Fix ASAN build.

* Source/webrtc/base/sanitizer.h:
SANITIZER_UNUSED3 wasn't defined if we are using address_sanitizer but not memory_sanitizer.

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

3 years agoFix 32-bit build on El Capitan.
achristensen@apple.com [Fri, 10 Feb 2017 08:41:56 +0000 (08:41 +0000)]
Fix 32-bit build on El Capitan.

* Scripts/build-webkit:
The bot uses ARCHS=i386 instead of --32-bit.
This is a hack, but it should fix the bot until I can do a better fix in the morning.

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

3 years agoUnreviewed. Fix GTK+ build with threaded compositor disabled.
carlosgc@webkit.org [Fri, 10 Feb 2017 08:26:45 +0000 (08:26 +0000)]
Unreviewed. Fix GTK+ build with threaded compositor disabled.

* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
(WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode):
(WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingModeNow):

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

3 years agoFix 32-bit build on El Capitan.
achristensen@apple.com [Fri, 10 Feb 2017 08:12:42 +0000 (08:12 +0000)]
Fix 32-bit build on El Capitan.

* Scripts/build-webkit:
Don't build i386 libwebrtc.

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

3 years agoUnreviewed GTK+ gardening. Update expectations of tests using CSS3 Text each-line...
carlosgc@webkit.org [Fri, 10 Feb 2017 07:12:12 +0000 (07:12 +0000)]
Unreviewed GTK+ gardening. Update expectations of tests using CSS3 Text each-line and hanging indent.

* platform/gtk/TestExpectations:

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

3 years agoImprove IOSurfacePool logging
simon.fraser@apple.com [Fri, 10 Feb 2017 05:26:08 +0000 (05:26 +0000)]
Improve IOSurfacePool logging
https://bugs.webkit.org/show_bug.cgi?id=168098

Reviewed by Tim Horton.

Pass a string to DUMP_POOL_STATISTICS so we can tell what's triggering the
logging.

* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::takeSurface):
(WebCore::IOSurfacePool::addSurface):
(WebCore::IOSurfacePool::evict):
(WebCore::IOSurfacePool::collectionTimerFired):
(WebCore::IOSurfacePool::showPoolStatistics):
* platform/graphics/cg/IOSurfacePool.h:

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

3 years agoUnreviewed, rolling out r212040.
achristensen@apple.com [Fri, 10 Feb 2017 05:08:59 +0000 (05:08 +0000)]
Unreviewed, rolling out r212040.

Broke build.  I'm not surprised

Reverted changeset:

"[WebRTC][Mac] Activate libwebrtc"
https://bugs.webkit.org/show_bug.cgi?id=167293
http://trac.webkit.org/changeset/212040

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

3 years ago[Mac][WK2] Use MIME type to add file extension to downloads' suggested filenames...
cdumez@apple.com [Fri, 10 Feb 2017 04:00:52 +0000 (04:00 +0000)]
[Mac][WK2] Use MIME type to add file extension to downloads' suggested filenames when missing
https://bugs.webkit.org/show_bug.cgi?id=168077
<rdar://problem/30412595>

Reviewed by Alex Christensen.

Source/WebCore:

Add utility function to MIMETypeRegistry that appends an extension to
a filename if necessary, based on a provided MIME type.

Tests: fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html
       http/tests/download/anchor-download-no-extension.html

* platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::appendFileExtensionIfNecessary):
* platform/MIMETypeRegistry.h:
* platform/cocoa/MIMETypeRegistryCocoa.mm:
(WebCore::MIMETypeRegistry::appendFileExtensionIfNecessary):

Source/WebKit2:

Use MIME type to add file extension to downloads' suggested filenames when missing:
- https://html.spec.whatwg.org/#as-a-download (step 19)

This new behavior matches Chrome.

* NetworkProcess/Downloads/BlobDownloadClient.cpp:
(WebKit::BlobDownloadClient::didReceiveResponseAsync):
* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::didReceiveResponse):
(WebKit::Download::decideDestinationWithSuggestedFilename):
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::findPendingDownloadLocation):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didStart):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/Downloads/DownloadProxy.messages.in:

LayoutTests:

Rebaseline a couple of download tests where suggested filenames now have an extension
and extend test coverage.

* fast/dom/HTMLAnchorElement/anchor-download-expected.txt:
* fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click-expected.txt:
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension-expected.txt: Added.
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html: Added.
* fast/dom/HTMLAnchorElement/anchor-nodownload-set-expected.txt:
* http/tests/download/anchor-download-no-extension-expected.txt: Added.
* http/tests/download/anchor-download-no-extension.html: Added.
* platform/ios-simulator-wk2/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:

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

3 years ago[WebRTC][Mac] Activate libwebrtc
achristensen@apple.com [Fri, 10 Feb 2017 03:39:17 +0000 (03:39 +0000)]
[WebRTC][Mac] Activate libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=167293

Patch by Youenn Fablet <youenn@apple.com> on 2017-02-09
Reviewed by Alex Christensen.

Source/WebCore:

* Configurations/WebCore.xcconfig:
* Configurations/WebCoreTestSupport.xcconfig:

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:

Source/WTF:

* wtf/Platform.h:

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

3 years agoFix libwebrtc build on case-sensitive file systems.
achristensen@apple.com [Fri, 10 Feb 2017 03:33:55 +0000 (03:33 +0000)]
Fix libwebrtc build on case-sensitive file systems.

* WebProcess/Network/webrtc/WebRTCMonitor.cpp:

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

3 years agoSVG clip-path references can clip out later content
pdr@google.com [Fri, 10 Feb 2017 03:27:40 +0000 (03:27 +0000)]
SVG clip-path references can clip out later content
https://bugs.webkit.org/show_bug.cgi?id=164181

Reviewed by Said Abou-Hallawa.

Source/WebCore:

RenderSVGResourceClipper can modify the GraphicsContext state (through the path-only
clipping codepath) so we need to ensure RenderLayer::setupClipPath saves the context
and its caller restores it back so later content is not clipped as well.

This patch is based on a chromium patch by fs@opera.com:
https://chromium.googlesource.com/chromium/src/+/b3f7e7d2c4afb3c7e5c7eb438ff5933cbe2109b3

Test: css3/masking/clip-path-reference-restore.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath): Add a GC save and return true to restore. Also switch to downcast instead of static_cast.

LayoutTests:

Make sure applying multiple clip-path references does not clip out later content.

* css3/masking/clip-path-reference-restore-expected.html: Added.
* css3/masking/clip-path-reference-restore.html: Added.

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

3 years agoFix El Capitan build.
achristensen@apple.com [Fri, 10 Feb 2017 03:02:25 +0000 (03:02 +0000)]
Fix El Capitan build.

* libwebrtc.xcodeproj/project.pbxproj:
Remove more SSE4 code.

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

3 years agoFix El Capitan build.
achristensen@apple.com [Fri, 10 Feb 2017 02:59:06 +0000 (02:59 +0000)]
Fix El Capitan build.

* libwebrtc.xcodeproj/project.pbxproj:
Remove more SSE4 code.

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

3 years agoSharedArrayBuffer does not need to be in the transfer list
fpizlo@apple.com [Fri, 10 Feb 2017 02:42:20 +0000 (02:42 +0000)]
SharedArrayBuffer does not need to be in the transfer list
https://bugs.webkit.org/show_bug.cgi?id=168079

Reviewed by Geoffrey Garen and Keith Miller.
Source/JavaScriptCore:

Exposes a simple shareWith() API for when you know you want to share the contents of
a shared buffer. Also a useful explicit operator bool.

* runtime/ArrayBuffer.cpp:
(JSC::ArrayBuffer::shareWith):
* runtime/ArrayBuffer.h:
(JSC::ArrayBufferContents::operator bool):

Source/WebCore:

Tests: workers/sab/multi-memory-multi-buffer.html
       workers/sab/multi-memory.html
       workers/sab/no-transfer.html
       workers/sab/postMessage-clones.html
       workers/sab/sent-from-worker-no-transfer.html
       workers/sab/sent-from-worker-transfer.html

The SAB API that we originally implemented required that SABs get put in transfer lists
when they are sent to workers.

The new SAB API that everyone is converging towards requires that you do not put the
SAB in the transfer list. That's supposed to be an error. Instead, anytime that a SAB
is part of any message to or from a dedicated worker then it is automatically shared.

The new API provides a lot more clarity about what is supposed to happen in contexts
that support transfering but don't support sharing.

Right now this patch allows both styles to work, but I hope we can disable the transfer
list capability soon.

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::deserializeIDBValueToJSValue):
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::JSMessageEvent::data):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::serialize):
(WebCore::CloneSerializer::CloneSerializer):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::deserialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::CloneDeserializer::readTerminal):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::deserialize):
* bindings/js/SerializedScriptValue.h:
(): Deleted.
* dom/CustomEvent.cpp:
(WebCore::CustomEvent::trySerializeDetail):
* dom/ErrorEvent.cpp:
(WebCore::ErrorEvent::trySerializeError):
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::trySerializeData):
* dom/PopStateEvent.cpp:
(WebCore::PopStateEvent::trySerializeState):
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::postMessage):
* workers/Worker.cpp:
(WebCore::Worker::postMessage):

LayoutTests:

This adds tests that ensure that SABs behave correctly (are either cloned or shared)
depending on context, and that we currently share SABs whether they are in the transfer
list or not. This also adds tests for SABs being passed around via more complicated
data structures.

* workers/sab/multi-memory-expected.txt: Added.
* workers/sab/multi-memory-multi-buffer-expected.txt: Added.
* workers/sab/multi-memory-multi-buffer.html: Added.
* workers/sab/multi-memory-worker-1.js: Added.
(onmessage):
* workers/sab/multi-memory-worker-2.js: Added.
(onmessage):
* workers/sab/multi-memory.html: Added.
* workers/sab/no-transfer-expected.txt: Added.
* workers/sab/no-transfer.html: Added.
* workers/sab/postMessage-clones-expected.txt: Added.
* workers/sab/postMessage-clones.html: Added.
* workers/sab/sab-creator-no-transfer.js: Added.
* workers/sab/sab-creator-transfer.js: Added.
* workers/sab/sent-from-worker-no-transfer-expected.txt: Added.
* workers/sab/sent-from-worker-no-transfer.html: Added.
* workers/sab/sent-from-worker-transfer-expected.txt: Added.
* workers/sab/sent-from-worker-transfer.html: Added.
* workers/sab/worker-resources.js:

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

3 years agoBuild libwebrtc on bots without using it yet
achristensen@apple.com [Fri, 10 Feb 2017 02:35:51 +0000 (02:35 +0000)]
Build libwebrtc on bots without using it yet
https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

* Scripts/build-webkit:

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

3 years agoFix iOS and El Capitan builds of libwebrtc.
achristensen@apple.com [Fri, 10 Feb 2017 02:35:01 +0000 (02:35 +0000)]
Fix iOS and El Capitan builds of libwebrtc.

* Configurations/libwebrtc.xcconfig:
Skip building audio_mixer_manager_mac.cc on iOS.
* libwebrtc.xcodeproj/project.pbxproj:
El Capitan doesn't like the SSE4 optimizations in opus.
Just don't include them for now.

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

3 years agoUnreviewed build fix after r212025.
bfulgham@apple.com [Fri, 10 Feb 2017 02:34:17 +0000 (02:34 +0000)]
Unreviewed build fix after r212025.

inDocument -> isConnected

* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::didMoveToNewDocument):
(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::formElementIndex):

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

3 years agoMake sure Event keeps its current target element alive
bfulgham@apple.com [Fri, 10 Feb 2017 02:21:09 +0000 (02:21 +0000)]
Make sure Event keeps its current target element alive
https://bugs.webkit.org/show_bug.cgi?id=167885
<rdar://problem/30376972>

Patch by Chris Dumez <cdumez@apple.com> on 2017-02-09
Reviewed by Brent Fulgham.

Source/WebCore:

Make sure Event keeps its current target element alive to avoid
crashes if it is accessed by JS after it has been garbage collected.

Test: fast/events/currentTarget-gc-crash.html

* dom/Event.cpp:
(WebCore::Event::setCurrentTarget):
* dom/Event.h:
(WebCore::Event::currentTarget):

LayoutTests:

Add layout test reproducing the crash.

* fast/events/currentTarget-gc-crash-expected.txt: Added.
* fast/events/currentTarget-gc-crash.html: Added.

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

3 years agoCrash in render tree after dynamically mutating the slot value
bfulgham@apple.com [Fri, 10 Feb 2017 02:19:04 +0000 (02:19 +0000)]
Crash in render tree after dynamically mutating the slot value
https://bugs.webkit.org/show_bug.cgi?id=167502

Patch by Ryosuke Niwa <rniwa@webkit.org> on 2017-02-09
Reviewed by Antti Koivisto.

Source/WebCore:

The crash was caused by attributeChanged not destructing the render tree after an assigned element had been
removed from its slot. Since the style resolver can no longer find this element in the flat tree, we need to
delete its render object as if the element had been removed from the DOM tree.

Tests: fast/html/details-summary-slot.html
       fast/shadow-dom/shadow-slot-attribute-change-crash.html

* dom/Element.cpp:
(WebCore::Element::attributeChanged):
* html/HTMLSummaryElement.cpp:
(WebCore::SummarySlotElement): Added. Always use the default slot regardless of the slot attribute's value.
(WebCore::HTMLSummaryElement::create): Use SummarySlotElement

LayoutTests:

Added regression tests for the crash, and one for assigning non-empty slot value to a child
of a summary element. The slot attribute should always be ignored since the fact summary
element has its own shadow tree is an implementation detail that should never be exposed.

* fast/html/details-summary-slot-expected.html: Added.
* fast/html/details-summary-slot.html: Added.
* fast/shadow-dom/shadow-slot-attribute-change-crash-expected.txt: Added.
* fast/shadow-dom/shadow-slot-attribute-change-crash.html: Added.

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

3 years agoDetails element doesn't work correctly when mutating content between closing and...
bfulgham@apple.com [Fri, 10 Feb 2017 02:17:05 +0000 (02:17 +0000)]
Details element doesn't work correctly when mutating content between closing and opening
https://bugs.webkit.org/show_bug.cgi?id=167310

Patch by Antti Koivisto <antti@apple.com> on 2017-02-09
Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: fast/html/details-close-modify-open.html
       fast/shadow-dom/slot-remove-mutate-add.html

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

    Always reset the slot assignment when content is mutated.

LayoutTests:

* fast/html/details-close-modify-open-expected.html: Added.
* fast/html/details-close-modify-open.html: Added.
* fast/shadow-dom/slot-remove-mutate-add-expected.html: Added.
* fast/shadow-dom/slot-remove-mutate-add.html: Added.

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

3 years agoCrash under FormSubmission::create()
bfulgham@apple.com [Fri, 10 Feb 2017 02:15:02 +0000 (02:15 +0000)]
Crash under FormSubmission::create()
https://bugs.webkit.org/show_bug.cgi?id=167200
<rdar://problem/30096323>

Patch by Chris Dumez <cdumez@apple.com> on 2017-02-09
Reviewed by Darin Adler.

Source/WebCore:

The issue is that FormSubmission::create() was iterating over
form.associatedElements() as was calling Element::appendFormData()
in the loop. HTMLObjectElement::appendFormData() was calling
pluginWidget(PluginLoadingPolicy::Load) which causes a synchronous
layout and can fire events (such as focus event) synchronously.
Firing those events synchronously allows the JS to modify the
form.associatedElements() vector we are currently iterating on.

To avoid this issue, we now call pluginWidget(PluginLoadingPolicy::DoNotLoad)
in HTMLObjectElement::appendFormData() as we are not allowed to fire
synchronous events at this point. I also added a security assertion
in FormSubmission::create() to catch cases where we fire JS events
while iterating over the form associated elements to more easily
notice these things in the future.

Test: fast/forms/formsubmission-appendFormData-crash.html

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::appendFormData):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):

LayoutTests:

Add layout test coverage.

* fast/forms/formsubmission-appendFormData-crash-expected.txt: Added.
* fast/forms/formsubmission-appendFormData-crash.html: Added.

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

3 years agoCrash under HTMLFormElement::registerFormElement()
bfulgham@apple.com [Fri, 10 Feb 2017 02:13:07 +0000 (02:13 +0000)]
Crash under HTMLFormElement::registerFormElement()
https://bugs.webkit.org/show_bug.cgi?id=167162

Patch by Chris Dumez <cdumez@apple.com> on 2017-02-09
Reviewed by Ryosuke Niwa.

Source/WebCore:

didMoveToNewDocument() was re-registering FormAttributeTargetObserver
even if the element's inDocument was not set yet. As a result, it was
possible for FormAssociatedElement::resetFormOwner() to be called
when the element was in the tree but with its inDocument still being
false (because insertedInto() has not been called yet). This could
end up calling HTMLFormElement::registerFormElement() even though
the element is still recognized as detached. This is an issue because
HTMLFormElement::m_associatedElements's order and its corresponding
indexes (m_associatedElementsBeforeIndex / m_associatedElementsAfterIndex)
rely on the position of the element with regards to the form element
(before / inside / after).

To address the issue, we now only register the FormAttributeTargetObserver
in didMoveToNewDocument() if the inDocument flag is set to true. This
is similar to what is done at other call sites of
resetFormAttributeTargetObserver(). We also ignore the form content
attribute in HTMLFormElement::formElementIndex() if the element is
not connected.

As per the HTML specification [1], the form content attribute is only
taken if the element is connected (i.e. inDocument flag is true).

Note that FormAssociatedElement::findAssociatedForm() was already
ignoring the form content attribute if the element is disconnected.

[1] https://html.spec.whatwg.org/#reset-the-form-owner (step 3)

Test: fast/forms/registerFormElement-crash.html

* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::didMoveToNewDocument):
Only call resetFormAttributeTargetObserver() if inDocument flag is set,
similarly to what is done at other call sites.

(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
Add an assertion to make sure no one call this method on an element that
is not connected.

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::formElementIndex):
Ignore the form content attribute if the element is not connected, as
per the HTML specification [1].

LayoutTests:

Add layout test coverage.

* fast/forms/registerFormElement-crash-expected.txt: Added.
* fast/forms/registerFormElement-crash.html: Added.

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

3 years agoTear down existing renderers when adding a shadow root.
bfulgham@apple.com [Fri, 10 Feb 2017 02:11:28 +0000 (02:11 +0000)]
Tear down existing renderers when adding a shadow root.
https://bugs.webkit.org/show_bug.cgi?id=167117

Patch by Antti Koivisto <antti@apple.com> on 2017-02-09
Reviewed by Andreas Kling.

Source/WebCore:

Adding a shadow root may cause children no longer be part of the flat tree. If they had renderers
tear down code would no longer reach them.

Test: fast/shadow-dom/attach-shadow-teardown.html

* dom/Element.cpp:
(WebCore::Element::addShadowRoot):

    Tear down existing render tree when adding a shadow root.

LayoutTests:

* fast/shadow-dom/attach-shadow-teardown-expected.txt: Added.
* fast/shadow-dom/attach-shadow-teardown.html: Added.

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

3 years agoHandle synchronous layout when setting a selection range
bfulgham@apple.com [Fri, 10 Feb 2017 02:09:25 +0000 (02:09 +0000)]
Handle synchronous layout when setting a selection range
https://bugs.webkit.org/show_bug.cgi?id=167092
<rdar://problem/30041640>

Reviewed by Antti Koivisto.

Source/WebCore:

The 'innerTextElement' of a form control can change during layout due
to arbitrary JavaScript executing. Handle the case where the inner text
element has changed so that current render box height is while setting
a selection range.

Test: fast/forms/input-type-change-during-selection.html

* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionRange):

LayoutTests:

* fast/forms/input-type-change-during-selection-expected.txt: Added.
* fast/forms/input-type-change-during-selection.html: Added.

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

3 years agoB3::Procedure::deleteOrphans() should neutralize upsilons with dead phis.
bfulgham@apple.com [Fri, 10 Feb 2017 02:07:18 +0000 (02:07 +0000)]
B3::Procedure::deleteOrphans() should neutralize upsilons with dead phis.
https://bugs.webkit.org/show_bug.cgi?id=167437
<rdar://problem/30198083>

Patch by Mark Lam <mark.lam@apple.com> on 2017-02-09
Reviewed by Filip Pizlo.

JSTests:

* stress/b3-delete-orphans-should-neutralize-upsilons-with-dead-phis.js: Added.

Source/JavaScriptCore:

* b3/B3Procedure.cpp:
(JSC::B3::Procedure::deleteOrphans):

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

3 years agoSloppy mode: We don't properly hoist functions names "arguments" when we have a non...
bfulgham@apple.com [Fri, 10 Feb 2017 02:02:30 +0000 (02:02 +0000)]
Sloppy mode: We don't properly hoist functions names "arguments" when we have a non-simple parameter list
https://bugs.webkit.org/show_bug.cgi?id=167319
<rdar://problem/30149432>

Patch by Saam Barati <sbarati@apple.com> on 2017-02-09
Reviewed by Mark Lam.

JSTests:

* stress/sloppy-mode-hoist-arguments-function-non-simple-parameter-list.js: Added.
(assert):
(assert.arguments):
(assert.b):
(x.arguments):
(x.b):
(x):

Source/JavaScriptCore:

When hoisting a function inside sloppy mode, we were assuming all "var"s are inside
what we call the "var" SymbolTableEntry. This was almost true, execpt for "arguments",
which has sufficiently weird behavior. "arguments" can be visible to the default
parameter expressions inside a function, therefore can't go inside the "var"
SymbolTableEntry since the parameter SymbolTableEntry comes before the "var"
SymbolTableEntry in the scope chain.  Therefore, if we hoist a function named
"arguments", then we must also look for that variable inside the parameter scope
stack entry.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::hoistSloppyModeFunctionIfNecessary):

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

3 years agoUnreviewed, fix test for new .caller with native code caller semantics.
keith_miller@apple.com [Fri, 10 Feb 2017 01:55:30 +0000 (01:55 +0000)]
Unreviewed, fix test for new .caller with native code caller semantics.

* js/dom/function-dot-arguments-and-caller.html:

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

3 years agoFix max length check in ArrayPrototype.js' concatSlowPath().
bfulgham@apple.com [Fri, 10 Feb 2017 01:54:24 +0000 (01:54 +0000)]
Fix max length check in ArrayPrototype.js' concatSlowPath().
https://bugs.webkit.org/show_bug.cgi?id=167270
<rdar://problem/30128133>

Patch by Mark Lam <mark.lam@apple.com> on 2017-02-09
Reviewed by Filip Pizlo.

JSTests:

* stress/array-prototype-concat-of-long-spliced-arrays.js: Added.
* stress/array-prototype-concat-of-long-spliced-arrays2.js: Added.

Source/JavaScriptCore:

1. Fixed concatSlowPath() to ensure that the result array length does not exceed
   @MAX_ARRAY_INDEX.  The old code was checking against @MAX_SAFE_INTEGER in some
   cases, but this is overly permissive.

2. Changed concatSlowPath() to throw a RangeError instead of a TypeError to be
   consistent with the C++ runtime functions in JSArray.cpp.

3. Changed the RangeError message in concatSlowPath() and JSArray.cpp to "Length
   exceeded the maximum array length" when the error is that the result length
   exceeds MAX_ARRAY_INDEX.  We do this for 2 reasons:
   a. "Length exceeded the maximum array length" is more informative than
      "Invalid array length".
   b. We want to use the same string consistently for the same error.

   There are still 2 places in JSArray.cpp that still throws a RangeError with
   message "Invalid array length".  In those cases, the error is not necessarily
   due to the result length exceeding MAX_ARRAY_INDEX, but is due to attempting to
   set a length value that is not an integer that fits in MAX_ARRAY_INDEX e.g.
   an attempt to set a fractional length value.  Hence, "Invalid array length" is
   appropriate for those cases.

4. Fixed JSArray::appendMemcpy() to handle overflows when computing the result
   array length.

* builtins/ArrayPrototype.js:
(concatSlowPath):
* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
* bytecode/BytecodeIntrinsicRegistry.h:
* runtime/ArrayPrototype.cpp:
(JSC::concatAppendOne):
(JSC::arrayProtoPrivateFuncAppendMemcpy):
* runtime/JSArray.cpp:
(JSC::JSArray::appendMemcpy):
(JSC::JSArray::push):

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

3 years agoConstructed object's global object should be the global object of the constructor.
bfulgham@apple.com [Fri, 10 Feb 2017 01:39:13 +0000 (01:39 +0000)]
Constructed object's global object should be the global object of the constructor.
https://bugs.webkit.org/show_bug.cgi?id=167121
<rdar://problem/30054759>

Patch by Mark Lam <mark.lam@apple.com> on 2017-02-09
Reviewed by Filip Pizlo and Geoffrey Garen.

Source/JavaScriptCore:

The realm (i.e. globalObject) of any object should be the same as the constructor
that instantiated the object.  Changed PrototypeMap::createEmptyStructure() to
be passed the correct globalObject to use instead of assuming it's the same one
as the prototype object.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
* bytecode/InternalFunctionAllocationProfile.h:
(JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase):
* bytecode/ObjectAllocationProfile.h:
(JSC::ObjectAllocationProfile::initialize):
* runtime/FunctionRareData.cpp:
(JSC::FunctionRareData::initializeObjectAllocationProfile):
* runtime/FunctionRareData.h:
(JSC::FunctionRareData::createInternalFunctionAllocationStructureFromBase):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::createSubclassStructure):
* runtime/IteratorOperations.cpp:
(JSC::createIteratorResultObjectStructure):
* runtime/JSBoundFunction.cpp:
(JSC::getBoundFunctionStructure):
* runtime/JSFunction.cpp:
(JSC::JSFunction::allocateAndInitializeRareData):
(JSC::JSFunction::initializeRareData):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSProxy.cpp:
(JSC::JSProxy::setTarget):
* runtime/ObjectConstructor.h:
(JSC::constructEmptyObject):
* runtime/PrototypeMap.cpp:
(JSC::PrototypeMap::createEmptyStructure):
(JSC::PrototypeMap::emptyStructureForPrototypeFromBaseStructure):
(JSC::PrototypeMap::emptyObjectStructureForPrototype):
(JSC::PrototypeMap::clearEmptyObjectStructureForPrototype):
* runtime/PrototypeMap.h:

LayoutTests:

* http/tests/security/xssAuditor/regress-167121-expected.txt: Added.
* http/tests/security/xssAuditor/regress-167121.html: Added.

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

3 years agoDon't build libwebrtc.
achristensen@apple.com [Fri, 10 Feb 2017 01:33:43 +0000 (01:33 +0000)]
Don't build libwebrtc.

* Scripts/build-webkit:
Not ready yet.  It broke El Capitan and iOS.

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

3 years agoFix CMake build.
achristensen@apple.com [Fri, 10 Feb 2017 01:27:38 +0000 (01:27 +0000)]
Fix CMake build.

* PlatformMac.cmake:

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

3 years agoREGRESSION: LayoutTest http/tests/cache/disk-cache/disk-cache-remove-several-pending...
cdumez@apple.com [Fri, 10 Feb 2017 01:23:30 +0000 (01:23 +0000)]
REGRESSION: LayoutTest http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=161650

Reviewed by Alexey Proskuryakov.

Make sure we clear the memory cache before trigerring new loads as this
test is meant to cover the disk cache.

* http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes.html:
* platform/mac/TestExpectations:

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

3 years agoBuild libwebrtc on bots without using it yet
achristensen@apple.com [Fri, 10 Feb 2017 01:11:20 +0000 (01:11 +0000)]
Build libwebrtc on bots without using it yet
https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

* Scripts/build-webkit:

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

3 years agoMark inspector/model/remote-object-weak-collection.html as a flaky timeout.
ryanhaddad@apple.com [Fri, 10 Feb 2017 01:07:35 +0000 (01:07 +0000)]
Mark inspector/model/remote-object-weak-collection.html as a flaky timeout.

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoWe should not allow Function.caller to be used on native functions
bfulgham@apple.com [Fri, 10 Feb 2017 00:59:15 +0000 (00:59 +0000)]
We should not allow Function.caller to be used on native functions
https://bugs.webkit.org/show_bug.cgi?id=165628

Patch by Keith Miller <keith_miller@apple.com> on 2017-02-09
Reviewed by Mark Lam.

JSTests:

* stress/caller-native-code.js: Added.
(f):

Source/JavaScriptCore:

Also remove unneeded dynamic cast.

* runtime/JSFunction.cpp:
(JSC::RetrieveCallerFunctionFunctor::RetrieveCallerFunctionFunctor):
(JSC::JSFunction::callerGetter):

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

3 years agoMark pointer-lock/mouse-event-delivery.html as flaky.
ryanhaddad@apple.com [Fri, 10 Feb 2017 00:49:12 +0000 (00:49 +0000)]
Mark pointer-lock/mouse-event-delivery.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167965

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMark inspector/worker/resources-in-worker.html as flaky.
ryanhaddad@apple.com [Fri, 10 Feb 2017 00:46:02 +0000 (00:46 +0000)]
Mark inspector/worker/resources-in-worker.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168091

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoMark inspector/debugger/breakpoint-columns.html as a flaky timeout.
ryanhaddad@apple.com [Fri, 10 Feb 2017 00:42:00 +0000 (00:42 +0000)]
Mark inspector/debugger/breakpoint-columns.html as a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=168090

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoMark fast/backgrounds/hidpi-bitmap-background-on-subpixel-position.html as flaky.
ryanhaddad@apple.com [Fri, 10 Feb 2017 00:41:58 +0000 (00:41 +0000)]
Mark fast/backgrounds/hidpi-bitmap-background-on-subpixel-position.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167186

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoFix warnings in libwebrtc build
achristensen@apple.com [Fri, 10 Feb 2017 00:37:04 +0000 (00:37 +0000)]
Fix warnings in libwebrtc build
https://bugs.webkit.org/show_bug.cgi?id=168088

Reviewed by Youenn Fablet.

* Source/third_party/opus/src/src/opus_decoder.c:
Silence a warning.  Debug builds of opus can be slow.  No big deal.
* libwebrtc.xcodeproj/project.pbxproj:
More sdk files need ARC.

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

3 years agoTransition "WebKit Library Version" checks to SDK version checks.
beidson@apple.com [Fri, 10 Feb 2017 00:21:11 +0000 (00:21 +0000)]
Transition "WebKit Library Version" checks to SDK version checks.
<rdar://problem/30313696> and https://bugs.webkit.org/show_bug.cgi?id=168056

Reviewed by Geoffrey Garen.

Source/WebKit2:

When doing linkedOnOrAfter checks, relying solely on the WebKit library version number is error prone,
since apps may not link against WebKit directly and therefore the linked WebKit is unknown.

We should first prefer a version check on the SDK that the app was built with.

If that check fails, we can fallback to the linked WebKit library version number if it exists.

* Shared/Cocoa/CompletionHandlerCallChecker.mm:
(WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):

For each "linked-on-or-after" feature, include both the WebKit library version and SDK version:
* UIProcess/Cocoa/VersionChecks.h:
(WebKit::linkedOnOrAfter):
* UIProcess/Cocoa/VersionChecks.mm:
(WebKit::linkedOnOrAfter):
(WebKit::linkTimeVersion): Deleted.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::isNetworkCacheEnabled):

Source/WTF:

* wtf/spi/darwin/dyldSPI.h: Add entries for the iOS 10.3, macOS 10.11, and macOS 10.12.4 SDKs.

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

3 years agoDisconnect shadow children of root when detaching a frame
bfulgham@apple.com [Fri, 10 Feb 2017 00:10:14 +0000 (00:10 +0000)]
Disconnect shadow children of root when detaching a frame
https://bugs.webkit.org/show_bug.cgi?id=166851
<rdar://problem/29930443>

Reviewed by Andy Estes.

Source/WebCore:

If the root of the tree we are disconnecting has a shadow element, include it in the set of
things to disconnect.

Tests: fast/shadow-dom/shadow-at-root-during-disconnect.html

* dom/ContainerNodeAlgorithms.cpp:
(WebCore::disconnectSubframes):

LayoutTests:

* fast/shadow-dom/resources/start.html: Added.
* fast/shadow-dom/shadow-at-root-during-disconnect-expected.txt: Added.
* fast/shadow-dom/shadow-at-root-during-disconnect.html: Added.

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

3 years agoRename isAppleMacWebKit to isAppleCocoaWebKit
commit-queue@webkit.org [Thu, 9 Feb 2017 23:46:56 +0000 (23:46 +0000)]
Rename isAppleMacWebKit to isAppleCocoaWebKit
https://bugs.webkit.org/show_bug.cgi?id=168075

Patch by Alex Christensen <achristensen@webkit.org> on 2017-02-09
Reviewed by Geoffrey Garen.

It returns true for Mac and iOS.  "isAppleMacWebKit" is confusing and wrong.

* Scripts/build-api-tests:
* Scripts/build-dumprendertree:
* Scripts/build-jsc:
(buildMyProject):
* Scripts/build-layouttestrelay:
* Scripts/build-webkit:
* Scripts/build-webkittestrunner:
* Scripts/run-api-tests:
(isSupportedPlatform):
(runTest):
(listAllTests):
(prepareEnvironmentForRunningTestTool):
* Scripts/run-content-extension-tester:
* Scripts/run-javascriptcore-tests:
* Scripts/run-minibrowser:
* Scripts/show-pretty-diff:
* Scripts/webkitdirs.pm:
(determineBaseProductDir):
(determineArchitecture):
(determinePassedArchitecture):
(safariPath):
(builtDylibPathForName):
(checkFrameworks):
(isAppleWebKit):
(isAppleCocoaWebKit):
(determineNmPath):
(launcherName):
(wrapperPrefixIfNeeded):
(isCMakeBuild):
(mobileSafariBundle):
(debugSafari):
(runSafari):
(runMiniBrowser):
(debugMiniBrowser):
(runWebKitTestRunner):
(debugWebKitTestRunner):
(isAppleMacWebKit): Deleted.
* Scripts/webkitperl/FeatureList.pm:

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

3 years agoMark http/tests/contentextensions/async-xhr-onerror.html as flaky.
ryanhaddad@apple.com [Thu, 9 Feb 2017 23:39:58 +0000 (23:39 +0000)]
Mark http/tests/contentextensions/async-xhr-onerror.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168081

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMark http/tests/contentextensions/invalid-selector.html as flaky.
ryanhaddad@apple.com [Thu, 9 Feb 2017 23:36:48 +0000 (23:36 +0000)]
Mark http/tests/contentextensions/invalid-selector.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168082

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMark http/tests/security/credentials-iframes.html as failing on ios-simulator.
ryanhaddad@apple.com [Thu, 9 Feb 2017 23:28:46 +0000 (23:28 +0000)]
Mark http/tests/security/credentials-iframes.html as failing on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=167967

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoMark fast/css-grid-layout/grid-simplified-layout-positioned.html as flaky.
ryanhaddad@apple.com [Thu, 9 Feb 2017 23:18:43 +0000 (23:18 +0000)]
Mark fast/css-grid-layout/grid-simplified-layout-positioned.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167538

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoRevert r211991
achristensen@apple.com [Thu, 9 Feb 2017 22:06:31 +0000 (22:06 +0000)]
Revert r211991
https://bugs.webkit.org/show_bug.cgi?id=168062

* Scripts/build-webkit:
Not quite ready yet.

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

3 years agoBuild libwebrtc on bots without using it yet
achristensen@apple.com [Thu, 9 Feb 2017 21:48:21 +0000 (21:48 +0000)]
Build libwebrtc on bots without using it yet
​https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

* Scripts/build-webkit:
Build libwebrtc on Mac when we build ANGLE.

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

3 years agoUnreviewed, rolling out r211980 and r211987.
ryanhaddad@apple.com [Thu, 9 Feb 2017 21:47:14 +0000 (21:47 +0000)]
Unreviewed, rolling out r211980 and r211987.
https://bugs.webkit.org/show_bug.cgi?id=168072

Caused API test WebKit2.DuplicateCompletionHandlerCalls to
fail (Requested by ryanhaddad on #webkit).

Reverted changesets:

"Transition "WebKit Library Version" checks to SDK version
checks."
https://bugs.webkit.org/show_bug.cgi?id=168056
http://trac.webkit.org/changeset/211980

"Build fix for APPLE_INTERNAL_SDK builds after r211980."
http://trac.webkit.org/changeset/211987

Patch by Commit Queue <commit-queue@webkit.org> on 2017-02-09

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

3 years agoRemove unused WebThreadRunSync
ap@apple.com [Thu, 9 Feb 2017 21:34:19 +0000 (21:34 +0000)]
Remove unused WebThreadRunSync
https://bugs.webkit.org/show_bug.cgi?id=168024

Reviewed by Tim Horton.

Source/WebCore:

* platform/ios/wak/WebCoreThreadRun.cpp:
* platform/ios/wak/WebCoreThreadRun.h:
* platform/ios/wak/WebCoreThreadSystemInterface.cpp:
(InitWebCoreThreadSystemInterface):

Source/WTF:

* wtf/ios/WebCoreThread.cpp:
* wtf/ios/WebCoreThread.h:

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

3 years agoBuild libwebrtc on bots without using it yet
achristensen@apple.com [Thu, 9 Feb 2017 21:33:24 +0000 (21:33 +0000)]
Build libwebrtc on bots without using it yet
https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

.:

* Source/Makefile:

Source/ThirdParty:

* Makefile:

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

3 years agoBuild fix for APPLE_INTERNAL_SDK builds after r211980.
beidson@apple.com [Thu, 9 Feb 2017 21:32:31 +0000 (21:32 +0000)]
Build fix for APPLE_INTERNAL_SDK builds after r211980.

Unreviewed.

* wtf/spi/darwin/dyldSPI.h:

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

3 years agoUnreviewed, rolling out r211802.
ryanhaddad@apple.com [Thu, 9 Feb 2017 21:31:35 +0000 (21:31 +0000)]
Unreviewed, rolling out r211802.

This change caused fast/regions/inline-block-inside-anonymous-
overflow-with-covered-controls.html to be a flaky failure.

Reverted changeset:

"[Modern Media Controls] Improve handling of <video> with only
audio tracks"
https://bugs.webkit.org/show_bug.cgi?id=167836
http://trac.webkit.org/changeset/211802

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

3 years agoMark http/tests/media/track-in-band-hls-metadata-crash.html as a flaky timeout.
ryanhaddad@apple.com [Thu, 9 Feb 2017 21:20:44 +0000 (21:20 +0000)]
Mark http/tests/media/track-in-band-hls-metadata-crash.html as a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=167749

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoMark two scroll-snap tests as flaky.
ryanhaddad@apple.com [Thu, 9 Feb 2017 21:20:41 +0000 (21:20 +0000)]
Mark two scroll-snap tests as flaky.

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMark inspector/unit-tests/heap-snapshot.html as flaky.
ryanhaddad@apple.com [Thu, 9 Feb 2017 21:11:26 +0000 (21:11 +0000)]
Mark inspector/unit-tests/heap-snapshot.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168065

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMark two performance-api tests as flaky.
ryanhaddad@apple.com [Thu, 9 Feb 2017 21:11:24 +0000 (21:11 +0000)]
Mark two performance-api tests as flaky.

Unreviewed test gardening.

* TestExpectations:

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

3 years agoFix i386 libwebrtc build
achristensen@apple.com [Thu, 9 Feb 2017 21:10:15 +0000 (21:10 +0000)]
Fix i386 libwebrtc build
https://bugs.webkit.org/show_bug.cgi?id=168038

* Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
DataChannelInterface::buffered_amount returns a uint64_t, and we want a size_t.
If this overflows, then we've run out of memory and crashed a long time ago.

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

3 years agoTransition "WebKit Library Version" checks to SDK version checks.
beidson@apple.com [Thu, 9 Feb 2017 20:37:34 +0000 (20:37 +0000)]
Transition "WebKit Library Version" checks to SDK version checks.
<rdar://problem/30313696> and https://bugs.webkit.org/show_bug.cgi?id=168056

Reviewed by Geoffrey Garen.

Source/WebKit2:

Library version linkedOnOrAfter checks are error prone since apps may not link directly to WebKit.

We always know what version of the SDK an app was built with, so we should use SDK version checks
whenever possible.

* Shared/Cocoa/CompletionHandlerCallChecker.mm:
(WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):

Add SDKVersion form of the linkedOnOrAfter check, and transition over the current Library Version checks:
* UIProcess/Cocoa/VersionChecks.h:
* UIProcess/Cocoa/VersionChecks.mm:
(WebKit::linkedOnOrAfter):

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::isNetworkCacheEnabled):

Source/WTF:

* wtf/spi/darwin/dyldSPI.h: Add entries for the iOS 10.3, macOS 10.11, and macOS 10.12.4 SDKs.

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

3 years agoDocument::settings() should return a const Settings&.
akling@apple.com [Thu, 9 Feb 2017 20:32:27 +0000 (20:32 +0000)]
Document::settings() should return a const Settings&.
<https://webkit.org/b/168061>

Reviewed by Geoffrey Garen.

- Make Document::settings() return a const reference.
- Added Document::mutableSettings() for all your non-const needs.
- Fixed up settings generator to produce const getters.
- Simplify a few settings() call sites that exposed themselves.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::shouldDiscloseApplePayCapability):
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::canCallGetUserMedia):
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::appendSources):
* css/CSSFontSelector.cpp:
(WebCore::resolveGenericFamily):
* css/StyleResolver.h:
(WebCore::StyleResolver::settings):
* dom/Document.h:
(WebCore::Document::settings):
(WebCore::Document::mutableSettings):
* html/FTPDirectoryDocument.cpp:
(WebCore::createTemplateDocumentData):
* html/HTMLCanvasElement.cpp:
(WebCore::shouldEnableWebGL):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::menuListDefaultEventHandler):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::updateDuringParsing):
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::allowContentSecurityPolicySourceStarToMatchAnyProtocol):
* page/make_settings.pl:
(printGetterAndSetter):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::toggleSimpleLineLayout):

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

3 years agoMake passing PlatformAudioData in audioSamplesAvaliable const-correct.
jer.noble@apple.com [Thu, 9 Feb 2017 20:28:44 +0000 (20:28 +0000)]
Make passing PlatformAudioData in audioSamplesAvaliable const-correct.
https://bugs.webkit.org/show_bug.cgi?id=168051

Reviewed by Eric Carlson.

Modify all the functions which take a (conceptually) read-only audio buffer const-correct.

Drive-by fix: AudioSampleBufferList::copyFrom() set a ivar pointer to the passed in
AudioBufferList. Ensure that the ivar is reset when copyFrom() returns by using a
SetForScope.

* platform/audio/mac/AudioSampleBufferList.cpp:
(WebCore::AudioSampleBufferList::copyFrom):
* platform/audio/mac/AudioSampleBufferList.h:
* platform/audio/mac/AudioSampleDataSource.cpp:
(WebCore::AudioSampleDataSource::pushSamplesInternal):
(WebCore::AudioSampleDataSource::pushSamples):
* platform/audio/mac/AudioSampleDataSource.h:
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::audioSamplesAvailable):
* platform/mediastream/RealtimeMediaSource.h:
(WebCore::RealtimeMediaSource::Observer::audioSamplesAvailable):
* platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
(WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):
* platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:
* platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
(WebCore::RealtimeOutgoingAudioSource::audioSamplesAvailable):
* platform/mediastream/mac/RealtimeOutgoingAudioSource.h:

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

3 years agoFix some logging statements in MediaPlayerPrivateMediaStreamAVFObjC
jer.noble@apple.com [Thu, 9 Feb 2017 20:22:31 +0000 (20:22 +0000)]
Fix some logging statements in MediaPlayerPrivateMediaStreamAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=168063

Reviewed by Eric Carlson.

Make the format string match the types passed in (i.e., floats, not strings).

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

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

3 years agoWeb Inspector: changing dock side from windowed to bottom should cause split console...
commit-queue@webkit.org [Thu, 9 Feb 2017 20:12:14 +0000 (20:12 +0000)]
Web Inspector: changing dock side from windowed to bottom should cause split console to collapse on Timeline and Network tabs
https://bugs.webkit.org/show_bug.cgi?id=167841

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-02-09
Reviewed by Matt Baker.

* UserInterface/Base/Main.js:
(WebInspector.updateDockedState):

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

3 years agoSkip media/modern-media-controls/media-controller/media-controller-ios-only-enable...
ryanhaddad@apple.com [Thu, 9 Feb 2017 20:11:28 +0000 (20:11 +0000)]
Skip media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle.html.

Unreviewed test gardening.

This test relies on touch events.

* platform/ios-simulator/TestExpectations:

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

3 years ago[MediaStream Mac] Handle NULL m_sampleBufferDisplayLayer
eric.carlson@apple.com [Thu, 9 Feb 2017 20:10:26 +0000 (20:10 +0000)]
[MediaStream Mac] Handle NULL m_sampleBufferDisplayLayer
https://bugs.webkit.org/show_bug.cgi?id=168060

Reviewed by Jer Noble.

No new tests, this avoids an occasional crash on the bots.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::layerStatusDidChange): Don't assume
m_sampleBufferDisplayLayer is valid.

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

3 years agoWeb Inspector: Option+hover on -webkit-transform in Styles sidebar underlines only...
commit-queue@webkit.org [Thu, 9 Feb 2017 19:29:05 +0000 (19:29 +0000)]
Web Inspector: Option+hover on -webkit-transform in Styles sidebar underlines only half the property
https://bugs.webkit.org/show_bug.cgi?id=167949

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-02-09
Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
Attempt to merge tokens (specifically the `text` and `start` values) if the either the
previous or next token is of the type "meta".

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

3 years agoFix iOS libwebrtc build after r211960
achristensen@apple.com [Thu, 9 Feb 2017 19:23:40 +0000 (19:23 +0000)]
Fix iOS libwebrtc build after r211960
https://bugs.webkit.org/show_bug.cgi?id=168038

* Source/webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.h:
GlContextType declaration needs to be platform specific here like it is in RTCOpenGLDefines.h

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

3 years agoObject.getPrototypeOf(NodeFilter) should be Function.prototype, not Object.prototype
cdumez@apple.com [Thu, 9 Feb 2017 18:54:26 +0000 (18:54 +0000)]
Object.getPrototypeOf(NodeFilter) should be Function.prototype, not Object.prototype
https://bugs.webkit.org/show_bug.cgi?id=167964

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline web platform test now that more checks are passing.

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

Source/WebCore:

Object.getPrototypeOf(NodeFilter) should be Function.prototype, not Object.prototype
after the following WebIDL spec change:
- https://github.com/heycam/webidl/issues/96

This aligns our behavior with other browsers as the spec has been updated to match
the majority.

No new tests, rebaselined existing test.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
(WebCore::JSTestCallbackInterfaceConstructor::prototypeForStructure):

LayoutTests:

Rebaseline existing tests now that output differs a bit.

* http/tests/security/cross-frame-access-put-expected.txt:
* platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:

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

3 years agoUnreviewed, fix module test that has a meaningless onload handler
utatane.tea@gmail.com [Thu, 9 Feb 2017 18:15:56 +0000 (18:15 +0000)]
Unreviewed, fix module test that has a meaningless onload handler
https://bugs.webkit.org/show_bug.cgi?id=161291

* http/tests/misc/module-absolute-url.html:

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

3 years ago[GTK] scroll with transparent background not repainted after scrollY >= 32768
magomez@igalia.com [Thu, 9 Feb 2017 18:11:22 +0000 (18:11 +0000)]
[GTK] scroll with transparent background not repainted after scrollY >= 32768
https://bugs.webkit.org/show_bug.cgi?id=154283

Reviewed by Carlos Garcia Campos.

Due to a limitation of the pixman backend, which uses 16 bits to hold signed integers, cairo is
not able to draw anything when using transformation matrices with values bigger than 32768. When
drawing patterns into large pages, the matrices values can overflow those 16 bits, so cairo doesn't
draw anything in, which causes the reported transparent backgrounds.

The patch modifies the transformation matrices both from the current context and the pattern we
are painting, to avoid them to hold values that cannot stored in 16 bits.

There's still the possibility that this happens, but it would require using a pattern with a size
bigger than 32768.

Based on a previous patch by Gwang Yoon Hwang  <yoon@igalia.com>.

No new tests.

* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::drawPatternToCairoContext):

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

3 years agoUnreviewed build fix after r211965.
bfulgham@apple.com [Thu, 9 Feb 2017 18:10:42 +0000 (18:10 +0000)]
Unreviewed build fix after r211965.

* dom/Document.cpp:
(WebCore::Document::adoptNode): inDocument -> isConnected

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

3 years agoAdopting a child node of a script element can run script
bfulgham@apple.com [Thu, 9 Feb 2017 17:59:45 +0000 (17:59 +0000)]
Adopting a child node of a script element can run script
https://bugs.webkit.org/show_bug.cgi?id=167318

Patch by Ryosuke Niwa <rniwa@webkit.org> on 2017-02-09
Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by ScriptElement::childrenChanged indiscriminately running the script.
Do this only if some node has been inserted as spec'ed:

https://html.spec.whatwg.org/multipage/scripting.html#script-processing-model
"The script element is connected and a node or document fragment is inserted into
the script element, after any script elements inserted at that time."

Split NonContentsChildChanged into NonContentsChildInserted and NonContentsChildRemoved to disambiguate
non-contents child such as text and element being removed or inserted. New behavior matches that of
Gecko and Chrome as well as the latest HTML5 specification.

Also deploy NoEventDispatchAssertion in more places. Unfortunately, this results in some DOM trees
internal to WebKit to be mutated while there is NoEventDispatchAssertion in the stack. Added a new RAII
object "EventAllowedScope" to temporarily disable this assertion within such a tree. CachedSVGFont's
ensureCustomFontData used to completely disable this assertion but we no longer have to do this either.

To clarify the new semantics, renamed isEventDispatchForbidden to isEventAllowedInMainThread with
the negated boolean value, and added a new variant isEventDispatchAllowedInSubtree, which checks
isEventDispatchForbidden() is true or if the node was one of an internal DOM node or its descendent
held by EventAllowedScope.

Inspired by https://chromium.googlesource.com/chromium/src/+/604e798ec6ee30f44d57a5c4a44ce3dab3a871ed

Tests: fast/html/script-must-not-run-when-child-is-adopted.html
       fast/html/script-must-not-run-when-child-is-removed.html

* dom/CharacterData.cpp:
(WebCore::CharacterData::notifyParentAfterChange): Added NoEventDispatchAssertion.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBefore): Added NoEventDispatchAssertion around TreeScope's adoptIfNeeded
and insertBeforeCommon as done elsewhere.
(WebCore::ContainerNode::appendChildCommon): Added NoEventDispatchAssertion.
(WebCore::ContainerNode::changeForChildInsertion): Use NonContentsChildInserted here.
(WebCore::ContainerNode::notifyChildRemoved): Added NoEventDispatchAssertion.
(WebCore::ContainerNode::replaceChild): Moved adoptIfNeeded into NoEventDispatchAssertion.
(WebCore::ContainerNode::removeChild): Added NoEventDispatchAssertion.
(WebCore::ContainerNode::parserRemoveChild): Added NoEventDispatchAssertion.
(WebCore::ContainerNode::removeChildren): Call childrenChanged in NoEventDispatchAssertion.
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck): Moved adoptIfNeeded into
NoEventDispatchAssertion.
(WebCore::dispatchChildInsertionEvents): Check the forbidden-ness more precisely.
(WebCore::dispatchChildRemovalEvents): Ditto.
* dom/ContainerNode.h:
(WebCore::ContainerNode::ChildChange::isInsertion): Added.
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::notifyChildNodeInserted): Check the forbidden-ness more precisely. Here, we check against
insertionPoint since EventAllowedScope checks against the root node.
* dom/Document.cpp:
(WebCore::Document::adoptNode): Assert the node to be adopted has not been inserted back, or else
remove() had resulted in an exception before calling TreeScope::adoptIfNeeded.
* dom/Element.cpp:
(WebCore::Element::childrenChanged):
* dom/NoEventDispatchAssertion.h:
(WebCore::NoEventDispatchAssertion::isEventDispatchForbidden): Added a new variant that takes a node.
If this node is a descendent of a node "marked as safe" by EventAllowedScope, then we don't consider
the event dispatch to be forbidden.
(WebCore::NoEventDispatchAssertion::dropTemporarily): Deleted.
(WebCore::NoEventDispatchAssertion::restoreDropped): Deleted.
(WebCore::NoEventDispatchAssertion::EventAllowedScope): Added. A RAII object which marks descendants of
a given node as "safe" for the purpose of checking isEventDispatchForbidden.
(WebCore::NoEventDispatchAssertion::EventAllowedScope::EventAllowedScope): Added. There can be a chain
of EventAllowedScope objects in the stack. s_currentScope points to the most recently instantiated
RAII object, and each instance remembers prior instance.
(WebCore::NoEventDispatchAssertion::EventAllowedScope::~EventAllowedScope): Added.
(WebCore::NoEventDispatchAssertion::EventAllowedScope::isAllowedNode): Added. Returns true if the given
node is a descendent of any node held by instances of EventAllowedScope.
(WebCore::NoEventDispatchAssertion::EventAllowedScope::isAllowedNodeInternal): Added. A helper function
for isAllowedNode.
* dom/Node.cpp:
(WebCore::Node::dispatchSubtreeModifiedEvent): Check the forbidden-ness more precisely.
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::childrenChanged): Only prepare the script if we've inserted nodes.
(WebCore::ScriptElement::executeClassicScript): Assert isEventDispatchForbidden is false since running
arbitrary author scripts can, indeed, result dispatch any events.
* dom/ScriptElement.h:
* html/HTMLElement.cpp:
(WebCore::textToFragment): Made this a static local function and not return an exception since there
is no way appendChild called in this function can throw an exception.
(WebCore::HTMLElement::setInnerText): Create EventAllowedScope for the fragment. It's called called by
HTMLTextAreaElement's childrenChanged to update its UA shadow tree, and it's dispatching as event on
a new fragment can't execute arbitrary scripts since it has never been exposed to author scripts.
Because of the precise-ness of this check, this does not disable the assertion for "this" element.
HTMLTextFormControlElement::setInnerTextValue explicitly creates another EventAllowedScope to mark
the shadow tree into which the fragment is inserted safe.
(WebCore::HTMLElement::setOuterText):
* html/HTMLElement.h:
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::childrenChanged):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setInnerTextValue): See above (setInnerText).
* html/track/VTTCue.cpp:
(WebCore::VTTCue::createCueRenderingTree): Create EventAllowedScope for the cloned fragment here since
the VTT tree is never exposed to author scripts.
(WebCore::VTTCue::updateDisplayTree): Ditto.
* loader/cache/CachedSVGFont.cpp:
(WebCore::CachedSVGFont::ensureCustomFontData): Use EventAllowedScope to disable assertions only on
the new SVG document we just created instead of disabling for all DOM trees.
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::childrenChanged):

LayoutTests:

Added regression tests for adopting or removing a child node of a script element.
The script must not run when nodes are adopted or removed.

* fast/html/script-must-not-run-when-child-is-adopted-expected.txt: Added.
* fast/html/script-must-not-run-when-child-is-adopted.html: Added.
* fast/html/script-must-not-run-when-child-is-removed-expected.txt: Added.
* fast/html/script-must-not-run-when-child-is-removed.html: Added.

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

3 years agoDocument should always have a Settings.
akling@apple.com [Thu, 9 Feb 2017 17:47:33 +0000 (17:47 +0000)]
Document should always have a Settings.
<https://webkit.org/b/120172>

Reviewed by Antti Koivisto.

Since a Document can't move between Frames, and it's either frameless
or partnered with a Frame provided at construction time, we know that
it will never need to switch between different Settings objects either.

Give Document a Ref<Settings> that contains either the Frame's Settings
or a default-constructed Settings object if frameless.
Document::settings() is promoted to a reference getter.

The bulk of this patch is removing now-unnecessary null checks.

* Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
(WebCore::WebKitMediaKeySession::mediaKeysStorageDirectory):
* Modules/plugins/PluginReplacement.h:
(WebCore::ReplacementPlugin::isEnabledBySettings):
* Modules/plugins/QuickTimePluginReplacement.h:
* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::QuickTimePluginReplacement::isEnabledBySettings):
* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::YouTubePluginReplacement::isEnabledBySettings):
* Modules/plugins/YouTubePluginReplacement.h:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::constructCommon):
* bindings/js/CachedScriptFetcher.cpp:
(WebCore::CachedScriptFetcher::requestScriptWithCache):
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::appendSources):
(WebCore::CSSFontFace::webFontsShouldAlwaysFallBack):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::fallbackFontCount):
(WebCore::CSSFontSelector::fallbackFontAt):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertResize):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueFontFamily):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::defaultStyleForElement):
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::checkForGenericFamilyChange):
(WebCore::StyleResolver::initializeFontStyle):
* css/StyleResolver.h:
(WebCore::StyleResolver::settings):
(WebCore::StyleResolver::documentSettings): Deleted.
* css/parser/CSSParser.cpp:
(WebCore::CSSParserContext::CSSParserContext):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setReadyState):
(WebCore::Document::setVisualUpdatesAllowed):
(WebCore::Document::defaultCharsetForLegacyBindings):
(WebCore::Document::recalcStyle):
(WebCore::Document::implicitClose):
(WebCore::Document::minimumLayoutDelay):
(WebCore::Document::setDomain):
(WebCore::Document::audioPlaybackRequiresUserGesture):
(WebCore::Document::videoPlaybackRequiresUserGesture):
(WebCore::Document::storageBlockingStateDidChange):
(WebCore::Document::isTelephoneNumberParsingEnabled):
(WebCore::Document::initSecurityContext):
(WebCore::Document::initDNSPrefetch):
(WebCore::Document::getCachedLocale):
(WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox):
(WebCore::Document::settings): Deleted.
* dom/Document.h:
(WebCore::Document::settings):
* dom/Element.cpp:
(WebCore::subpixelMetricsEnabled):
* dom/ExtensionStyleSheets.cpp:
(WebCore::ExtensionStyleSheets::pageUserSheet):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::dispatchErrorEvent):
* dom/ScriptableDocumentParser.cpp:
(WebCore::ScriptableDocumentParser::ScriptableDocumentParser):
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::requestAnimationFrameEnabled):
* dom/make_names.pl:
(printConstructorInterior):
* editing/Editor.cpp:
* editing/markup.cpp:
(WebCore::createMarkupInternal):
* html/FTPDirectoryDocument.cpp:
(WebCore::createTemplateDocumentData):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::setActive):
(WebCore::HTMLAnchorElement::sendPings):
(WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType):
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::canEmbedJava):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext2d):
(WebCore::shouldEnableWebGL):
(WebCore::HTMLCanvasElement::shouldAccelerate):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::submitImplicitly):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::setLocation):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::updateImageControls):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::sourceURI):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setupDateTimeChooserParameters):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::mediaPlayerMediaKeysStorageDirectory):
(WebCore::HTMLMediaElement::mediaPlayerAcceleratedCompositingEnabled):
(WebCore::HTMLMediaElement::enterFullscreen):
(WebCore::HTMLMediaElement::exitFullscreen):
(WebCore::HTMLMediaElement::mediaPlayerNeedsSiteSpecificHacks):
(WebCore::HTMLMediaElement::mediaPlayerNetworkInterfaceName):
(WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor):
(WebCore::HTMLMediaElement::doesHaveAttribute):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::HTMLVideoElement):
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::wirelessVideoPlaybackDisabled):
(WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
(WebCore::MediaElementSession::allowsAutomaticMediaDataLoading):
(WebCore::MediaElementSession::allowsPictureInPicture):
(WebCore::MediaElementSession::maximumMediaSourceBufferSize):
* html/parser/HTMLParserOptions.cpp:
(WebCore::HTMLParserOptions::HTMLParserOptions):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLink):
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::allowContentSecurityPolicySourceStarToMatchAnyProtocol):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::toggleSimpleLineLayout):
* style/StyleFontSizeFunctions.cpp:
(WebCore::Style::computedFontSizeFromSpecifiedSize):
(WebCore::Style::fontSizeForKeyword):
(WebCore::Style::legacyFontSizeForPixelSize):
* style/StyleScope.cpp:
(WebCore::Style::Scope::collectActiveStyleSheets):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::usesDashboardBackwardCompatibilityMode):

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

3 years agoUse all cacheable speculatively loaded responses
antti@apple.com [Thu, 9 Feb 2017 17:36:58 +0000 (17:36 +0000)]
Use all cacheable speculatively loaded responses
https://bugs.webkit.org/show_bug.cgi?id=168052

Reviewed by Andreas Kling.

Source/WebCore:

* platform/network/CacheValidation.cpp:
(WebCore::isStatusCodeCacheableByDefault):
(WebCore::isStatusCodePotentiallyCacheable):

Moved here from WebKit2.

* platform/network/CacheValidation.h:

Source/WebKit2:

We currently only allow 200 responses. There is no reason not to use speculative responses
that have other cacheable status codes. This is helpful for 204s and 404s.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeStoreDecision):
(WebKit::NetworkCache::isStatusCodeCacheableByDefault): Deleted.
(WebKit::NetworkCache::isStatusCodePotentiallyCacheable): Deleted.

    Move to CacheValidation.h/cpp

* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):

    Allow all cacheable-by-default responses.

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

3 years ago[MediaStream] Remove legacy Navigator.webkitGetUserMedia
eric.carlson@apple.com [Thu, 9 Feb 2017 17:29:58 +0000 (17:29 +0000)]
[MediaStream] Remove legacy Navigator.webkitGetUserMedia
https://bugs.webkit.org/show_bug.cgi?id=168016
Source/WebCore:

Reviewed by Youenn Fablet.

No new tests, existing tests updated.

* WebCore.xcodeproj/project.pbxproj: NavigatorUserMedia.
* DerivedSources.make: Ditto.
* CMakeLists.txt: Ditto.
* Modules/mediastream/NavigatorUserMedia.idl: Removed.
* Modules/mediastream/NavigatorUserMedia.js: Removed.
* WebCore.xcodeproj/project.pbxproj:
* page/Navigator.idl: Add some whitespace to force derived sources to be rebuild correctly.

Source/WebInspectorUI:

Reviewed by Youenn Fablet.

* UserInterface/Models/NativeFunctionParameters.js:

LayoutTests:

<rdar://problem/30431544>

Reviewed by Youenn Fablet.

Update valid tests to use navigator.mediaDevices.getUserMedia. Remove tests
specific to Navigator.webkitGetUserMedia.

* fast/mediastream/RTCPeerConnection-AddRemoveStream.html:
* fast/mediastream/argument-types.html: Removed.
* fast/mediastream/delayed-permission-allowed.html:
* fast/mediastream/delayed-permission-denied.html:
* fast/mediastream/enabled-expected.txt:
* fast/mediastream/error.html:
* fast/mediastream/getusermedia.html: Removed.
* fast/mediastream/script-tests/argument-types.js: Removed.
* fast/mediastream/script-tests/enabled.js:
(hasGetUserMediaProperty):
* fast/mediastream/success.html:
* fast/mediastream/webkitGetUserMedia-shadowing-then.html: Removed.
* http/tests/media/media-stream/disconnected-frame-already-expected.txt:
* http/tests/media/media-stream/disconnected-frame-already.html:
* http/tests/media/media-stream/disconnected-frame-permission-denied.html:
* http/tests/media/media-stream/disconnected-frame.html:

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

3 years ago[Modern Media Controls] Tapping the skip back button on iOS inline media controls...
commit-queue@webkit.org [Thu, 9 Feb 2017 17:13:12 +0000 (17:13 +0000)]
[Modern Media Controls] Tapping the skip back button on iOS inline media controls make the controls disappear
https://bugs.webkit.org/show_bug.cgi?id=168049
<rdar://problem/30442660>

Patch by Antoine Quint <graouts@apple.com> on 2017-02-09
Reviewed by Eric Carlson.

Source/WebCore:

Calling elementAtPoint() on the Document will not return an element in the ShadowRoot,
we need to call it on the ShadowRoot. So we now iterate over ancestors of the controls
bar to find the ShadowRoot, if any, and check whether the tapped element is contained
within the controls bar. We only fade the controls bar out if the tapped element is
outside of the controls bar hierarchy.

Test: media/modern-media-controls/media-controller/media-controller-ios-do-not-hide-controls-when-tapping-button.html

* Modules/modern-media-controls/controls/controls-bar.js:
(ControlsBar.prototype.gestureRecognizerStateDidChange):

LayoutTests:

Add a new iOS-specific test that checks that tapping a button does not automatically dismisses the controls bar.

* media/modern-media-controls/media-controller/media-controller-ios-do-not-hide-controls-when-tapping-button-expected.txt: Added.
* media/modern-media-controls/media-controller/media-controller-ios-do-not-hide-controls-when-tapping-button.html: Added.
* platform/mac/TestExpectations:

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

3 years agoFix i386 libwebrtc build
achristensen@apple.com [Thu, 9 Feb 2017 16:37:17 +0000 (16:37 +0000)]
Fix i386 libwebrtc build
https://bugs.webkit.org/show_bug.cgi?id=168038

Reviewed by Geoffrey Garen.

Unfortunately, 32-bit ObjC can't use all the coolest new features of ObjC.
Fortunately, we can move things around a bit to become valid old ObjC.

* Source/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCFileLogger.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCI420Shader.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCMediaConstraints.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCMediaSource+Private.h:
* Source/webrtc/sdk/objc/Framework/Classes/RTCMediaSource.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCMediaStream.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCMediaStreamTrack+Private.h:
* Source/webrtc/sdk/objc/Framework/Classes/RTCMediaStreamTrack.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.h:
* Source/webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCRtpReceiver.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCRtpSender.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCShader.h:
* Source/webrtc/sdk/objc/Framework/Classes/RTCVideoFrame.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCVideoRendererAdapter.h:
* Source/webrtc/sdk/objc/Framework/Classes/RTCVideoRendererAdapter.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCVideoSource.mm:
* Source/webrtc/sdk/objc/Framework/Classes/RTCVideoTrack.mm:
* Source/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSource.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioTrack.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCConfiguration.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFileLogger.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCIceCandidate.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCIceServer.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaConstraints.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaSource.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaStream.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpParameters.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpReceiver.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpSender.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCSessionDescription.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h:
* Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoTrack.h:
Make code compile for i386.
* libwebrtc.xcodeproj/project.pbxproj:
Added missing headers so Xcode can search them.

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

3 years agoConfigure MockRealtimeAudioSourceMac to generate stereo audio
jer.noble@apple.com [Thu, 9 Feb 2017 16:33:06 +0000 (16:33 +0000)]
Configure MockRealtimeAudioSourceMac to generate stereo audio
https://bugs.webkit.org/show_bug.cgi?id=168027

Reviewed by Eric Carlson.

Update MockRealtimeAudioSourceMac to generate stereo audio.

First, because the pattern of creating a AudioBufferList structure (with all it's quirks and
weird requirements) was repeated multiple places, add a new wrapper around ABL called
WebAudioBufferList which takes care of correctly initializing the ABL structure and manages
the lifetime of its data members.

* WebCore.xcodeproj/project.pbxproj:
* platform/audio/PlatformAudioData.h: Added.
(WebCore::PlatformAudioData::kind):
* platform/audio/WebAudioBufferList.cpp: Added.
(WebCore::WebAudioBufferList::WebAudioBufferList):
(WebCore::WebAudioBufferList::buffers):
(WebCore::WebAudioBufferList::bufferCount):
(WebCore::WebAudioBufferList::buffer):
* platform/audio/WebAudioBufferList.h: Added.
(WebCore::WebAudioBufferList::list):
(WebCore::WebAudioBufferList::operator AudioBufferList&):
(WebCore::WebAudioBufferList::kind):
(isType):

Then update existing code to work in terms of WebAudioBufferList:

* platform/audio/mac/AudioSampleBufferList.cpp:
(WebCore::AudioSampleBufferList::AudioSampleBufferList):
(WebCore::AudioSampleBufferList::mixFrom):
(WebCore::AudioSampleBufferList::copyFrom):
(WebCore::AudioSampleBufferList::copyTo):
(WebCore::AudioSampleBufferList::reset):
(WebCore::AudioSampleBufferList::configureBufferListForStream): Deleted.
* platform/audio/mac/AudioSampleBufferList.h:
(WebCore::AudioSampleBufferList::bufferList):
* platform/audio/mac/AudioSampleDataSource.cpp:
(WebCore::AudioSampleDataSource::pushSamples):
* platform/audio/mac/AudioSampleDataSource.h:
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::audioSamplesAvailable):
* platform/mediastream/RealtimeMediaSource.h:
(WebCore::RealtimeMediaSource::Observer::audioSamplesAvailable):
* platform/mediastream/mac/AVAudioCaptureSource.h:
* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
* platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
(WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):
* platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:
* platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
(WebCore::RealtimeOutgoingAudioSource::audioSamplesAvailable):
* platform/mediastream/mac/RealtimeOutgoingAudioSource.h:

Finally, actually update MockRealtimeAudioSource to emit stereo samples. Importantly, set
the correct values for the m_streamFormat; mBytesPerFrame and mBytesPerPacket are not
multiplied by the channelCount. When generating audio, write to both channels of data.

* platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
* platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
(WebCore::MockRealtimeAudioSourceMac::emitSampleBuffers):
(WebCore::MockRealtimeAudioSourceMac::reconfigure):
(WebCore::MockRealtimeAudioSourceMac::render):

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

3 years agoNullptr crash under styleForFirstLetter
antti@apple.com [Thu, 9 Feb 2017 16:32:13 +0000 (16:32 +0000)]
Nullptr crash under styleForFirstLetter
https://bugs.webkit.org/show_bug.cgi?id=167756
rdar://problem/30029354

Reviewed by Zalan Bujtas.

Don't know how we get here. Paper over the crash.

* rendering/RenderBlock.cpp:
(WebCore::styleForFirstLetter):

    Use parent first line style if we compute null style for the first letter renderer.

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

3 years agoUnreviewed GTK+ gardening. Skip tests that require UIScriptController::zoomToScale.
carlosgc@webkit.org [Thu, 9 Feb 2017 16:22:13 +0000 (16:22 +0000)]
Unreviewed GTK+ gardening. Skip tests that require UIScriptController::zoomToScale.

* platform/gtk/TestExpectations:

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

3 years ago[Modern Media Controls] Playing an <audio> element on iOS makes the controls disappear
graouts@webkit.org [Thu, 9 Feb 2017 16:20:18 +0000 (16:20 +0000)]
[Modern Media Controls] Playing an <audio> element on iOS makes the controls disappear
https://bugs.webkit.org/show_bug.cgi?id=168047
<rdar://problem/30441939>

Reviewed by Eric Carlson.

Source/WebCore:

The controls bar auto-hide behavior is disabled for <audio> elements, but on iOS we have
a TapGestureRecognizer to identify when controls are tapped to toggle controls visibility.
This gesture recognizer would be on at all times, but it should only be enabled when
fadesToIdle is set to true.

Test: media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle.html

* Modules/modern-media-controls/controls/controls-bar.js:
(ControlsBar.prototype.set fadesWhileIdle):

LayoutTests:

Add a new iOS-specific test that checks the TapGestureRecognizer is only enabled when
fadesToIdle is true.

* media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle-expected.txt: Added.
* media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle.html: Added.
* platform/mac/TestExpectations:

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

3 years agoImprove W3C importer command line options
commit-queue@webkit.org [Thu, 9 Feb 2017 16:03:05 +0000 (16:03 +0000)]
Improve W3C importer command line options
https://bugs.webkit.org/show_bug.cgi?id=167448

Patch by Youenn Fablet <youenn@apple.com> on 2017-02-09
Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

* resources/TestRepositories: Skipped module generation and gitignore generation for the moment.

Tools:

Making the list of test paths to import the main arguments of the script.
Allow passing the source directory to import as a -s option.
Adding a warning when given test paths are skipped by default in ImportExpectations.

Making link conversion off by default when importing from a specific directory since this script is mostly used with web-platform-tests.
Link conversion rules do not change when imported tests are downloaded by the script.

* Scripts/webkitpy/w3c/test_importer.py:
(main):
(parse_args):
(TestImporter.__init__):
(TestImporter.do_import):
(TestImporter):
(TestImporter.check_imported_expectations):

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

3 years ago[Modern Media Controls] <audio> element does not show any background on iOS
commit-queue@webkit.org [Thu, 9 Feb 2017 15:59:22 +0000 (15:59 +0000)]
[Modern Media Controls] <audio> element does not show any background on iOS
https://bugs.webkit.org/show_bug.cgi?id=168046
<rdar://problem/30441872>

Patch by Antoine Quint <graouts@apple.com> on 2017-02-09
Reviewed by Eric Carlson.

Source/WebCore:

Use a solid gray background for <audio> elements on iOS.

Test: media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-audio-background.html

* Modules/modern-media-controls/controls/ios-inline-media-controls.css:
(:host(audio) .media-controls.ios.inline > .controls-bar:before):

LayoutTests:

Add an iOS-specific test that checks that <audio> elements have a solid gray background.

* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-audio-background-expected.txt: Added.
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-audio-background.html: Added.
* platform/mac/TestExpectations:

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

3 years ago[Modern Media Controls] Controls fail to instantiate in an XHTML document
commit-queue@webkit.org [Thu, 9 Feb 2017 15:13:29 +0000 (15:13 +0000)]
[Modern Media Controls] Controls fail to instantiate in an XHTML document
https://bugs.webkit.org/show_bug.cgi?id=168045
<rdar://problem/30290095>

Patch by Antoine Quint <graouts@apple.com> on 2017-02-09
Reviewed by Eric Carlson.

Source/WebCore:

Always use valid HTML and XHTML strings when creating HTML elements.

Test: media/modern-media-controls/media-controller/media-controller-in-xhtml.xhtml

* Modules/modern-media-controls/controls/button.js:
(Button):
* Modules/modern-media-controls/controls/buttons-container.js:
* Modules/modern-media-controls/controls/controls-bar.js:
* Modules/modern-media-controls/controls/macos-inline-media-controls.js:
* Modules/modern-media-controls/controls/media-controls.js:
* Modules/modern-media-controls/controls/slider.js:
* Modules/modern-media-controls/controls/status-label.js:
* Modules/modern-media-controls/controls/time-control.js:
* Modules/modern-media-controls/controls/time-label.js:
* Modules/modern-media-controls/controls/tracks-panel.js:

LayoutTests:

Add a new test to check that controls are created correctly when the media element
is hosted in an XHTML document.

* media/modern-media-controls/media-controller/media-controller-in-xhtml-expected.txt: Added.
* media/modern-media-controls/media-controller/media-controller-in-xhtml.xhtml: Added.

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

3 years agoUnreviewed GTK+ gardening. Update tests that pass now with the URLParser enabled.
carlosgc@webkit.org [Thu, 9 Feb 2017 14:43:14 +0000 (14:43 +0000)]
Unreviewed GTK+ gardening. Update tests that pass now with the URLParser enabled.

* platform/gtk/TestExpectations:
* platform/gtk/fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate-expected.txt: Removed.
* platform/gtk/fast/loader/redirect-to-invalid-url-using-meta-refresh-calls-policy-delegate-expected.txt: Removed.
* platform/gtk/fast/loader/url-parse-1-expected.txt: Removed.
* platform/gtk/fast/loader/window-open-to-invalid-url-calls-policy-delegate-expected.txt: Removed.
* platform/gtk/fast/url/invalid-idn-expected.txt: Removed.
* platform/gtk/fast/url/segments-userinfo-vs-host-expected.txt: Removed.
* platform/gtk/fast/url/tab-and-newline-stripping-expected.txt: Removed.
* platform/gtk/fast/url/url-credentials-escaping-expected.txt: Removed.

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

3 years agoUnreviewed, fix typo in comment
mcatanzaro@igalia.com [Thu, 9 Feb 2017 13:57:45 +0000 (13:57 +0000)]
Unreviewed, fix typo in comment

* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::replaceDocument):

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

3 years agoDisallow accelerated rendering for ginormous 2D canvases.
akling@apple.com [Thu, 9 Feb 2017 13:55:41 +0000 (13:55 +0000)]
Disallow accelerated rendering for ginormous 2D canvases.
<https://webkit.org/b/167968>
<rdar://problem/30119483>

Reviewed by Antti Koivisto.

Source/WebCore:

Add a "maximumAccelerated2dCanvasSize" setting that defaults to 5120x2880
which is the 5K resolution for 16:9.

Also added a way to include the "accelerates drawing" flag in layer tree dumps.

Test: compositing/canvas/accelerated-canvas-compositing-size-limit.html

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::shouldAccelerate):
* page/Frame.h:
* page/Settings.in:
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::dumpProperties):
* platform/graphics/GraphicsLayerClient.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerTreeAsText):
* testing/Internals.cpp:
(WebCore::toLayerTreeFlags):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Add a simple test that documents the fact that we no longer accelerate canvases
larger than 5120x2880.

* compositing/canvas/accelerated-canvas-compositing-size-limit-expected.txt: Added.
* compositing/canvas/accelerated-canvas-compositing-size-limit.html: Added.
* platform/ios-simulator/compositing/canvas/accelerated-canvas-compositing-size-limit-expected.txt: Added.

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

3 years agoUnreviewed GTK+ gardening. Add expectations for more tests that require drag and...
carlosgc@webkit.org [Thu, 9 Feb 2017 13:52:56 +0000 (13:52 +0000)]
Unreviewed GTK+ gardening. Add expectations for more tests that require drag and drop.

* platform/gtk/TestExpectations:

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

3 years agoUnreviewed. Fix gtk-doc warning
tpopela@redhat.com [Thu, 9 Feb 2017 12:20:39 +0000 (12:20 +0000)]
Unreviewed. Fix gtk-doc warning

html/WebKitSettings.html:4435: warning: no link for: 'api-index-2.3' -> (2.3).

* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_class_init):

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

3 years agoRemove most cases of #if ENABLE(CACHE_PARTITIONING)
antti@apple.com [Thu, 9 Feb 2017 11:09:28 +0000 (11:09 +0000)]
Remove most cases of #if ENABLE(CACHE_PARTITIONING)
https://bugs.webkit.org/show_bug.cgi?id=167990

Reviewed by Sam Weinig.

Source/WebCore:

We'll just return empty string for the partition if partitioning is not enabled.

* html/DOMURL.cpp:
(WebCore::DOMURL::revokeObjectURL):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::url):
(WebCore::CachedResource::cachePartition):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::setDomainForCachePartition):
* loader/cache/CachedResourceRequest.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::add):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequestImpl):
(WebCore::MemoryCache::addImageToCache):
(WebCore::MemoryCache::removeImageFromCache):
(WebCore::MemoryCache::remove):
(WebCore::MemoryCache::removeResourcesWithOrigin):
(WebCore::MemoryCache::removeResourcesWithOrigins):
(WebCore::MemoryCache::getOriginsWithCache):
(WebCore::MemoryCache::originsWithCache):
* loader/cache/MemoryCache.h:
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::domainForCachePartition):
* page/SecurityOrigin.h:
* platform/SchemeRegistry.cpp:
(WebCore::cachePartitioningSchemes):
(WebCore::SchemeRegistry::shouldPartitionCacheForURLScheme):
* platform/SchemeRegistry.h:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::setAsIsolatedCopy):
(WebCore::ResourceRequestBase::setCachePartition):
(WebCore::ResourceRequestBase::partitionName):
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::cachePartition):
(WebCore::ResourceRequestBase::setDomainForCachePartition):
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::cachePartition): Deleted.
(WebCore::ResourceRequest::setCachePartition): Deleted.
(WebCore::ResourceRequest::setDomainForCachePartition): Deleted.
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::partitionName): Deleted.
(WebCore::ResourceRequest::doPlatformSetAsIsolatedCopy): Deleted.
* platform/network/cf/ResourceResponse.h:
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
* testing/Internals.cpp:
(WebCore::Internals::isLoadingFromMemoryCache):

Source/WebKit/mac:

* Misc/WebCache.mm:
(+[WebCache addImageToCache:forURL:forFrame:]):
(+[WebCache removeImageFromCacheForURL:forFrame:]):
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

Source/WebKit2:

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::makeCacheKey):
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::constructRevalidationRequest):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encode):
(IPC::ArgumentCoder<ResourceRequest>::decode):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextRegisterURLSchemeAsCachePartitioned):
* UIProcess/WebProcessPool.cpp:
(WebKit::m_hiddenPageThrottlingTimer):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::registerURLSchemeAsCachePartitioned):
* UIProcess/WebProcessPool.h:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::registerURLSchemeAsCachePartitioned):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

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

3 years agoAdd Web Bluetooth as Not Considering
rniwa@webkit.org [Thu, 9 Feb 2017 10:41:16 +0000 (10:41 +0000)]
Add Web Bluetooth as Not Considering
https://bugs.webkit.org/show_bug.cgi?id=168042

Reviewed by Yusuke Suzuki.

Add Web Bluetooth as a feature not being considered to be implemented in WebKit.

* features.json:

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

3 years agoRemove svn:executable property from headers.
achristensen@apple.com [Thu, 9 Feb 2017 08:15:17 +0000 (08:15 +0000)]
Remove svn:executable property from headers.

* Source/webrtc/base/sigslottester.h: Removed property svn:executable.
* Source/webrtc/modules/video_processing/util/skin_detection.h: Removed property svn:executable.

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

3 years agoDon't migrate WebKit DOM headers in MigrateHeaders.make
ap@apple.com [Thu, 9 Feb 2017 06:07:06 +0000 (06:07 +0000)]
Don't migrate WebKit DOM headers in MigrateHeaders.make
https://bugs.webkit.org/show_bug.cgi?id=167608

Source/WebKit:

Reviewed by Darin Adler.

Stop migrating DOM headers that are now in WebKit.

* WebKit.xcodeproj/project.pbxproj: Marked DOM headers as private, so that Xcode
takes care of making them available as SPI.

Source/WebKit/mac:

Reviewed by Darin Adler.

Stop migrating DOM headers that are now in WebKit.

* DOM/DOMDOMImplementation.h: Removed.
* DOM/DOMDOMImplementation.mm: Removed.
* DOM/DOMDOMImplementationInternal.h: Removed.
* DOM/DOMDOMTokenList.h: Removed.
* DOM/DOMDOMTokenList.mm: Removed.
* DOM/DOMDOMTokenListInternal.h: Removed.
* DOM/DOMImplementation.h: Copied from Source/WebKit/mac/DOM/DOMDOMImplementation.h.
* DOM/DOMImplementation.mm: Copied from Source/WebKit/mac/DOM/DOMDOMImplementation.mm.
* DOM/DOMImplementationInternal.h: Copied from Source/WebKit/mac/DOM/DOMDOMImplementationInternal.h.
* DOM/DOMTokenList.h: Copied from Source/WebKit/mac/DOM/DOMDOMTokenList.h.
* DOM/DOMTokenList.mm: Copied from Source/WebKit/mac/DOM/DOMDOMTokenList.mm.
* DOM/DOMTokenListInternal.h: Copied from Source/WebKit/mac/DOM/DOMDOMTokenListInternal.h.
As the files are not in WebCore any more, there is no need to differentiate from
WebCore internal headers with the same name. This makes it possible to make these
headers private using Xcode mechanisms, as opposed to copying with a shell script.

* DOM/DOMElement.mm: Removed "using namespace WebCore". Other DOM implementation
files don't have it.

* DOM/DOMCore.h:
* DOM/DOMDocument.mm:
* DOM/DOMHTMLAnchorElement.mm:
* DOM/DOMHTMLAreaElement.mm:
* DOM/DOMHTMLLinkElement.mm:
* DOM/DOMUtility.mm:
No more "DOMDOM".

* WebKit.exp:
No more "DOMDOM". DOMDOMTokenList was not directly exposed via an SPI header, so
renaming it is likely to be safe.

* MigrateHeaders.make: Don't migrate WebKit headers.

* Configurations/WebKitLegacy.xcconfig: Don't include two iOS specific SPI headers
on macOS.

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

3 years agoUpdate web-platform-tests resources
cdumez@apple.com [Thu, 9 Feb 2017 05:52:02 +0000 (05:52 +0000)]
Update web-platform-tests resources
https://bugs.webkit.org/show_bug.cgi?id=168026

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* resources/web-platform-tests-modules.json:
* resources/web-platform-tests-modules/darobin/webidl2.js/archive/bd216bcd5596d60734450adc938155deab1e1a80.tar.gz: Removed.
* resources/web-platform-tests-modules/dontcallmedom/widlproc/archive/4ef8dde69c0ba3d0167bccfa2775eea7f0d6c7fe.tar.gz: Removed.
* resources/web-platform-tests-modules/w3c/testharness.js/archive/873f9680aff66553f84d38f21a038c4534cc2789.tar.gz: Removed.
* web-platform-tests/.gitignore:
* web-platform-tests/XMLHttpRequest/interfaces-expected.txt:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/fetch/api/headers/headers-idl-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/webappapis/animation-frames/idlharness-expected.txt:
* web-platform-tests/resources/LICENSE: Added.
* web-platform-tests/resources/idlharness.js: Added.
(constValue):
(minOverloadLength):
(throwOrReject):
(awaitNCallbacks):
(return.fround):
(fround):
(self.IdlArray):
(IdlArray.prototype.add_idls):
(IdlArray.prototype.add_untested_idls):
(IdlArray.prototype.internal_add_idls):
(IdlArray.prototype.add_objects):
(IdlArray.prototype.prevent_multiple_testing):
(IdlArray.prototype.recursively_get_implements):
(exposed_in):
(IdlArray.prototype.test):
(IdlArray.prototype.assert_type_is):
(IdlObject):
(IdlObject.prototype.test):
(IdlObject.prototype.has_extended_attribute):
(IdlInterface):
(IdlInterface.prototype.is_callback):
(IdlInterface.prototype.has_constants):
(IdlInterface.prototype.is_global):
(IdlInterface.prototype.test):
(IdlInterface.prototype.test_self):
(IdlInterface.prototype.test_member_const):
(IdlInterface.prototype.test_member_attribute):
(IdlInterface.prototype.test_member_operation):
(IdlInterface.prototype.do_member_operation_asserts):
(IdlInterface.prototype.add_iterable_members):
(IdlInterface.prototype.test_member_iterable):
(IdlInterface.prototype.test_member_stringifier):
(IdlInterface.prototype.test_members):
(IdlInterface.prototype.test_object):
(IdlInterface.prototype.test_primary_interface_of):
(IdlInterface.prototype.test_interface_of):
(IdlInterface.prototype.has_stringifier):
(IdlInterface.prototype.do_interface_attribute_asserts):
(IdlInterfaceMember):
(create_suitable_object):
(IdlEnum):
(IdlTypedef):
* web-platform-tests/resources/readme.md: Added.
* web-platform-tests/resources/testharness.js: Added.
(WindowTestEnvironment):
(WindowTestEnvironment.prototype._dispatch):
(WindowTestEnvironment.prototype._forEach_windows):
(WindowTestEnvironment.prototype.on_tests_ready):
(WindowTestEnvironment.prototype.setup_messages):
(WindowTestEnvironment.prototype.next_default_test_name):
(WindowTestEnvironment.prototype.on_new_harness_properties):
(WindowTestEnvironment.prototype.add_on_loaded_callback):
(WindowTestEnvironment.prototype.test_timeout):
(WindowTestEnvironment.prototype.global_scope):
(WorkerTestEnvironment):
(WorkerTestEnvironment.prototype._dispatch):
(WorkerTestEnvironment.prototype._add_message_port):
(WorkerTestEnvironment.prototype.next_default_test_name):
(WorkerTestEnvironment.prototype.on_new_harness_properties):
(WorkerTestEnvironment.prototype.on_tests_ready):
(WorkerTestEnvironment.prototype.add_on_loaded_callback):
(WorkerTestEnvironment.prototype.test_timeout):
(WorkerTestEnvironment.prototype.global_scope):
(DedicatedWorkerTestEnvironment):
(DedicatedWorkerTestEnvironment.prototype.on_tests_ready):
(SharedWorkerTestEnvironment):
(SharedWorkerTestEnvironment.prototype.on_tests_ready):
(ServiceWorkerTestEnvironment):
(ServiceWorkerTestEnvironment.prototype.add_on_loaded_callback):
(create_test_environment):
(is_shared_worker):
(is_service_worker):
(test):
(async_test):
(promise_test):
(this.wait_for):
(EventWatcher):
(setup):
(done):
(generate_tests):
(step_timeout):
(truncate):
(is_node):
(format_value):
* web-platform-tests/resources/webidl2/LICENSE: Added.
* web-platform-tests/resources/webidl2/README.md: Added.
* web-platform-tests/resources/webidl2/lib/webidl2.js: Added.
(tokenise):
(WebIDLParseError):
(WebIDLParseError.prototype.toString):
(error):
(consume):
(ws):
(all_ws):
(integer_type):
(float_type):
(primitive_type):
(const_value):
(type_suffix):
(single_type):
(union_type):
(type):
(argument):
(argument_list):
(type_pair):
(simple_extended_attr):
(extended_attrs):
(default_):
(const_):
(inheritance):
(operation_rest):
(callback):
(attribute):
(return_type):
(operation):
(identifiers):
(serialiser):
(iterable_type):
(readonly_iterable_type):
(iterable):
(interface_):
(partial):
(dictionary):
(exception):
(enum_):
(parse):
* web-platform-tests/resources/webidl2/lib/writer.js: Added.
(noop):
(literal):
(wsPea):
(wsTPea):
(lineComment):
(multilineComment):
(type):
(const_value):
(argument):
(args):
(make_ext_at):
(extended_attributes):
(operation):
(attribute):
(interface_):
(dictionary):
(field):
(exception):
(const_):
(typedef):
(implements_):
(callback):
(enum_):
(dispatch):
(iterate):
(write):
(obj.write):
* web-platform-tests/url/interfaces-expected.txt:

Tools:

Stop copying testharness.js from resources/ to web-platform-tests/resources.

* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(WebPlatformTestServer._copy_webkit_test_files):

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

3 years agoPut names on more UIViews for ease of debugging
simon.fraser@apple.com [Thu, 9 Feb 2017 05:22:51 +0000 (05:22 +0000)]
Put names on more UIViews for ease of debugging
https://bugs.webkit.org/show_bug.cgi?id=168035

Reviewed by Tim Horton.

Source/WebCore:

Name the page overlay layers.

* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::createRootLayersIfNeeded):
(WebCore::PageOverlayController::installPageOverlay):

Source/WebKit2:

Put names on the various bare UIViews that we create.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::showPaintRect):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):

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

3 years agoRebaseline emoji tests for ios-simulator.
ryanhaddad@apple.com [Thu, 9 Feb 2017 05:10:11 +0000 (05:10 +0000)]
Rebaseline emoji tests for ios-simulator.

Unreviewed test gardening.

* platform/ios-simulator/editing/deleting/delete-emoji-expected.txt:
* platform/ios-simulator/fast/text/emoji-expected.txt:

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